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 description for 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 = "2021-01-15"
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 description for 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 = "2021-01-15"
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 description for 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 = "2021-01-15"
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 description for 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 = "2021-01-15"
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 description for Applies the configuration settings from the target slot onto the current
394// slot.
395// Parameters:
396// resourceGroupName - name of the resource group to which the resource belongs.
397// name - name of the app.
398// slotSwapEntity - JSON object that contains the target slot name. See example.
399func (client AppsClient) ApplySlotConfigToProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result autorest.Response, err error) {
400	if tracing.IsEnabled() {
401		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApplySlotConfigToProduction")
402		defer func() {
403			sc := -1
404			if result.Response != nil {
405				sc = result.Response.StatusCode
406			}
407			tracing.EndSpan(ctx, sc, err)
408		}()
409	}
410	if err := validation.Validate([]validation.Validation{
411		{TargetValue: resourceGroupName,
412			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
413				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
414				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
415		{TargetValue: slotSwapEntity,
416			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
417				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
418		return result, validation.NewError("web.AppsClient", "ApplySlotConfigToProduction", err.Error())
419	}
420
421	req, err := client.ApplySlotConfigToProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
422	if err != nil {
423		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", nil, "Failure preparing request")
424		return
425	}
426
427	resp, err := client.ApplySlotConfigToProductionSender(req)
428	if err != nil {
429		result.Response = resp
430		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", resp, "Failure sending request")
431		return
432	}
433
434	result, err = client.ApplySlotConfigToProductionResponder(resp)
435	if err != nil {
436		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", resp, "Failure responding to request")
437		return
438	}
439
440	return
441}
442
443// ApplySlotConfigToProductionPreparer prepares the ApplySlotConfigToProduction request.
444func (client AppsClient) ApplySlotConfigToProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
445	pathParameters := map[string]interface{}{
446		"name":              autorest.Encode("path", name),
447		"resourceGroupName": autorest.Encode("path", resourceGroupName),
448		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
449	}
450
451	const APIVersion = "2021-01-15"
452	queryParameters := map[string]interface{}{
453		"api-version": APIVersion,
454	}
455
456	preparer := autorest.CreatePreparer(
457		autorest.AsContentType("application/json; charset=utf-8"),
458		autorest.AsPost(),
459		autorest.WithBaseURL(client.BaseURI),
460		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig", pathParameters),
461		autorest.WithJSON(slotSwapEntity),
462		autorest.WithQueryParameters(queryParameters))
463	return preparer.Prepare((&http.Request{}).WithContext(ctx))
464}
465
466// ApplySlotConfigToProductionSender sends the ApplySlotConfigToProduction request. The method will close the
467// http.Response Body if it receives an error.
468func (client AppsClient) ApplySlotConfigToProductionSender(req *http.Request) (*http.Response, error) {
469	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
470}
471
472// ApplySlotConfigToProductionResponder handles the response to the ApplySlotConfigToProduction request. The method always
473// closes the http.Response Body.
474func (client AppsClient) ApplySlotConfigToProductionResponder(resp *http.Response) (result autorest.Response, err error) {
475	err = autorest.Respond(
476		resp,
477		azure.WithErrorUnlessStatusCode(http.StatusOK),
478		autorest.ByClosing())
479	result.Response = resp
480	return
481}
482
483// ApplySlotConfigurationSlot description for Applies the configuration settings from the target slot onto the current
484// slot.
485// Parameters:
486// resourceGroupName - name of the resource group to which the resource belongs.
487// name - name of the app.
488// slotSwapEntity - JSON object that contains the target slot name. See example.
489// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
490func (client AppsClient) ApplySlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result autorest.Response, err error) {
491	if tracing.IsEnabled() {
492		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApplySlotConfigurationSlot")
493		defer func() {
494			sc := -1
495			if result.Response != nil {
496				sc = result.Response.StatusCode
497			}
498			tracing.EndSpan(ctx, sc, err)
499		}()
500	}
501	if err := validation.Validate([]validation.Validation{
502		{TargetValue: resourceGroupName,
503			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
504				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
505				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
506		{TargetValue: slotSwapEntity,
507			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
508				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
509		return result, validation.NewError("web.AppsClient", "ApplySlotConfigurationSlot", err.Error())
510	}
511
512	req, err := client.ApplySlotConfigurationSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
513	if err != nil {
514		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", nil, "Failure preparing request")
515		return
516	}
517
518	resp, err := client.ApplySlotConfigurationSlotSender(req)
519	if err != nil {
520		result.Response = resp
521		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", resp, "Failure sending request")
522		return
523	}
524
525	result, err = client.ApplySlotConfigurationSlotResponder(resp)
526	if err != nil {
527		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", resp, "Failure responding to request")
528		return
529	}
530
531	return
532}
533
534// ApplySlotConfigurationSlotPreparer prepares the ApplySlotConfigurationSlot request.
535func (client AppsClient) ApplySlotConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
536	pathParameters := map[string]interface{}{
537		"name":              autorest.Encode("path", name),
538		"resourceGroupName": autorest.Encode("path", resourceGroupName),
539		"slot":              autorest.Encode("path", slot),
540		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
541	}
542
543	const APIVersion = "2021-01-15"
544	queryParameters := map[string]interface{}{
545		"api-version": APIVersion,
546	}
547
548	preparer := autorest.CreatePreparer(
549		autorest.AsContentType("application/json; charset=utf-8"),
550		autorest.AsPost(),
551		autorest.WithBaseURL(client.BaseURI),
552		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig", pathParameters),
553		autorest.WithJSON(slotSwapEntity),
554		autorest.WithQueryParameters(queryParameters))
555	return preparer.Prepare((&http.Request{}).WithContext(ctx))
556}
557
558// ApplySlotConfigurationSlotSender sends the ApplySlotConfigurationSlot request. The method will close the
559// http.Response Body if it receives an error.
560func (client AppsClient) ApplySlotConfigurationSlotSender(req *http.Request) (*http.Response, error) {
561	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
562}
563
564// ApplySlotConfigurationSlotResponder handles the response to the ApplySlotConfigurationSlot request. The method always
565// closes the http.Response Body.
566func (client AppsClient) ApplySlotConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
567	err = autorest.Respond(
568		resp,
569		azure.WithErrorUnlessStatusCode(http.StatusOK),
570		autorest.ByClosing())
571	result.Response = resp
572	return
573}
574
575// ApproveOrRejectPrivateEndpointConnection description for Approves or rejects a private endpoint connection
576// Parameters:
577// resourceGroupName - name of the resource group to which the resource belongs.
578// name - name of the site.
579func (client AppsClient) ApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource) (result AppsApproveOrRejectPrivateEndpointConnectionFuture, err error) {
580	if tracing.IsEnabled() {
581		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApproveOrRejectPrivateEndpointConnection")
582		defer func() {
583			sc := -1
584			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
585				sc = result.FutureAPI.Response().StatusCode
586			}
587			tracing.EndSpan(ctx, sc, err)
588		}()
589	}
590	if err := validation.Validate([]validation.Validation{
591		{TargetValue: resourceGroupName,
592			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
593				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
594				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
595		return result, validation.NewError("web.AppsClient", "ApproveOrRejectPrivateEndpointConnection", err.Error())
596	}
597
598	req, err := client.ApproveOrRejectPrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper)
599	if err != nil {
600		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApproveOrRejectPrivateEndpointConnection", nil, "Failure preparing request")
601		return
602	}
603
604	result, err = client.ApproveOrRejectPrivateEndpointConnectionSender(req)
605	if err != nil {
606		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApproveOrRejectPrivateEndpointConnection", nil, "Failure sending request")
607		return
608	}
609
610	return
611}
612
613// ApproveOrRejectPrivateEndpointConnectionPreparer prepares the ApproveOrRejectPrivateEndpointConnection request.
614func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource) (*http.Request, error) {
615	pathParameters := map[string]interface{}{
616		"name":                          autorest.Encode("path", name),
617		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
618		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
619		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
620	}
621
622	const APIVersion = "2021-01-15"
623	queryParameters := map[string]interface{}{
624		"api-version": APIVersion,
625	}
626
627	preparer := autorest.CreatePreparer(
628		autorest.AsContentType("application/json; charset=utf-8"),
629		autorest.AsPut(),
630		autorest.WithBaseURL(client.BaseURI),
631		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
632		autorest.WithJSON(privateEndpointWrapper),
633		autorest.WithQueryParameters(queryParameters))
634	return preparer.Prepare((&http.Request{}).WithContext(ctx))
635}
636
637// ApproveOrRejectPrivateEndpointConnectionSender sends the ApproveOrRejectPrivateEndpointConnection request. The method will close the
638// http.Response Body if it receives an error.
639func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSender(req *http.Request) (future AppsApproveOrRejectPrivateEndpointConnectionFuture, err error) {
640	var resp *http.Response
641	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
642	if err != nil {
643		return
644	}
645	var azf azure.Future
646	azf, err = azure.NewFutureFromResponse(resp)
647	future.FutureAPI = &azf
648	future.Result = future.result
649	return
650}
651
652// ApproveOrRejectPrivateEndpointConnectionResponder handles the response to the ApproveOrRejectPrivateEndpointConnection request. The method always
653// closes the http.Response Body.
654func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionResponder(resp *http.Response) (result RemotePrivateEndpointConnectionARMResource, err error) {
655	err = autorest.Respond(
656		resp,
657		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
658		autorest.ByUnmarshallingJSON(&result),
659		autorest.ByClosing())
660	result.Response = autorest.Response{Response: resp}
661	return
662}
663
664// ApproveOrRejectPrivateEndpointConnectionSlot description for Approves or rejects a private endpoint connection
665// Parameters:
666// resourceGroupName - name of the resource group to which the resource belongs.
667// name - name of the site.
668func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, slot string) (result AppsApproveOrRejectPrivateEndpointConnectionSlotFuture, err error) {
669	if tracing.IsEnabled() {
670		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApproveOrRejectPrivateEndpointConnectionSlot")
671		defer func() {
672			sc := -1
673			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
674				sc = result.FutureAPI.Response().StatusCode
675			}
676			tracing.EndSpan(ctx, sc, err)
677		}()
678	}
679	if err := validation.Validate([]validation.Validation{
680		{TargetValue: resourceGroupName,
681			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
682				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
683				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
684		return result, validation.NewError("web.AppsClient", "ApproveOrRejectPrivateEndpointConnectionSlot", err.Error())
685	}
686
687	req, err := client.ApproveOrRejectPrivateEndpointConnectionSlotPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot)
688	if err != nil {
689		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApproveOrRejectPrivateEndpointConnectionSlot", nil, "Failure preparing request")
690		return
691	}
692
693	result, err = client.ApproveOrRejectPrivateEndpointConnectionSlotSender(req)
694	if err != nil {
695		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApproveOrRejectPrivateEndpointConnectionSlot", nil, "Failure sending request")
696		return
697	}
698
699	return
700}
701
702// ApproveOrRejectPrivateEndpointConnectionSlotPreparer prepares the ApproveOrRejectPrivateEndpointConnectionSlot request.
703func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource, slot string) (*http.Request, error) {
704	pathParameters := map[string]interface{}{
705		"name":                          autorest.Encode("path", name),
706		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
707		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
708		"slot":                          autorest.Encode("path", slot),
709		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
710	}
711
712	const APIVersion = "2021-01-15"
713	queryParameters := map[string]interface{}{
714		"api-version": APIVersion,
715	}
716
717	preparer := autorest.CreatePreparer(
718		autorest.AsContentType("application/json; charset=utf-8"),
719		autorest.AsPut(),
720		autorest.WithBaseURL(client.BaseURI),
721		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
722		autorest.WithJSON(privateEndpointWrapper),
723		autorest.WithQueryParameters(queryParameters))
724	return preparer.Prepare((&http.Request{}).WithContext(ctx))
725}
726
727// ApproveOrRejectPrivateEndpointConnectionSlotSender sends the ApproveOrRejectPrivateEndpointConnectionSlot request. The method will close the
728// http.Response Body if it receives an error.
729func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSlotSender(req *http.Request) (future AppsApproveOrRejectPrivateEndpointConnectionSlotFuture, err error) {
730	var resp *http.Response
731	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
732	if err != nil {
733		return
734	}
735	var azf azure.Future
736	azf, err = azure.NewFutureFromResponse(resp)
737	future.FutureAPI = &azf
738	future.Result = future.result
739	return
740}
741
742// ApproveOrRejectPrivateEndpointConnectionSlotResponder handles the response to the ApproveOrRejectPrivateEndpointConnectionSlot request. The method always
743// closes the http.Response Body.
744func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSlotResponder(resp *http.Response) (result RemotePrivateEndpointConnectionARMResource, err error) {
745	err = autorest.Respond(
746		resp,
747		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
748		autorest.ByUnmarshallingJSON(&result),
749		autorest.ByClosing())
750	result.Response = autorest.Response{Response: resp}
751	return
752}
753
754// Backup description for Creates a backup of an app.
755// Parameters:
756// resourceGroupName - name of the resource group to which the resource belongs.
757// name - name of the app.
758// request - backup configuration. You can use the JSON response from the POST action as input here.
759func (client AppsClient) Backup(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (result BackupItem, err error) {
760	if tracing.IsEnabled() {
761		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Backup")
762		defer func() {
763			sc := -1
764			if result.Response.Response != nil {
765				sc = result.Response.Response.StatusCode
766			}
767			tracing.EndSpan(ctx, sc, err)
768		}()
769	}
770	if err := validation.Validate([]validation.Validation{
771		{TargetValue: resourceGroupName,
772			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
773				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
774				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
775		{TargetValue: request,
776			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
777				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
778					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
779						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
780							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
781							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
782						}},
783				}}}}}); err != nil {
784		return result, validation.NewError("web.AppsClient", "Backup", err.Error())
785	}
786
787	req, err := client.BackupPreparer(ctx, resourceGroupName, name, request)
788	if err != nil {
789		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", nil, "Failure preparing request")
790		return
791	}
792
793	resp, err := client.BackupSender(req)
794	if err != nil {
795		result.Response = autorest.Response{Response: resp}
796		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", resp, "Failure sending request")
797		return
798	}
799
800	result, err = client.BackupResponder(resp)
801	if err != nil {
802		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", resp, "Failure responding to request")
803		return
804	}
805
806	return
807}
808
809// BackupPreparer prepares the Backup request.
810func (client AppsClient) BackupPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (*http.Request, error) {
811	pathParameters := map[string]interface{}{
812		"name":              autorest.Encode("path", name),
813		"resourceGroupName": autorest.Encode("path", resourceGroupName),
814		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
815	}
816
817	const APIVersion = "2021-01-15"
818	queryParameters := map[string]interface{}{
819		"api-version": APIVersion,
820	}
821
822	preparer := autorest.CreatePreparer(
823		autorest.AsContentType("application/json; charset=utf-8"),
824		autorest.AsPost(),
825		autorest.WithBaseURL(client.BaseURI),
826		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup", pathParameters),
827		autorest.WithJSON(request),
828		autorest.WithQueryParameters(queryParameters))
829	return preparer.Prepare((&http.Request{}).WithContext(ctx))
830}
831
832// BackupSender sends the Backup request. The method will close the
833// http.Response Body if it receives an error.
834func (client AppsClient) BackupSender(req *http.Request) (*http.Response, error) {
835	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
836}
837
838// BackupResponder handles the response to the Backup request. The method always
839// closes the http.Response Body.
840func (client AppsClient) BackupResponder(resp *http.Response) (result BackupItem, err error) {
841	err = autorest.Respond(
842		resp,
843		azure.WithErrorUnlessStatusCode(http.StatusOK),
844		autorest.ByUnmarshallingJSON(&result),
845		autorest.ByClosing())
846	result.Response = autorest.Response{Response: resp}
847	return
848}
849
850// BackupSlot description for Creates a backup of an app.
851// Parameters:
852// resourceGroupName - name of the resource group to which the resource belongs.
853// name - name of the app.
854// request - backup configuration. You can use the JSON response from the POST action as input here.
855// slot - name of the deployment slot. If a slot is not specified, the API will create a backup for the
856// production slot.
857func (client AppsClient) BackupSlot(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (result BackupItem, err error) {
858	if tracing.IsEnabled() {
859		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.BackupSlot")
860		defer func() {
861			sc := -1
862			if result.Response.Response != nil {
863				sc = result.Response.Response.StatusCode
864			}
865			tracing.EndSpan(ctx, sc, err)
866		}()
867	}
868	if err := validation.Validate([]validation.Validation{
869		{TargetValue: resourceGroupName,
870			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
871				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
872				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
873		{TargetValue: request,
874			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
875				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
876					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
877						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
878							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
879							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
880						}},
881				}}}}}); err != nil {
882		return result, validation.NewError("web.AppsClient", "BackupSlot", err.Error())
883	}
884
885	req, err := client.BackupSlotPreparer(ctx, resourceGroupName, name, request, slot)
886	if err != nil {
887		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", nil, "Failure preparing request")
888		return
889	}
890
891	resp, err := client.BackupSlotSender(req)
892	if err != nil {
893		result.Response = autorest.Response{Response: resp}
894		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", resp, "Failure sending request")
895		return
896	}
897
898	result, err = client.BackupSlotResponder(resp)
899	if err != nil {
900		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", resp, "Failure responding to request")
901		return
902	}
903
904	return
905}
906
907// BackupSlotPreparer prepares the BackupSlot request.
908func (client AppsClient) BackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (*http.Request, error) {
909	pathParameters := map[string]interface{}{
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 = "2021-01-15"
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.AsPost(),
924		autorest.WithBaseURL(client.BaseURI),
925		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup", pathParameters),
926		autorest.WithJSON(request),
927		autorest.WithQueryParameters(queryParameters))
928	return preparer.Prepare((&http.Request{}).WithContext(ctx))
929}
930
931// BackupSlotSender sends the BackupSlot request. The method will close the
932// http.Response Body if it receives an error.
933func (client AppsClient) BackupSlotSender(req *http.Request) (*http.Response, error) {
934	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
935}
936
937// BackupSlotResponder handles the response to the BackupSlot request. The method always
938// closes the http.Response Body.
939func (client AppsClient) BackupSlotResponder(resp *http.Response) (result BackupItem, 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// CreateDeployment description for Create a deployment for an app, or a deployment slot.
950// Parameters:
951// resourceGroupName - name of the resource group to which the resource belongs.
952// name - name of the app.
953// ID - ID of an existing deployment.
954// deployment - deployment details.
955func (client AppsClient) CreateDeployment(ctx context.Context, resourceGroupName string, name string, ID string, deployment Deployment) (result Deployment, err error) {
956	if tracing.IsEnabled() {
957		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateDeployment")
958		defer func() {
959			sc := -1
960			if result.Response.Response != nil {
961				sc = result.Response.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", "CreateDeployment", err.Error())
972	}
973
974	req, err := client.CreateDeploymentPreparer(ctx, resourceGroupName, name, ID, deployment)
975	if err != nil {
976		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", nil, "Failure preparing request")
977		return
978	}
979
980	resp, err := client.CreateDeploymentSender(req)
981	if err != nil {
982		result.Response = autorest.Response{Response: resp}
983		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", resp, "Failure sending request")
984		return
985	}
986
987	result, err = client.CreateDeploymentResponder(resp)
988	if err != nil {
989		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", resp, "Failure responding to request")
990		return
991	}
992
993	return
994}
995
996// CreateDeploymentPreparer prepares the CreateDeployment request.
997func (client AppsClient) CreateDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string, deployment Deployment) (*http.Request, error) {
998	pathParameters := map[string]interface{}{
999		"id":                autorest.Encode("path", ID),
1000		"name":              autorest.Encode("path", name),
1001		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1002		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1003	}
1004
1005	const APIVersion = "2021-01-15"
1006	queryParameters := map[string]interface{}{
1007		"api-version": APIVersion,
1008	}
1009
1010	preparer := autorest.CreatePreparer(
1011		autorest.AsContentType("application/json; charset=utf-8"),
1012		autorest.AsPut(),
1013		autorest.WithBaseURL(client.BaseURI),
1014		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
1015		autorest.WithJSON(deployment),
1016		autorest.WithQueryParameters(queryParameters))
1017	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1018}
1019
1020// CreateDeploymentSender sends the CreateDeployment request. The method will close the
1021// http.Response Body if it receives an error.
1022func (client AppsClient) CreateDeploymentSender(req *http.Request) (*http.Response, error) {
1023	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1024}
1025
1026// CreateDeploymentResponder handles the response to the CreateDeployment request. The method always
1027// closes the http.Response Body.
1028func (client AppsClient) CreateDeploymentResponder(resp *http.Response) (result Deployment, err error) {
1029	err = autorest.Respond(
1030		resp,
1031		azure.WithErrorUnlessStatusCode(http.StatusOK),
1032		autorest.ByUnmarshallingJSON(&result),
1033		autorest.ByClosing())
1034	result.Response = autorest.Response{Response: resp}
1035	return
1036}
1037
1038// CreateDeploymentSlot description for Create a deployment for an app, or a deployment slot.
1039// Parameters:
1040// resourceGroupName - name of the resource group to which the resource belongs.
1041// name - name of the app.
1042// ID - ID of an existing deployment.
1043// slot - name of the deployment slot. If a slot is not specified, the API creates a deployment for the
1044// production slot.
1045// deployment - deployment details.
1046func (client AppsClient) CreateDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string, deployment Deployment) (result Deployment, err error) {
1047	if tracing.IsEnabled() {
1048		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateDeploymentSlot")
1049		defer func() {
1050			sc := -1
1051			if result.Response.Response != nil {
1052				sc = result.Response.Response.StatusCode
1053			}
1054			tracing.EndSpan(ctx, sc, err)
1055		}()
1056	}
1057	if err := validation.Validate([]validation.Validation{
1058		{TargetValue: resourceGroupName,
1059			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1060				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1061				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1062		return result, validation.NewError("web.AppsClient", "CreateDeploymentSlot", err.Error())
1063	}
1064
1065	req, err := client.CreateDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot, deployment)
1066	if err != nil {
1067		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", nil, "Failure preparing request")
1068		return
1069	}
1070
1071	resp, err := client.CreateDeploymentSlotSender(req)
1072	if err != nil {
1073		result.Response = autorest.Response{Response: resp}
1074		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", resp, "Failure sending request")
1075		return
1076	}
1077
1078	result, err = client.CreateDeploymentSlotResponder(resp)
1079	if err != nil {
1080		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", resp, "Failure responding to request")
1081		return
1082	}
1083
1084	return
1085}
1086
1087// CreateDeploymentSlotPreparer prepares the CreateDeploymentSlot request.
1088func (client AppsClient) CreateDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string, deployment Deployment) (*http.Request, error) {
1089	pathParameters := map[string]interface{}{
1090		"id":                autorest.Encode("path", ID),
1091		"name":              autorest.Encode("path", name),
1092		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1093		"slot":              autorest.Encode("path", slot),
1094		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1095	}
1096
1097	const APIVersion = "2021-01-15"
1098	queryParameters := map[string]interface{}{
1099		"api-version": APIVersion,
1100	}
1101
1102	preparer := autorest.CreatePreparer(
1103		autorest.AsContentType("application/json; charset=utf-8"),
1104		autorest.AsPut(),
1105		autorest.WithBaseURL(client.BaseURI),
1106		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
1107		autorest.WithJSON(deployment),
1108		autorest.WithQueryParameters(queryParameters))
1109	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1110}
1111
1112// CreateDeploymentSlotSender sends the CreateDeploymentSlot request. The method will close the
1113// http.Response Body if it receives an error.
1114func (client AppsClient) CreateDeploymentSlotSender(req *http.Request) (*http.Response, error) {
1115	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1116}
1117
1118// CreateDeploymentSlotResponder handles the response to the CreateDeploymentSlot request. The method always
1119// closes the http.Response Body.
1120func (client AppsClient) CreateDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) {
1121	err = autorest.Respond(
1122		resp,
1123		azure.WithErrorUnlessStatusCode(http.StatusOK),
1124		autorest.ByUnmarshallingJSON(&result),
1125		autorest.ByClosing())
1126	result.Response = autorest.Response{Response: resp}
1127	return
1128}
1129
1130// CreateFunction description for Create function for web site, or a deployment slot.
1131// Parameters:
1132// resourceGroupName - name of the resource group to which the resource belongs.
1133// name - site name.
1134// functionName - function name.
1135// functionEnvelope - function details.
1136func (client AppsClient) CreateFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope) (result AppsCreateFunctionFuture, err error) {
1137	if tracing.IsEnabled() {
1138		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateFunction")
1139		defer func() {
1140			sc := -1
1141			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1142				sc = result.FutureAPI.Response().StatusCode
1143			}
1144			tracing.EndSpan(ctx, sc, err)
1145		}()
1146	}
1147	if err := validation.Validate([]validation.Validation{
1148		{TargetValue: resourceGroupName,
1149			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1150				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1151				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1152		return result, validation.NewError("web.AppsClient", "CreateFunction", err.Error())
1153	}
1154
1155	req, err := client.CreateFunctionPreparer(ctx, resourceGroupName, name, functionName, functionEnvelope)
1156	if err != nil {
1157		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure preparing request")
1158		return
1159	}
1160
1161	result, err = client.CreateFunctionSender(req)
1162	if err != nil {
1163		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure sending request")
1164		return
1165	}
1166
1167	return
1168}
1169
1170// CreateFunctionPreparer prepares the CreateFunction request.
1171func (client AppsClient) CreateFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope) (*http.Request, error) {
1172	pathParameters := map[string]interface{}{
1173		"functionName":      autorest.Encode("path", functionName),
1174		"name":              autorest.Encode("path", name),
1175		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1176		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1177	}
1178
1179	const APIVersion = "2021-01-15"
1180	queryParameters := map[string]interface{}{
1181		"api-version": APIVersion,
1182	}
1183
1184	preparer := autorest.CreatePreparer(
1185		autorest.AsContentType("application/json; charset=utf-8"),
1186		autorest.AsPut(),
1187		autorest.WithBaseURL(client.BaseURI),
1188		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
1189		autorest.WithJSON(functionEnvelope),
1190		autorest.WithQueryParameters(queryParameters))
1191	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1192}
1193
1194// CreateFunctionSender sends the CreateFunction request. The method will close the
1195// http.Response Body if it receives an error.
1196func (client AppsClient) CreateFunctionSender(req *http.Request) (future AppsCreateFunctionFuture, err error) {
1197	var resp *http.Response
1198	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1199	if err != nil {
1200		return
1201	}
1202	var azf azure.Future
1203	azf, err = azure.NewFutureFromResponse(resp)
1204	future.FutureAPI = &azf
1205	future.Result = future.result
1206	return
1207}
1208
1209// CreateFunctionResponder handles the response to the CreateFunction request. The method always
1210// closes the http.Response Body.
1211func (client AppsClient) CreateFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) {
1212	err = autorest.Respond(
1213		resp,
1214		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1215		autorest.ByUnmarshallingJSON(&result),
1216		autorest.ByClosing())
1217	result.Response = autorest.Response{Response: resp}
1218	return
1219}
1220
1221// CreateInstanceFunctionSlot description for Create function for web site, or a deployment slot.
1222// Parameters:
1223// resourceGroupName - name of the resource group to which the resource belongs.
1224// name - site name.
1225// functionName - function name.
1226// slot - name of the deployment slot.
1227// functionEnvelope - function details.
1228func (client AppsClient) CreateInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (result AppsCreateInstanceFunctionSlotFuture, err error) {
1229	if tracing.IsEnabled() {
1230		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceFunctionSlot")
1231		defer func() {
1232			sc := -1
1233			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1234				sc = result.FutureAPI.Response().StatusCode
1235			}
1236			tracing.EndSpan(ctx, sc, err)
1237		}()
1238	}
1239	if err := validation.Validate([]validation.Validation{
1240		{TargetValue: resourceGroupName,
1241			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1242				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1243				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1244		return result, validation.NewError("web.AppsClient", "CreateInstanceFunctionSlot", err.Error())
1245	}
1246
1247	req, err := client.CreateInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot, functionEnvelope)
1248	if err != nil {
1249		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure preparing request")
1250		return
1251	}
1252
1253	result, err = client.CreateInstanceFunctionSlotSender(req)
1254	if err != nil {
1255		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure sending request")
1256		return
1257	}
1258
1259	return
1260}
1261
1262// CreateInstanceFunctionSlotPreparer prepares the CreateInstanceFunctionSlot request.
1263func (client AppsClient) CreateInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (*http.Request, error) {
1264	pathParameters := map[string]interface{}{
1265		"functionName":      autorest.Encode("path", functionName),
1266		"name":              autorest.Encode("path", name),
1267		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1268		"slot":              autorest.Encode("path", slot),
1269		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1270	}
1271
1272	const APIVersion = "2021-01-15"
1273	queryParameters := map[string]interface{}{
1274		"api-version": APIVersion,
1275	}
1276
1277	preparer := autorest.CreatePreparer(
1278		autorest.AsContentType("application/json; charset=utf-8"),
1279		autorest.AsPut(),
1280		autorest.WithBaseURL(client.BaseURI),
1281		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
1282		autorest.WithJSON(functionEnvelope),
1283		autorest.WithQueryParameters(queryParameters))
1284	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1285}
1286
1287// CreateInstanceFunctionSlotSender sends the CreateInstanceFunctionSlot request. The method will close the
1288// http.Response Body if it receives an error.
1289func (client AppsClient) CreateInstanceFunctionSlotSender(req *http.Request) (future AppsCreateInstanceFunctionSlotFuture, err error) {
1290	var resp *http.Response
1291	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1292	if err != nil {
1293		return
1294	}
1295	var azf azure.Future
1296	azf, err = azure.NewFutureFromResponse(resp)
1297	future.FutureAPI = &azf
1298	future.Result = future.result
1299	return
1300}
1301
1302// CreateInstanceFunctionSlotResponder handles the response to the CreateInstanceFunctionSlot request. The method always
1303// closes the http.Response Body.
1304func (client AppsClient) CreateInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) {
1305	err = autorest.Respond(
1306		resp,
1307		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1308		autorest.ByUnmarshallingJSON(&result),
1309		autorest.ByClosing())
1310	result.Response = autorest.Response{Response: resp}
1311	return
1312}
1313
1314// CreateInstanceMSDeployOperation description for Invoke the MSDeploy web app extension.
1315// Parameters:
1316// resourceGroupName - name of the resource group to which the resource belongs.
1317// name - name of web app.
1318// instanceID - ID of web app instance.
1319// mSDeploy - details of MSDeploy operation
1320func (client AppsClient) CreateInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy) (result AppsCreateInstanceMSDeployOperationFuture, err error) {
1321	if tracing.IsEnabled() {
1322		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceMSDeployOperation")
1323		defer func() {
1324			sc := -1
1325			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1326				sc = result.FutureAPI.Response().StatusCode
1327			}
1328			tracing.EndSpan(ctx, sc, err)
1329		}()
1330	}
1331	if err := validation.Validate([]validation.Validation{
1332		{TargetValue: resourceGroupName,
1333			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1334				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1335				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1336		return result, validation.NewError("web.AppsClient", "CreateInstanceMSDeployOperation", err.Error())
1337	}
1338
1339	req, err := client.CreateInstanceMSDeployOperationPreparer(ctx, resourceGroupName, name, instanceID, mSDeploy)
1340	if err != nil {
1341		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure preparing request")
1342		return
1343	}
1344
1345	result, err = client.CreateInstanceMSDeployOperationSender(req)
1346	if err != nil {
1347		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure sending request")
1348		return
1349	}
1350
1351	return
1352}
1353
1354// CreateInstanceMSDeployOperationPreparer prepares the CreateInstanceMSDeployOperation request.
1355func (client AppsClient) CreateInstanceMSDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy) (*http.Request, error) {
1356	pathParameters := map[string]interface{}{
1357		"instanceId":        autorest.Encode("path", instanceID),
1358		"name":              autorest.Encode("path", name),
1359		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1360		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1361	}
1362
1363	const APIVersion = "2021-01-15"
1364	queryParameters := map[string]interface{}{
1365		"api-version": APIVersion,
1366	}
1367
1368	preparer := autorest.CreatePreparer(
1369		autorest.AsContentType("application/json; charset=utf-8"),
1370		autorest.AsPut(),
1371		autorest.WithBaseURL(client.BaseURI),
1372		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
1373		autorest.WithJSON(mSDeploy),
1374		autorest.WithQueryParameters(queryParameters))
1375	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1376}
1377
1378// CreateInstanceMSDeployOperationSender sends the CreateInstanceMSDeployOperation request. The method will close the
1379// http.Response Body if it receives an error.
1380func (client AppsClient) CreateInstanceMSDeployOperationSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationFuture, err error) {
1381	var resp *http.Response
1382	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1383	if err != nil {
1384		return
1385	}
1386	var azf azure.Future
1387	azf, err = azure.NewFutureFromResponse(resp)
1388	future.FutureAPI = &azf
1389	future.Result = future.result
1390	return
1391}
1392
1393// CreateInstanceMSDeployOperationResponder handles the response to the CreateInstanceMSDeployOperation request. The method always
1394// closes the http.Response Body.
1395func (client AppsClient) CreateInstanceMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) {
1396	err = autorest.Respond(
1397		resp,
1398		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1399		autorest.ByUnmarshallingJSON(&result),
1400		autorest.ByClosing())
1401	result.Response = autorest.Response{Response: resp}
1402	return
1403}
1404
1405// CreateInstanceMSDeployOperationSlot description for Invoke the MSDeploy web app extension.
1406// Parameters:
1407// resourceGroupName - name of the resource group to which the resource belongs.
1408// name - name of web app.
1409// slot - name of web app slot. If not specified then will default to production slot.
1410// instanceID - ID of web app instance.
1411// mSDeploy - details of MSDeploy operation
1412func (client AppsClient) CreateInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy) (result AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
1413	if tracing.IsEnabled() {
1414		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceMSDeployOperationSlot")
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", "CreateInstanceMSDeployOperationSlot", err.Error())
1429	}
1430
1431	req, err := client.CreateInstanceMSDeployOperationSlotPreparer(ctx, resourceGroupName, name, slot, instanceID, mSDeploy)
1432	if err != nil {
1433		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure preparing request")
1434		return
1435	}
1436
1437	result, err = client.CreateInstanceMSDeployOperationSlotSender(req)
1438	if err != nil {
1439		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure sending request")
1440		return
1441	}
1442
1443	return
1444}
1445
1446// CreateInstanceMSDeployOperationSlotPreparer prepares the CreateInstanceMSDeployOperationSlot request.
1447func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy) (*http.Request, error) {
1448	pathParameters := map[string]interface{}{
1449		"instanceId":        autorest.Encode("path", instanceID),
1450		"name":              autorest.Encode("path", name),
1451		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1452		"slot":              autorest.Encode("path", slot),
1453		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1454	}
1455
1456	const APIVersion = "2021-01-15"
1457	queryParameters := map[string]interface{}{
1458		"api-version": APIVersion,
1459	}
1460
1461	preparer := autorest.CreatePreparer(
1462		autorest.AsContentType("application/json; charset=utf-8"),
1463		autorest.AsPut(),
1464		autorest.WithBaseURL(client.BaseURI),
1465		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
1466		autorest.WithJSON(mSDeploy),
1467		autorest.WithQueryParameters(queryParameters))
1468	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1469}
1470
1471// CreateInstanceMSDeployOperationSlotSender sends the CreateInstanceMSDeployOperationSlot request. The method will close the
1472// http.Response Body if it receives an error.
1473func (client AppsClient) CreateInstanceMSDeployOperationSlotSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
1474	var resp *http.Response
1475	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1476	if err != nil {
1477		return
1478	}
1479	var azf azure.Future
1480	azf, err = azure.NewFutureFromResponse(resp)
1481	future.FutureAPI = &azf
1482	future.Result = future.result
1483	return
1484}
1485
1486// CreateInstanceMSDeployOperationSlotResponder handles the response to the CreateInstanceMSDeployOperationSlot request. The method always
1487// closes the http.Response Body.
1488func (client AppsClient) CreateInstanceMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
1489	err = autorest.Respond(
1490		resp,
1491		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1492		autorest.ByUnmarshallingJSON(&result),
1493		autorest.ByClosing())
1494	result.Response = autorest.Response{Response: resp}
1495	return
1496}
1497
1498// CreateMSDeployOperation description for Invoke the MSDeploy web app extension.
1499// Parameters:
1500// resourceGroupName - name of the resource group to which the resource belongs.
1501// name - name of web app.
1502// mSDeploy - details of MSDeploy operation
1503func (client AppsClient) CreateMSDeployOperation(ctx context.Context, resourceGroupName string, name string, mSDeploy MSDeploy) (result AppsCreateMSDeployOperationFuture, err error) {
1504	if tracing.IsEnabled() {
1505		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateMSDeployOperation")
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}}}}); err != nil {
1519		return result, validation.NewError("web.AppsClient", "CreateMSDeployOperation", err.Error())
1520	}
1521
1522	req, err := client.CreateMSDeployOperationPreparer(ctx, resourceGroupName, name, mSDeploy)
1523	if err != nil {
1524		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure preparing request")
1525		return
1526	}
1527
1528	result, err = client.CreateMSDeployOperationSender(req)
1529	if err != nil {
1530		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure sending request")
1531		return
1532	}
1533
1534	return
1535}
1536
1537// CreateMSDeployOperationPreparer prepares the CreateMSDeployOperation request.
1538func (client AppsClient) CreateMSDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string, mSDeploy MSDeploy) (*http.Request, error) {
1539	pathParameters := map[string]interface{}{
1540		"name":              autorest.Encode("path", name),
1541		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1542		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1543	}
1544
1545	const APIVersion = "2021-01-15"
1546	queryParameters := map[string]interface{}{
1547		"api-version": APIVersion,
1548	}
1549
1550	preparer := autorest.CreatePreparer(
1551		autorest.AsContentType("application/json; charset=utf-8"),
1552		autorest.AsPut(),
1553		autorest.WithBaseURL(client.BaseURI),
1554		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters),
1555		autorest.WithJSON(mSDeploy),
1556		autorest.WithQueryParameters(queryParameters))
1557	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1558}
1559
1560// CreateMSDeployOperationSender sends the CreateMSDeployOperation request. The method will close the
1561// http.Response Body if it receives an error.
1562func (client AppsClient) CreateMSDeployOperationSender(req *http.Request) (future AppsCreateMSDeployOperationFuture, err error) {
1563	var resp *http.Response
1564	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1565	if err != nil {
1566		return
1567	}
1568	var azf azure.Future
1569	azf, err = azure.NewFutureFromResponse(resp)
1570	future.FutureAPI = &azf
1571	future.Result = future.result
1572	return
1573}
1574
1575// CreateMSDeployOperationResponder handles the response to the CreateMSDeployOperation request. The method always
1576// closes the http.Response Body.
1577func (client AppsClient) CreateMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) {
1578	err = autorest.Respond(
1579		resp,
1580		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1581		autorest.ByUnmarshallingJSON(&result),
1582		autorest.ByClosing())
1583	result.Response = autorest.Response{Response: resp}
1584	return
1585}
1586
1587// CreateMSDeployOperationSlot description for Invoke the MSDeploy web app extension.
1588// Parameters:
1589// resourceGroupName - name of the resource group to which the resource belongs.
1590// name - name of web app.
1591// slot - name of web app slot. If not specified then will default to production slot.
1592// mSDeploy - details of MSDeploy operation
1593func (client AppsClient) CreateMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, mSDeploy MSDeploy) (result AppsCreateMSDeployOperationSlotFuture, err error) {
1594	if tracing.IsEnabled() {
1595		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateMSDeployOperationSlot")
1596		defer func() {
1597			sc := -1
1598			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1599				sc = result.FutureAPI.Response().StatusCode
1600			}
1601			tracing.EndSpan(ctx, sc, err)
1602		}()
1603	}
1604	if err := validation.Validate([]validation.Validation{
1605		{TargetValue: resourceGroupName,
1606			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1607				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1608				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1609		return result, validation.NewError("web.AppsClient", "CreateMSDeployOperationSlot", err.Error())
1610	}
1611
1612	req, err := client.CreateMSDeployOperationSlotPreparer(ctx, resourceGroupName, name, slot, mSDeploy)
1613	if err != nil {
1614		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure preparing request")
1615		return
1616	}
1617
1618	result, err = client.CreateMSDeployOperationSlotSender(req)
1619	if err != nil {
1620		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure sending request")
1621		return
1622	}
1623
1624	return
1625}
1626
1627// CreateMSDeployOperationSlotPreparer prepares the CreateMSDeployOperationSlot request.
1628func (client AppsClient) CreateMSDeployOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, mSDeploy MSDeploy) (*http.Request, error) {
1629	pathParameters := map[string]interface{}{
1630		"name":              autorest.Encode("path", name),
1631		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1632		"slot":              autorest.Encode("path", slot),
1633		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1634	}
1635
1636	const APIVersion = "2021-01-15"
1637	queryParameters := map[string]interface{}{
1638		"api-version": APIVersion,
1639	}
1640
1641	preparer := autorest.CreatePreparer(
1642		autorest.AsContentType("application/json; charset=utf-8"),
1643		autorest.AsPut(),
1644		autorest.WithBaseURL(client.BaseURI),
1645		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters),
1646		autorest.WithJSON(mSDeploy),
1647		autorest.WithQueryParameters(queryParameters))
1648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1649}
1650
1651// CreateMSDeployOperationSlotSender sends the CreateMSDeployOperationSlot request. The method will close the
1652// http.Response Body if it receives an error.
1653func (client AppsClient) CreateMSDeployOperationSlotSender(req *http.Request) (future AppsCreateMSDeployOperationSlotFuture, err error) {
1654	var resp *http.Response
1655	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1656	if err != nil {
1657		return
1658	}
1659	var azf azure.Future
1660	azf, err = azure.NewFutureFromResponse(resp)
1661	future.FutureAPI = &azf
1662	future.Result = future.result
1663	return
1664}
1665
1666// CreateMSDeployOperationSlotResponder handles the response to the CreateMSDeployOperationSlot request. The method always
1667// closes the http.Response Body.
1668func (client AppsClient) CreateMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
1669	err = autorest.Respond(
1670		resp,
1671		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1672		autorest.ByUnmarshallingJSON(&result),
1673		autorest.ByClosing())
1674	result.Response = autorest.Response{Response: resp}
1675	return
1676}
1677
1678// CreateOrUpdate description for Creates a new web, mobile, or API app in an existing resource group, or updates an
1679// existing app.
1680// Parameters:
1681// resourceGroupName - name of the resource group to which the resource belongs.
1682// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
1683// parameter.
1684// siteEnvelope - a JSON representation of the app properties. See example.
1685func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site) (result AppsCreateOrUpdateFuture, err error) {
1686	if tracing.IsEnabled() {
1687		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdate")
1688		defer func() {
1689			sc := -1
1690			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1691				sc = result.FutureAPI.Response().StatusCode
1692			}
1693			tracing.EndSpan(ctx, sc, err)
1694		}()
1695	}
1696	if err := validation.Validate([]validation.Validation{
1697		{TargetValue: resourceGroupName,
1698			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1699				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1700				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1701		{TargetValue: siteEnvelope,
1702			Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false,
1703				Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false,
1704					Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false,
1705						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1706							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1707						}},
1708						{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
1709							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1710								{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1711							}},
1712						{Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false,
1713							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}},
1714						{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false,
1715							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil},
1716								{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1717							}},
1718					}},
1719					{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false,
1720						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}},
1721				}}}}}); err != nil {
1722		return result, validation.NewError("web.AppsClient", "CreateOrUpdate", err.Error())
1723	}
1724
1725	req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, siteEnvelope)
1726	if err != nil {
1727		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdate", nil, "Failure preparing request")
1728		return
1729	}
1730
1731	result, err = client.CreateOrUpdateSender(req)
1732	if err != nil {
1733		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdate", nil, "Failure sending request")
1734		return
1735	}
1736
1737	return
1738}
1739
1740// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
1741func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site) (*http.Request, error) {
1742	pathParameters := map[string]interface{}{
1743		"name":              autorest.Encode("path", name),
1744		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1745		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1746	}
1747
1748	const APIVersion = "2021-01-15"
1749	queryParameters := map[string]interface{}{
1750		"api-version": APIVersion,
1751	}
1752
1753	preparer := autorest.CreatePreparer(
1754		autorest.AsContentType("application/json; charset=utf-8"),
1755		autorest.AsPut(),
1756		autorest.WithBaseURL(client.BaseURI),
1757		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
1758		autorest.WithJSON(siteEnvelope),
1759		autorest.WithQueryParameters(queryParameters))
1760	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1761}
1762
1763// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
1764// http.Response Body if it receives an error.
1765func (client AppsClient) CreateOrUpdateSender(req *http.Request) (future AppsCreateOrUpdateFuture, err error) {
1766	var resp *http.Response
1767	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1768	if err != nil {
1769		return
1770	}
1771	var azf azure.Future
1772	azf, err = azure.NewFutureFromResponse(resp)
1773	future.FutureAPI = &azf
1774	future.Result = future.result
1775	return
1776}
1777
1778// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
1779// closes the http.Response Body.
1780func (client AppsClient) CreateOrUpdateResponder(resp *http.Response) (result Site, err error) {
1781	err = autorest.Respond(
1782		resp,
1783		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
1784		autorest.ByUnmarshallingJSON(&result),
1785		autorest.ByClosing())
1786	result.Response = autorest.Response{Response: resp}
1787	return
1788}
1789
1790// CreateOrUpdateConfiguration description for Updates the configuration of an app.
1791// Parameters:
1792// resourceGroupName - name of the resource group to which the resource belongs.
1793// name - name of the app.
1794// siteConfig - JSON representation of a SiteConfig object. See example.
1795func (client AppsClient) CreateOrUpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) {
1796	if tracing.IsEnabled() {
1797		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateConfiguration")
1798		defer func() {
1799			sc := -1
1800			if result.Response.Response != nil {
1801				sc = result.Response.Response.StatusCode
1802			}
1803			tracing.EndSpan(ctx, sc, err)
1804		}()
1805	}
1806	if err := validation.Validate([]validation.Validation{
1807		{TargetValue: resourceGroupName,
1808			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1809				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1810				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1811		{TargetValue: siteConfig,
1812			Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false,
1813				Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false,
1814					Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1815						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1816					}},
1817					{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
1818						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1819							{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1820						}},
1821					{Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false,
1822						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}},
1823					{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false,
1824						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil},
1825							{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1826						}},
1827				}}}}}); err != nil {
1828		return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfiguration", err.Error())
1829	}
1830
1831	req, err := client.CreateOrUpdateConfigurationPreparer(ctx, resourceGroupName, name, siteConfig)
1832	if err != nil {
1833		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", nil, "Failure preparing request")
1834		return
1835	}
1836
1837	resp, err := client.CreateOrUpdateConfigurationSender(req)
1838	if err != nil {
1839		result.Response = autorest.Response{Response: resp}
1840		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", resp, "Failure sending request")
1841		return
1842	}
1843
1844	result, err = client.CreateOrUpdateConfigurationResponder(resp)
1845	if err != nil {
1846		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", resp, "Failure responding to request")
1847		return
1848	}
1849
1850	return
1851}
1852
1853// CreateOrUpdateConfigurationPreparer prepares the CreateOrUpdateConfiguration request.
1854func (client AppsClient) CreateOrUpdateConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (*http.Request, error) {
1855	pathParameters := map[string]interface{}{
1856		"name":              autorest.Encode("path", name),
1857		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1858		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1859	}
1860
1861	const APIVersion = "2021-01-15"
1862	queryParameters := map[string]interface{}{
1863		"api-version": APIVersion,
1864	}
1865
1866	preparer := autorest.CreatePreparer(
1867		autorest.AsContentType("application/json; charset=utf-8"),
1868		autorest.AsPut(),
1869		autorest.WithBaseURL(client.BaseURI),
1870		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
1871		autorest.WithJSON(siteConfig),
1872		autorest.WithQueryParameters(queryParameters))
1873	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1874}
1875
1876// CreateOrUpdateConfigurationSender sends the CreateOrUpdateConfiguration request. The method will close the
1877// http.Response Body if it receives an error.
1878func (client AppsClient) CreateOrUpdateConfigurationSender(req *http.Request) (*http.Response, error) {
1879	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1880}
1881
1882// CreateOrUpdateConfigurationResponder handles the response to the CreateOrUpdateConfiguration request. The method always
1883// closes the http.Response Body.
1884func (client AppsClient) CreateOrUpdateConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
1885	err = autorest.Respond(
1886		resp,
1887		azure.WithErrorUnlessStatusCode(http.StatusOK),
1888		autorest.ByUnmarshallingJSON(&result),
1889		autorest.ByClosing())
1890	result.Response = autorest.Response{Response: resp}
1891	return
1892}
1893
1894// CreateOrUpdateConfigurationSlot description for Updates the configuration of an app.
1895// Parameters:
1896// resourceGroupName - name of the resource group to which the resource belongs.
1897// name - name of the app.
1898// siteConfig - JSON representation of a SiteConfig object. See example.
1899// slot - name of the deployment slot. If a slot is not specified, the API will update configuration for the
1900// production slot.
1901func (client AppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) {
1902	if tracing.IsEnabled() {
1903		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateConfigurationSlot")
1904		defer func() {
1905			sc := -1
1906			if result.Response.Response != nil {
1907				sc = result.Response.Response.StatusCode
1908			}
1909			tracing.EndSpan(ctx, sc, err)
1910		}()
1911	}
1912	if err := validation.Validate([]validation.Validation{
1913		{TargetValue: resourceGroupName,
1914			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1915				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1916				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1917		{TargetValue: siteConfig,
1918			Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false,
1919				Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false,
1920					Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1921						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1922					}},
1923					{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
1924						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1925							{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1926						}},
1927					{Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false,
1928						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}},
1929					{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false,
1930						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil},
1931							{Target: "siteConfig.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1932						}},
1933				}}}}}); err != nil {
1934		return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfigurationSlot", err.Error())
1935	}
1936
1937	req, err := client.CreateOrUpdateConfigurationSlotPreparer(ctx, resourceGroupName, name, siteConfig, slot)
1938	if err != nil {
1939		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", nil, "Failure preparing request")
1940		return
1941	}
1942
1943	resp, err := client.CreateOrUpdateConfigurationSlotSender(req)
1944	if err != nil {
1945		result.Response = autorest.Response{Response: resp}
1946		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", resp, "Failure sending request")
1947		return
1948	}
1949
1950	result, err = client.CreateOrUpdateConfigurationSlotResponder(resp)
1951	if err != nil {
1952		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", resp, "Failure responding to request")
1953		return
1954	}
1955
1956	return
1957}
1958
1959// CreateOrUpdateConfigurationSlotPreparer prepares the CreateOrUpdateConfigurationSlot request.
1960func (client AppsClient) CreateOrUpdateConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (*http.Request, error) {
1961	pathParameters := map[string]interface{}{
1962		"name":              autorest.Encode("path", name),
1963		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1964		"slot":              autorest.Encode("path", slot),
1965		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1966	}
1967
1968	const APIVersion = "2021-01-15"
1969	queryParameters := map[string]interface{}{
1970		"api-version": APIVersion,
1971	}
1972
1973	preparer := autorest.CreatePreparer(
1974		autorest.AsContentType("application/json; charset=utf-8"),
1975		autorest.AsPut(),
1976		autorest.WithBaseURL(client.BaseURI),
1977		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
1978		autorest.WithJSON(siteConfig),
1979		autorest.WithQueryParameters(queryParameters))
1980	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1981}
1982
1983// CreateOrUpdateConfigurationSlotSender sends the CreateOrUpdateConfigurationSlot request. The method will close the
1984// http.Response Body if it receives an error.
1985func (client AppsClient) CreateOrUpdateConfigurationSlotSender(req *http.Request) (*http.Response, error) {
1986	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1987}
1988
1989// CreateOrUpdateConfigurationSlotResponder handles the response to the CreateOrUpdateConfigurationSlot request. The method always
1990// closes the http.Response Body.
1991func (client AppsClient) CreateOrUpdateConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
1992	err = autorest.Respond(
1993		resp,
1994		azure.WithErrorUnlessStatusCode(http.StatusOK),
1995		autorest.ByUnmarshallingJSON(&result),
1996		autorest.ByClosing())
1997	result.Response = autorest.Response{Response: resp}
1998	return
1999}
2000
2001// CreateOrUpdateDomainOwnershipIdentifier description for Creates a domain ownership identifier for web app, or
2002// updates an existing ownership identifier.
2003// Parameters:
2004// resourceGroupName - name of the resource group to which the resource belongs.
2005// name - name of the app.
2006// domainOwnershipIdentifierName - name of domain ownership identifier.
2007// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
2008func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) {
2009	if tracing.IsEnabled() {
2010		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateDomainOwnershipIdentifier")
2011		defer func() {
2012			sc := -1
2013			if result.Response.Response != nil {
2014				sc = result.Response.Response.StatusCode
2015			}
2016			tracing.EndSpan(ctx, sc, err)
2017		}()
2018	}
2019	if err := validation.Validate([]validation.Validation{
2020		{TargetValue: resourceGroupName,
2021			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2022				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2023				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2024		return result, validation.NewError("web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", err.Error())
2025	}
2026
2027	req, err := client.CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier)
2028	if err != nil {
2029		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", nil, "Failure preparing request")
2030		return
2031	}
2032
2033	resp, err := client.CreateOrUpdateDomainOwnershipIdentifierSender(req)
2034	if err != nil {
2035		result.Response = autorest.Response{Response: resp}
2036		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", resp, "Failure sending request")
2037		return
2038	}
2039
2040	result, err = client.CreateOrUpdateDomainOwnershipIdentifierResponder(resp)
2041	if err != nil {
2042		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", resp, "Failure responding to request")
2043		return
2044	}
2045
2046	return
2047}
2048
2049// CreateOrUpdateDomainOwnershipIdentifierPreparer prepares the CreateOrUpdateDomainOwnershipIdentifier request.
2050func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (*http.Request, error) {
2051	pathParameters := map[string]interface{}{
2052		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
2053		"name":                          autorest.Encode("path", name),
2054		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
2055		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
2056	}
2057
2058	const APIVersion = "2021-01-15"
2059	queryParameters := map[string]interface{}{
2060		"api-version": APIVersion,
2061	}
2062
2063	preparer := autorest.CreatePreparer(
2064		autorest.AsContentType("application/json; charset=utf-8"),
2065		autorest.AsPut(),
2066		autorest.WithBaseURL(client.BaseURI),
2067		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
2068		autorest.WithJSON(domainOwnershipIdentifier),
2069		autorest.WithQueryParameters(queryParameters))
2070	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2071}
2072
2073// CreateOrUpdateDomainOwnershipIdentifierSender sends the CreateOrUpdateDomainOwnershipIdentifier request. The method will close the
2074// http.Response Body if it receives an error.
2075func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
2076	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2077}
2078
2079// CreateOrUpdateDomainOwnershipIdentifierResponder handles the response to the CreateOrUpdateDomainOwnershipIdentifier request. The method always
2080// closes the http.Response Body.
2081func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
2082	err = autorest.Respond(
2083		resp,
2084		azure.WithErrorUnlessStatusCode(http.StatusOK),
2085		autorest.ByUnmarshallingJSON(&result),
2086		autorest.ByClosing())
2087	result.Response = autorest.Response{Response: resp}
2088	return
2089}
2090
2091// CreateOrUpdateDomainOwnershipIdentifierSlot description for Creates a domain ownership identifier for web app, or
2092// updates an existing ownership identifier.
2093// Parameters:
2094// resourceGroupName - name of the resource group to which the resource belongs.
2095// name - name of the app.
2096// domainOwnershipIdentifierName - name of domain ownership identifier.
2097// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
2098// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
2099// production slot.
2100func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) {
2101	if tracing.IsEnabled() {
2102		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot")
2103		defer func() {
2104			sc := -1
2105			if result.Response.Response != nil {
2106				sc = result.Response.Response.StatusCode
2107			}
2108			tracing.EndSpan(ctx, sc, err)
2109		}()
2110	}
2111	if err := validation.Validate([]validation.Validation{
2112		{TargetValue: resourceGroupName,
2113			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2114				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2115				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2116		return result, validation.NewError("web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", err.Error())
2117	}
2118
2119	req, err := client.CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot)
2120	if err != nil {
2121		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
2122		return
2123	}
2124
2125	resp, err := client.CreateOrUpdateDomainOwnershipIdentifierSlotSender(req)
2126	if err != nil {
2127		result.Response = autorest.Response{Response: resp}
2128		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", resp, "Failure sending request")
2129		return
2130	}
2131
2132	result, err = client.CreateOrUpdateDomainOwnershipIdentifierSlotResponder(resp)
2133	if err != nil {
2134		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
2135		return
2136	}
2137
2138	return
2139}
2140
2141// CreateOrUpdateDomainOwnershipIdentifierSlotPreparer prepares the CreateOrUpdateDomainOwnershipIdentifierSlot request.
2142func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (*http.Request, error) {
2143	pathParameters := map[string]interface{}{
2144		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
2145		"name":                          autorest.Encode("path", name),
2146		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
2147		"slot":                          autorest.Encode("path", slot),
2148		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
2149	}
2150
2151	const APIVersion = "2021-01-15"
2152	queryParameters := map[string]interface{}{
2153		"api-version": APIVersion,
2154	}
2155
2156	preparer := autorest.CreatePreparer(
2157		autorest.AsContentType("application/json; charset=utf-8"),
2158		autorest.AsPut(),
2159		autorest.WithBaseURL(client.BaseURI),
2160		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
2161		autorest.WithJSON(domainOwnershipIdentifier),
2162		autorest.WithQueryParameters(queryParameters))
2163	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2164}
2165
2166// CreateOrUpdateDomainOwnershipIdentifierSlotSender sends the CreateOrUpdateDomainOwnershipIdentifierSlot request. The method will close the
2167// http.Response Body if it receives an error.
2168func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
2169	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2170}
2171
2172// CreateOrUpdateDomainOwnershipIdentifierSlotResponder handles the response to the CreateOrUpdateDomainOwnershipIdentifierSlot request. The method always
2173// closes the http.Response Body.
2174func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
2175	err = autorest.Respond(
2176		resp,
2177		azure.WithErrorUnlessStatusCode(http.StatusOK),
2178		autorest.ByUnmarshallingJSON(&result),
2179		autorest.ByClosing())
2180	result.Response = autorest.Response{Response: resp}
2181	return
2182}
2183
2184// CreateOrUpdateFunctionSecret description for Add or update a function secret.
2185// Parameters:
2186// resourceGroupName - name of the resource group to which the resource belongs.
2187// name - site name.
2188// functionName - the name of the function.
2189// keyName - the name of the key.
2190// key - the key to create or update
2191func (client AppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (result KeyInfo, err error) {
2192	if tracing.IsEnabled() {
2193		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecret")
2194		defer func() {
2195			sc := -1
2196			if result.Response.Response != nil {
2197				sc = result.Response.Response.StatusCode
2198			}
2199			tracing.EndSpan(ctx, sc, err)
2200		}()
2201	}
2202	if err := validation.Validate([]validation.Validation{
2203		{TargetValue: resourceGroupName,
2204			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2205				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2206				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2207		return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecret", err.Error())
2208	}
2209
2210	req, err := client.CreateOrUpdateFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName, key)
2211	if err != nil {
2212		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", nil, "Failure preparing request")
2213		return
2214	}
2215
2216	resp, err := client.CreateOrUpdateFunctionSecretSender(req)
2217	if err != nil {
2218		result.Response = autorest.Response{Response: resp}
2219		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure sending request")
2220		return
2221	}
2222
2223	result, err = client.CreateOrUpdateFunctionSecretResponder(resp)
2224	if err != nil {
2225		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure responding to request")
2226		return
2227	}
2228
2229	return
2230}
2231
2232// CreateOrUpdateFunctionSecretPreparer prepares the CreateOrUpdateFunctionSecret request.
2233func (client AppsClient) CreateOrUpdateFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (*http.Request, error) {
2234	pathParameters := map[string]interface{}{
2235		"functionName":      autorest.Encode("path", functionName),
2236		"keyName":           autorest.Encode("path", keyName),
2237		"name":              autorest.Encode("path", name),
2238		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2239		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2240	}
2241
2242	const APIVersion = "2021-01-15"
2243	queryParameters := map[string]interface{}{
2244		"api-version": APIVersion,
2245	}
2246
2247	preparer := autorest.CreatePreparer(
2248		autorest.AsContentType("application/json; charset=utf-8"),
2249		autorest.AsPut(),
2250		autorest.WithBaseURL(client.BaseURI),
2251		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters),
2252		autorest.WithJSON(key),
2253		autorest.WithQueryParameters(queryParameters))
2254	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2255}
2256
2257// CreateOrUpdateFunctionSecretSender sends the CreateOrUpdateFunctionSecret request. The method will close the
2258// http.Response Body if it receives an error.
2259func (client AppsClient) CreateOrUpdateFunctionSecretSender(req *http.Request) (*http.Response, error) {
2260	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2261}
2262
2263// CreateOrUpdateFunctionSecretResponder handles the response to the CreateOrUpdateFunctionSecret request. The method always
2264// closes the http.Response Body.
2265func (client AppsClient) CreateOrUpdateFunctionSecretResponder(resp *http.Response) (result KeyInfo, err error) {
2266	err = autorest.Respond(
2267		resp,
2268		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2269		autorest.ByUnmarshallingJSON(&result),
2270		autorest.ByClosing())
2271	result.Response = autorest.Response{Response: resp}
2272	return
2273}
2274
2275// CreateOrUpdateFunctionSecretSlot description for Add or update a function secret.
2276// Parameters:
2277// resourceGroupName - name of the resource group to which the resource belongs.
2278// name - site name.
2279// functionName - the name of the function.
2280// keyName - the name of the key.
2281// slot - name of the deployment slot.
2282// key - the key to create or update
2283func (client AppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) {
2284	if tracing.IsEnabled() {
2285		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecretSlot")
2286		defer func() {
2287			sc := -1
2288			if result.Response.Response != nil {
2289				sc = result.Response.Response.StatusCode
2290			}
2291			tracing.EndSpan(ctx, sc, err)
2292		}()
2293	}
2294	if err := validation.Validate([]validation.Validation{
2295		{TargetValue: resourceGroupName,
2296			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2297				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2298				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2299		return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecretSlot", err.Error())
2300	}
2301
2302	req, err := client.CreateOrUpdateFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot, key)
2303	if err != nil {
2304		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", nil, "Failure preparing request")
2305		return
2306	}
2307
2308	resp, err := client.CreateOrUpdateFunctionSecretSlotSender(req)
2309	if err != nil {
2310		result.Response = autorest.Response{Response: resp}
2311		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure sending request")
2312		return
2313	}
2314
2315	result, err = client.CreateOrUpdateFunctionSecretSlotResponder(resp)
2316	if err != nil {
2317		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure responding to request")
2318		return
2319	}
2320
2321	return
2322}
2323
2324// CreateOrUpdateFunctionSecretSlotPreparer prepares the CreateOrUpdateFunctionSecretSlot request.
2325func (client AppsClient) CreateOrUpdateFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (*http.Request, error) {
2326	pathParameters := map[string]interface{}{
2327		"functionName":      autorest.Encode("path", functionName),
2328		"keyName":           autorest.Encode("path", keyName),
2329		"name":              autorest.Encode("path", name),
2330		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2331		"slot":              autorest.Encode("path", slot),
2332		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2333	}
2334
2335	const APIVersion = "2021-01-15"
2336	queryParameters := map[string]interface{}{
2337		"api-version": APIVersion,
2338	}
2339
2340	preparer := autorest.CreatePreparer(
2341		autorest.AsContentType("application/json; charset=utf-8"),
2342		autorest.AsPut(),
2343		autorest.WithBaseURL(client.BaseURI),
2344		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters),
2345		autorest.WithJSON(key),
2346		autorest.WithQueryParameters(queryParameters))
2347	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2348}
2349
2350// CreateOrUpdateFunctionSecretSlotSender sends the CreateOrUpdateFunctionSecretSlot request. The method will close the
2351// http.Response Body if it receives an error.
2352func (client AppsClient) CreateOrUpdateFunctionSecretSlotSender(req *http.Request) (*http.Response, error) {
2353	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2354}
2355
2356// CreateOrUpdateFunctionSecretSlotResponder handles the response to the CreateOrUpdateFunctionSecretSlot request. The method always
2357// closes the http.Response Body.
2358func (client AppsClient) CreateOrUpdateFunctionSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) {
2359	err = autorest.Respond(
2360		resp,
2361		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2362		autorest.ByUnmarshallingJSON(&result),
2363		autorest.ByClosing())
2364	result.Response = autorest.Response{Response: resp}
2365	return
2366}
2367
2368// CreateOrUpdateHostNameBinding description for Creates a hostname binding for an app.
2369// Parameters:
2370// resourceGroupName - name of the resource group to which the resource belongs.
2371// name - name of the app.
2372// hostName - hostname in the hostname binding.
2373// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object.
2374func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) {
2375	if tracing.IsEnabled() {
2376		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding")
2377		defer func() {
2378			sc := -1
2379			if result.Response.Response != nil {
2380				sc = result.Response.Response.StatusCode
2381			}
2382			tracing.EndSpan(ctx, sc, err)
2383		}()
2384	}
2385	if err := validation.Validate([]validation.Validation{
2386		{TargetValue: resourceGroupName,
2387			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2388				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2389				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2390		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBinding", err.Error())
2391	}
2392
2393	req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding)
2394	if err != nil {
2395		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request")
2396		return
2397	}
2398
2399	resp, err := client.CreateOrUpdateHostNameBindingSender(req)
2400	if err != nil {
2401		result.Response = autorest.Response{Response: resp}
2402		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request")
2403		return
2404	}
2405
2406	result, err = client.CreateOrUpdateHostNameBindingResponder(resp)
2407	if err != nil {
2408		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request")
2409		return
2410	}
2411
2412	return
2413}
2414
2415// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request.
2416func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) {
2417	pathParameters := map[string]interface{}{
2418		"hostName":          autorest.Encode("path", hostName),
2419		"name":              autorest.Encode("path", name),
2420		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2421		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2422	}
2423
2424	const APIVersion = "2021-01-15"
2425	queryParameters := map[string]interface{}{
2426		"api-version": APIVersion,
2427	}
2428
2429	preparer := autorest.CreatePreparer(
2430		autorest.AsContentType("application/json; charset=utf-8"),
2431		autorest.AsPut(),
2432		autorest.WithBaseURL(client.BaseURI),
2433		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
2434		autorest.WithJSON(hostNameBinding),
2435		autorest.WithQueryParameters(queryParameters))
2436	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2437}
2438
2439// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the
2440// http.Response Body if it receives an error.
2441func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) {
2442	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2443}
2444
2445// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always
2446// closes the http.Response Body.
2447func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) {
2448	err = autorest.Respond(
2449		resp,
2450		azure.WithErrorUnlessStatusCode(http.StatusOK),
2451		autorest.ByUnmarshallingJSON(&result),
2452		autorest.ByClosing())
2453	result.Response = autorest.Response{Response: resp}
2454	return
2455}
2456
2457// CreateOrUpdateHostNameBindingSlot description for Creates a hostname binding for an app.
2458// Parameters:
2459// resourceGroupName - name of the resource group to which the resource belongs.
2460// name - name of the app.
2461// hostName - hostname in the hostname binding.
2462// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object.
2463// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the
2464// production slot.
2465func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) {
2466	if tracing.IsEnabled() {
2467		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot")
2468		defer func() {
2469			sc := -1
2470			if result.Response.Response != nil {
2471				sc = result.Response.Response.StatusCode
2472			}
2473			tracing.EndSpan(ctx, sc, err)
2474		}()
2475	}
2476	if err := validation.Validate([]validation.Validation{
2477		{TargetValue: resourceGroupName,
2478			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2479				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2480				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2481		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBindingSlot", err.Error())
2482	}
2483
2484	req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot)
2485	if err != nil {
2486		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request")
2487		return
2488	}
2489
2490	resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req)
2491	if err != nil {
2492		result.Response = autorest.Response{Response: resp}
2493		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request")
2494		return
2495	}
2496
2497	result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp)
2498	if err != nil {
2499		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request")
2500		return
2501	}
2502
2503	return
2504}
2505
2506// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request.
2507func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) {
2508	pathParameters := map[string]interface{}{
2509		"hostName":          autorest.Encode("path", hostName),
2510		"name":              autorest.Encode("path", name),
2511		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2512		"slot":              autorest.Encode("path", slot),
2513		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2514	}
2515
2516	const APIVersion = "2021-01-15"
2517	queryParameters := map[string]interface{}{
2518		"api-version": APIVersion,
2519	}
2520
2521	preparer := autorest.CreatePreparer(
2522		autorest.AsContentType("application/json; charset=utf-8"),
2523		autorest.AsPut(),
2524		autorest.WithBaseURL(client.BaseURI),
2525		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
2526		autorest.WithJSON(hostNameBinding),
2527		autorest.WithQueryParameters(queryParameters))
2528	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2529}
2530
2531// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the
2532// http.Response Body if it receives an error.
2533func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
2534	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2535}
2536
2537// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always
2538// closes the http.Response Body.
2539func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) {
2540	err = autorest.Respond(
2541		resp,
2542		azure.WithErrorUnlessStatusCode(http.StatusOK),
2543		autorest.ByUnmarshallingJSON(&result),
2544		autorest.ByClosing())
2545	result.Response = autorest.Response{Response: resp}
2546	return
2547}
2548
2549// CreateOrUpdateHostSecret description for Add or update a host level secret.
2550// Parameters:
2551// resourceGroupName - name of the resource group to which the resource belongs.
2552// name - site name.
2553// keyType - the type of host key.
2554// keyName - the name of the key.
2555// key - the key to create or update
2556func (client AppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (result KeyInfo, err error) {
2557	if tracing.IsEnabled() {
2558		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecret")
2559		defer func() {
2560			sc := -1
2561			if result.Response.Response != nil {
2562				sc = result.Response.Response.StatusCode
2563			}
2564			tracing.EndSpan(ctx, sc, err)
2565		}()
2566	}
2567	if err := validation.Validate([]validation.Validation{
2568		{TargetValue: resourceGroupName,
2569			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2570				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2571				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2572		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecret", err.Error())
2573	}
2574
2575	req, err := client.CreateOrUpdateHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName, key)
2576	if err != nil {
2577		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", nil, "Failure preparing request")
2578		return
2579	}
2580
2581	resp, err := client.CreateOrUpdateHostSecretSender(req)
2582	if err != nil {
2583		result.Response = autorest.Response{Response: resp}
2584		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure sending request")
2585		return
2586	}
2587
2588	result, err = client.CreateOrUpdateHostSecretResponder(resp)
2589	if err != nil {
2590		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure responding to request")
2591		return
2592	}
2593
2594	return
2595}
2596
2597// CreateOrUpdateHostSecretPreparer prepares the CreateOrUpdateHostSecret request.
2598func (client AppsClient) CreateOrUpdateHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (*http.Request, error) {
2599	pathParameters := map[string]interface{}{
2600		"keyName":           autorest.Encode("path", keyName),
2601		"keyType":           autorest.Encode("path", keyType),
2602		"name":              autorest.Encode("path", name),
2603		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2604		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2605	}
2606
2607	const APIVersion = "2021-01-15"
2608	queryParameters := map[string]interface{}{
2609		"api-version": APIVersion,
2610	}
2611
2612	preparer := autorest.CreatePreparer(
2613		autorest.AsContentType("application/json; charset=utf-8"),
2614		autorest.AsPut(),
2615		autorest.WithBaseURL(client.BaseURI),
2616		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters),
2617		autorest.WithJSON(key),
2618		autorest.WithQueryParameters(queryParameters))
2619	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2620}
2621
2622// CreateOrUpdateHostSecretSender sends the CreateOrUpdateHostSecret request. The method will close the
2623// http.Response Body if it receives an error.
2624func (client AppsClient) CreateOrUpdateHostSecretSender(req *http.Request) (*http.Response, error) {
2625	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2626}
2627
2628// CreateOrUpdateHostSecretResponder handles the response to the CreateOrUpdateHostSecret request. The method always
2629// closes the http.Response Body.
2630func (client AppsClient) CreateOrUpdateHostSecretResponder(resp *http.Response) (result KeyInfo, err error) {
2631	err = autorest.Respond(
2632		resp,
2633		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2634		autorest.ByUnmarshallingJSON(&result),
2635		autorest.ByClosing())
2636	result.Response = autorest.Response{Response: resp}
2637	return
2638}
2639
2640// CreateOrUpdateHostSecretSlot description for Add or update a host level secret.
2641// Parameters:
2642// resourceGroupName - name of the resource group to which the resource belongs.
2643// name - site name.
2644// keyType - the type of host key.
2645// keyName - the name of the key.
2646// slot - name of the deployment slot.
2647// key - the key to create or update
2648func (client AppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) {
2649	if tracing.IsEnabled() {
2650		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecretSlot")
2651		defer func() {
2652			sc := -1
2653			if result.Response.Response != nil {
2654				sc = result.Response.Response.StatusCode
2655			}
2656			tracing.EndSpan(ctx, sc, err)
2657		}()
2658	}
2659	if err := validation.Validate([]validation.Validation{
2660		{TargetValue: resourceGroupName,
2661			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2662				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2663				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2664		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecretSlot", err.Error())
2665	}
2666
2667	req, err := client.CreateOrUpdateHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot, key)
2668	if err != nil {
2669		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", nil, "Failure preparing request")
2670		return
2671	}
2672
2673	resp, err := client.CreateOrUpdateHostSecretSlotSender(req)
2674	if err != nil {
2675		result.Response = autorest.Response{Response: resp}
2676		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure sending request")
2677		return
2678	}
2679
2680	result, err = client.CreateOrUpdateHostSecretSlotResponder(resp)
2681	if err != nil {
2682		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure responding to request")
2683		return
2684	}
2685
2686	return
2687}
2688
2689// CreateOrUpdateHostSecretSlotPreparer prepares the CreateOrUpdateHostSecretSlot request.
2690func (client AppsClient) CreateOrUpdateHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (*http.Request, error) {
2691	pathParameters := map[string]interface{}{
2692		"keyName":           autorest.Encode("path", keyName),
2693		"keyType":           autorest.Encode("path", keyType),
2694		"name":              autorest.Encode("path", name),
2695		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2696		"slot":              autorest.Encode("path", slot),
2697		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2698	}
2699
2700	const APIVersion = "2021-01-15"
2701	queryParameters := map[string]interface{}{
2702		"api-version": APIVersion,
2703	}
2704
2705	preparer := autorest.CreatePreparer(
2706		autorest.AsContentType("application/json; charset=utf-8"),
2707		autorest.AsPut(),
2708		autorest.WithBaseURL(client.BaseURI),
2709		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters),
2710		autorest.WithJSON(key),
2711		autorest.WithQueryParameters(queryParameters))
2712	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2713}
2714
2715// CreateOrUpdateHostSecretSlotSender sends the CreateOrUpdateHostSecretSlot request. The method will close the
2716// http.Response Body if it receives an error.
2717func (client AppsClient) CreateOrUpdateHostSecretSlotSender(req *http.Request) (*http.Response, error) {
2718	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2719}
2720
2721// CreateOrUpdateHostSecretSlotResponder handles the response to the CreateOrUpdateHostSecretSlot request. The method always
2722// closes the http.Response Body.
2723func (client AppsClient) CreateOrUpdateHostSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) {
2724	err = autorest.Respond(
2725		resp,
2726		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2727		autorest.ByUnmarshallingJSON(&result),
2728		autorest.ByClosing())
2729	result.Response = autorest.Response{Response: resp}
2730	return
2731}
2732
2733// CreateOrUpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay.
2734// Parameters:
2735// resourceGroupName - name of the resource group to which the resource belongs.
2736// name - the name of the web app.
2737// namespaceName - the namespace for this hybrid connection.
2738// relayName - the relay name for this hybrid connection.
2739// connectionEnvelope - the details of the hybrid connection.
2740func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) {
2741	if tracing.IsEnabled() {
2742		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection")
2743		defer func() {
2744			sc := -1
2745			if result.Response.Response != nil {
2746				sc = result.Response.Response.StatusCode
2747			}
2748			tracing.EndSpan(ctx, sc, err)
2749		}()
2750	}
2751	if err := validation.Validate([]validation.Validation{
2752		{TargetValue: resourceGroupName,
2753			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2754				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2755				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2756		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnection", err.Error())
2757	}
2758
2759	req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope)
2760	if err != nil {
2761		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request")
2762		return
2763	}
2764
2765	resp, err := client.CreateOrUpdateHybridConnectionSender(req)
2766	if err != nil {
2767		result.Response = autorest.Response{Response: resp}
2768		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request")
2769		return
2770	}
2771
2772	result, err = client.CreateOrUpdateHybridConnectionResponder(resp)
2773	if err != nil {
2774		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request")
2775		return
2776	}
2777
2778	return
2779}
2780
2781// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request.
2782func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) {
2783	pathParameters := map[string]interface{}{
2784		"name":              autorest.Encode("path", name),
2785		"namespaceName":     autorest.Encode("path", namespaceName),
2786		"relayName":         autorest.Encode("path", relayName),
2787		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2788		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2789	}
2790
2791	const APIVersion = "2021-01-15"
2792	queryParameters := map[string]interface{}{
2793		"api-version": APIVersion,
2794	}
2795
2796	preparer := autorest.CreatePreparer(
2797		autorest.AsContentType("application/json; charset=utf-8"),
2798		autorest.AsPut(),
2799		autorest.WithBaseURL(client.BaseURI),
2800		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
2801		autorest.WithJSON(connectionEnvelope),
2802		autorest.WithQueryParameters(queryParameters))
2803	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2804}
2805
2806// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the
2807// http.Response Body if it receives an error.
2808func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) {
2809	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2810}
2811
2812// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always
2813// closes the http.Response Body.
2814func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
2815	err = autorest.Respond(
2816		resp,
2817		azure.WithErrorUnlessStatusCode(http.StatusOK),
2818		autorest.ByUnmarshallingJSON(&result),
2819		autorest.ByClosing())
2820	result.Response = autorest.Response{Response: resp}
2821	return
2822}
2823
2824// CreateOrUpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay.
2825// Parameters:
2826// resourceGroupName - name of the resource group to which the resource belongs.
2827// name - the name of the web app.
2828// namespaceName - the namespace for this hybrid connection.
2829// relayName - the relay name for this hybrid connection.
2830// connectionEnvelope - the details of the hybrid connection.
2831// slot - the name of the slot for the web app.
2832func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) {
2833	if tracing.IsEnabled() {
2834		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot")
2835		defer func() {
2836			sc := -1
2837			if result.Response.Response != nil {
2838				sc = result.Response.Response.StatusCode
2839			}
2840			tracing.EndSpan(ctx, sc, err)
2841		}()
2842	}
2843	if err := validation.Validate([]validation.Validation{
2844		{TargetValue: resourceGroupName,
2845			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2846				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2847				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2848		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnectionSlot", err.Error())
2849	}
2850
2851	req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot)
2852	if err != nil {
2853		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request")
2854		return
2855	}
2856
2857	resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req)
2858	if err != nil {
2859		result.Response = autorest.Response{Response: resp}
2860		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request")
2861		return
2862	}
2863
2864	result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp)
2865	if err != nil {
2866		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request")
2867		return
2868	}
2869
2870	return
2871}
2872
2873// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request.
2874func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) {
2875	pathParameters := map[string]interface{}{
2876		"name":              autorest.Encode("path", name),
2877		"namespaceName":     autorest.Encode("path", namespaceName),
2878		"relayName":         autorest.Encode("path", relayName),
2879		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2880		"slot":              autorest.Encode("path", slot),
2881		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2882	}
2883
2884	const APIVersion = "2021-01-15"
2885	queryParameters := map[string]interface{}{
2886		"api-version": APIVersion,
2887	}
2888
2889	preparer := autorest.CreatePreparer(
2890		autorest.AsContentType("application/json; charset=utf-8"),
2891		autorest.AsPut(),
2892		autorest.WithBaseURL(client.BaseURI),
2893		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
2894		autorest.WithJSON(connectionEnvelope),
2895		autorest.WithQueryParameters(queryParameters))
2896	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2897}
2898
2899// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the
2900// http.Response Body if it receives an error.
2901func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
2902	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2903}
2904
2905// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always
2906// closes the http.Response Body.
2907func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
2908	err = autorest.Respond(
2909		resp,
2910		azure.WithErrorUnlessStatusCode(http.StatusOK),
2911		autorest.ByUnmarshallingJSON(&result),
2912		autorest.ByClosing())
2913	result.Response = autorest.Response{Response: resp}
2914	return
2915}
2916
2917// CreateOrUpdatePublicCertificate description for Creates a hostname binding for an app.
2918// Parameters:
2919// resourceGroupName - name of the resource group to which the resource belongs.
2920// name - name of the app.
2921// publicCertificateName - public certificate name.
2922// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate
2923// object.
2924func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) {
2925	if tracing.IsEnabled() {
2926		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate")
2927		defer func() {
2928			sc := -1
2929			if result.Response.Response != nil {
2930				sc = result.Response.Response.StatusCode
2931			}
2932			tracing.EndSpan(ctx, sc, err)
2933		}()
2934	}
2935	if err := validation.Validate([]validation.Validation{
2936		{TargetValue: resourceGroupName,
2937			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2938				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2939				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2940		return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificate", err.Error())
2941	}
2942
2943	req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate)
2944	if err != nil {
2945		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request")
2946		return
2947	}
2948
2949	resp, err := client.CreateOrUpdatePublicCertificateSender(req)
2950	if err != nil {
2951		result.Response = autorest.Response{Response: resp}
2952		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request")
2953		return
2954	}
2955
2956	result, err = client.CreateOrUpdatePublicCertificateResponder(resp)
2957	if err != nil {
2958		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request")
2959		return
2960	}
2961
2962	return
2963}
2964
2965// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request.
2966func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) {
2967	pathParameters := map[string]interface{}{
2968		"name":                  autorest.Encode("path", name),
2969		"publicCertificateName": autorest.Encode("path", publicCertificateName),
2970		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
2971		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
2972	}
2973
2974	const APIVersion = "2021-01-15"
2975	queryParameters := map[string]interface{}{
2976		"api-version": APIVersion,
2977	}
2978
2979	preparer := autorest.CreatePreparer(
2980		autorest.AsContentType("application/json; charset=utf-8"),
2981		autorest.AsPut(),
2982		autorest.WithBaseURL(client.BaseURI),
2983		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
2984		autorest.WithJSON(publicCertificate),
2985		autorest.WithQueryParameters(queryParameters))
2986	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2987}
2988
2989// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the
2990// http.Response Body if it receives an error.
2991func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) {
2992	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2993}
2994
2995// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always
2996// closes the http.Response Body.
2997func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) {
2998	err = autorest.Respond(
2999		resp,
3000		azure.WithErrorUnlessStatusCode(http.StatusOK),
3001		autorest.ByUnmarshallingJSON(&result),
3002		autorest.ByClosing())
3003	result.Response = autorest.Response{Response: resp}
3004	return
3005}
3006
3007// CreateOrUpdatePublicCertificateSlot description for Creates a hostname binding for an app.
3008// Parameters:
3009// resourceGroupName - name of the resource group to which the resource belongs.
3010// name - name of the app.
3011// publicCertificateName - public certificate name.
3012// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate
3013// object.
3014// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the
3015// production slot.
3016func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) {
3017	if tracing.IsEnabled() {
3018		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot")
3019		defer func() {
3020			sc := -1
3021			if result.Response.Response != nil {
3022				sc = result.Response.Response.StatusCode
3023			}
3024			tracing.EndSpan(ctx, sc, err)
3025		}()
3026	}
3027	if err := validation.Validate([]validation.Validation{
3028		{TargetValue: resourceGroupName,
3029			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3030				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3031				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3032		return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificateSlot", err.Error())
3033	}
3034
3035	req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot)
3036	if err != nil {
3037		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request")
3038		return
3039	}
3040
3041	resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req)
3042	if err != nil {
3043		result.Response = autorest.Response{Response: resp}
3044		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request")
3045		return
3046	}
3047
3048	result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp)
3049	if err != nil {
3050		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request")
3051		return
3052	}
3053
3054	return
3055}
3056
3057// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request.
3058func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) {
3059	pathParameters := map[string]interface{}{
3060		"name":                  autorest.Encode("path", name),
3061		"publicCertificateName": autorest.Encode("path", publicCertificateName),
3062		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
3063		"slot":                  autorest.Encode("path", slot),
3064		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
3065	}
3066
3067	const APIVersion = "2021-01-15"
3068	queryParameters := map[string]interface{}{
3069		"api-version": APIVersion,
3070	}
3071
3072	preparer := autorest.CreatePreparer(
3073		autorest.AsContentType("application/json; charset=utf-8"),
3074		autorest.AsPut(),
3075		autorest.WithBaseURL(client.BaseURI),
3076		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
3077		autorest.WithJSON(publicCertificate),
3078		autorest.WithQueryParameters(queryParameters))
3079	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3080}
3081
3082// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the
3083// http.Response Body if it receives an error.
3084func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
3085	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3086}
3087
3088// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always
3089// closes the http.Response Body.
3090func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) {
3091	err = autorest.Respond(
3092		resp,
3093		azure.WithErrorUnlessStatusCode(http.StatusOK),
3094		autorest.ByUnmarshallingJSON(&result),
3095		autorest.ByClosing())
3096	result.Response = autorest.Response{Response: resp}
3097	return
3098}
3099
3100// CreateOrUpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates
3101// an existing one (PATCH).
3102// Parameters:
3103// resourceGroupName - name of the resource group to which the resource belongs.
3104// name - name of the app.
3105// entityName - name of the hybrid connection configuration.
3106// connectionEnvelope - details of the hybrid connection configuration.
3107func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) {
3108	if tracing.IsEnabled() {
3109		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection")
3110		defer func() {
3111			sc := -1
3112			if result.Response.Response != nil {
3113				sc = result.Response.Response.StatusCode
3114			}
3115			tracing.EndSpan(ctx, sc, err)
3116		}()
3117	}
3118	if err := validation.Validate([]validation.Validation{
3119		{TargetValue: resourceGroupName,
3120			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3121				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3122				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3123		return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnection", err.Error())
3124	}
3125
3126	req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope)
3127	if err != nil {
3128		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request")
3129		return
3130	}
3131
3132	resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req)
3133	if err != nil {
3134		result.Response = autorest.Response{Response: resp}
3135		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request")
3136		return
3137	}
3138
3139	result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp)
3140	if err != nil {
3141		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request")
3142		return
3143	}
3144
3145	return
3146}
3147
3148// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request.
3149func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) {
3150	pathParameters := map[string]interface{}{
3151		"entityName":        autorest.Encode("path", entityName),
3152		"name":              autorest.Encode("path", name),
3153		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3154		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3155	}
3156
3157	const APIVersion = "2021-01-15"
3158	queryParameters := map[string]interface{}{
3159		"api-version": APIVersion,
3160	}
3161
3162	preparer := autorest.CreatePreparer(
3163		autorest.AsContentType("application/json; charset=utf-8"),
3164		autorest.AsPut(),
3165		autorest.WithBaseURL(client.BaseURI),
3166		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
3167		autorest.WithJSON(connectionEnvelope),
3168		autorest.WithQueryParameters(queryParameters))
3169	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3170}
3171
3172// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the
3173// http.Response Body if it receives an error.
3174func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
3175	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3176}
3177
3178// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always
3179// closes the http.Response Body.
3180func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
3181	err = autorest.Respond(
3182		resp,
3183		azure.WithErrorUnlessStatusCode(http.StatusOK),
3184		autorest.ByUnmarshallingJSON(&result),
3185		autorest.ByClosing())
3186	result.Response = autorest.Response{Response: resp}
3187	return
3188}
3189
3190// CreateOrUpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or
3191// updates an existing one (PATCH).
3192// Parameters:
3193// resourceGroupName - name of the resource group to which the resource belongs.
3194// name - name of the app.
3195// entityName - name of the hybrid connection configuration.
3196// connectionEnvelope - details of the hybrid connection configuration.
3197// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid
3198// connection for the production slot.
3199func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) {
3200	if tracing.IsEnabled() {
3201		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot")
3202		defer func() {
3203			sc := -1
3204			if result.Response.Response != nil {
3205				sc = result.Response.Response.StatusCode
3206			}
3207			tracing.EndSpan(ctx, sc, err)
3208		}()
3209	}
3210	if err := validation.Validate([]validation.Validation{
3211		{TargetValue: resourceGroupName,
3212			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3213				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3214				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3215		return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", err.Error())
3216	}
3217
3218	req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot)
3219	if err != nil {
3220		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request")
3221		return
3222	}
3223
3224	resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req)
3225	if err != nil {
3226		result.Response = autorest.Response{Response: resp}
3227		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request")
3228		return
3229	}
3230
3231	result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp)
3232	if err != nil {
3233		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request")
3234		return
3235	}
3236
3237	return
3238}
3239
3240// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request.
3241func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) {
3242	pathParameters := map[string]interface{}{
3243		"entityName":        autorest.Encode("path", entityName),
3244		"name":              autorest.Encode("path", name),
3245		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3246		"slot":              autorest.Encode("path", slot),
3247		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3248	}
3249
3250	const APIVersion = "2021-01-15"
3251	queryParameters := map[string]interface{}{
3252		"api-version": APIVersion,
3253	}
3254
3255	preparer := autorest.CreatePreparer(
3256		autorest.AsContentType("application/json; charset=utf-8"),
3257		autorest.AsPut(),
3258		autorest.WithBaseURL(client.BaseURI),
3259		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
3260		autorest.WithJSON(connectionEnvelope),
3261		autorest.WithQueryParameters(queryParameters))
3262	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3263}
3264
3265// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the
3266// http.Response Body if it receives an error.
3267func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
3268	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3269}
3270
3271// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always
3272// closes the http.Response Body.
3273func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
3274	err = autorest.Respond(
3275		resp,
3276		azure.WithErrorUnlessStatusCode(http.StatusOK),
3277		autorest.ByUnmarshallingJSON(&result),
3278		autorest.ByClosing())
3279	result.Response = autorest.Response{Response: resp}
3280	return
3281}
3282
3283// CreateOrUpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates
3284// an existing app.
3285// Parameters:
3286// resourceGroupName - name of the resource group to which the resource belongs.
3287// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
3288// parameter.
3289// siteEnvelope - a JSON representation of the app properties. See example.
3290// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify
3291// the production slot.
3292func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) {
3293	if tracing.IsEnabled() {
3294		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot")
3295		defer func() {
3296			sc := -1
3297			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3298				sc = result.FutureAPI.Response().StatusCode
3299			}
3300			tracing.EndSpan(ctx, sc, err)
3301		}()
3302	}
3303	if err := validation.Validate([]validation.Validation{
3304		{TargetValue: resourceGroupName,
3305			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3306				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3307				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3308		{TargetValue: siteEnvelope,
3309			Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false,
3310				Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false,
3311					Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false,
3312						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
3313							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
3314						}},
3315						{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
3316							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
3317								{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
3318							}},
3319						{Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.Null, Rule: false,
3320							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.FunctionAppScaleLimit", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}},
3321						{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.Null, Rule: false,
3322							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(20), Chain: nil},
3323								{Target: "siteEnvelope.SiteProperties.SiteConfig.MinimumElasticInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
3324							}},
3325					}},
3326					{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false,
3327						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}},
3328				}}}}}); err != nil {
3329		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error())
3330	}
3331
3332	req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot)
3333	if err != nil {
3334		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request")
3335		return
3336	}
3337
3338	result, err = client.CreateOrUpdateSlotSender(req)
3339	if err != nil {
3340		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure sending request")
3341		return
3342	}
3343
3344	return
3345}
3346
3347// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request.
3348func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) {
3349	pathParameters := map[string]interface{}{
3350		"name":              autorest.Encode("path", name),
3351		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3352		"slot":              autorest.Encode("path", slot),
3353		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3354	}
3355
3356	const APIVersion = "2021-01-15"
3357	queryParameters := map[string]interface{}{
3358		"api-version": APIVersion,
3359	}
3360
3361	preparer := autorest.CreatePreparer(
3362		autorest.AsContentType("application/json; charset=utf-8"),
3363		autorest.AsPut(),
3364		autorest.WithBaseURL(client.BaseURI),
3365		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
3366		autorest.WithJSON(siteEnvelope),
3367		autorest.WithQueryParameters(queryParameters))
3368	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3369}
3370
3371// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the
3372// http.Response Body if it receives an error.
3373func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) {
3374	var resp *http.Response
3375	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3376	if err != nil {
3377		return
3378	}
3379	var azf azure.Future
3380	azf, err = azure.NewFutureFromResponse(resp)
3381	future.FutureAPI = &azf
3382	future.Result = future.result
3383	return
3384}
3385
3386// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always
3387// closes the http.Response Body.
3388func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) {
3389	err = autorest.Respond(
3390		resp,
3391		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
3392		autorest.ByUnmarshallingJSON(&result),
3393		autorest.ByClosing())
3394	result.Response = autorest.Response{Response: resp}
3395	return
3396}
3397
3398// CreateOrUpdateSourceControl description for Updates the source control configuration of an app.
3399// Parameters:
3400// resourceGroupName - name of the resource group to which the resource belongs.
3401// name - name of the app.
3402// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
3403func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) {
3404	if tracing.IsEnabled() {
3405		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl")
3406		defer func() {
3407			sc := -1
3408			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3409				sc = result.FutureAPI.Response().StatusCode
3410			}
3411			tracing.EndSpan(ctx, sc, err)
3412		}()
3413	}
3414	if err := validation.Validate([]validation.Validation{
3415		{TargetValue: resourceGroupName,
3416			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3417				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3418				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3419		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControl", err.Error())
3420	}
3421
3422	req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl)
3423	if err != nil {
3424		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request")
3425		return
3426	}
3427
3428	result, err = client.CreateOrUpdateSourceControlSender(req)
3429	if err != nil {
3430		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure sending request")
3431		return
3432	}
3433
3434	return
3435}
3436
3437// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request.
3438func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) {
3439	pathParameters := map[string]interface{}{
3440		"name":              autorest.Encode("path", name),
3441		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3442		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3443	}
3444
3445	const APIVersion = "2021-01-15"
3446	queryParameters := map[string]interface{}{
3447		"api-version": APIVersion,
3448	}
3449
3450	preparer := autorest.CreatePreparer(
3451		autorest.AsContentType("application/json; charset=utf-8"),
3452		autorest.AsPut(),
3453		autorest.WithBaseURL(client.BaseURI),
3454		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
3455		autorest.WithJSON(siteSourceControl),
3456		autorest.WithQueryParameters(queryParameters))
3457	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3458}
3459
3460// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the
3461// http.Response Body if it receives an error.
3462func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) {
3463	var resp *http.Response
3464	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3465	if err != nil {
3466		return
3467	}
3468	var azf azure.Future
3469	azf, err = azure.NewFutureFromResponse(resp)
3470	future.FutureAPI = &azf
3471	future.Result = future.result
3472	return
3473}
3474
3475// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always
3476// closes the http.Response Body.
3477func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
3478	err = autorest.Respond(
3479		resp,
3480		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
3481		autorest.ByUnmarshallingJSON(&result),
3482		autorest.ByClosing())
3483	result.Response = autorest.Response{Response: resp}
3484	return
3485}
3486
3487// CreateOrUpdateSourceControlSlot description for Updates the source control configuration of an app.
3488// Parameters:
3489// resourceGroupName - name of the resource group to which the resource belongs.
3490// name - name of the app.
3491// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
3492// slot - name of the deployment slot. If a slot is not specified, the API will update the source control
3493// configuration for the production slot.
3494func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) {
3495	if tracing.IsEnabled() {
3496		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot")
3497		defer func() {
3498			sc := -1
3499			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3500				sc = result.FutureAPI.Response().StatusCode
3501			}
3502			tracing.EndSpan(ctx, sc, err)
3503		}()
3504	}
3505	if err := validation.Validate([]validation.Validation{
3506		{TargetValue: resourceGroupName,
3507			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3508				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3509				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3510		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControlSlot", err.Error())
3511	}
3512
3513	req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot)
3514	if err != nil {
3515		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request")
3516		return
3517	}
3518
3519	result, err = client.CreateOrUpdateSourceControlSlotSender(req)
3520	if err != nil {
3521		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure sending request")
3522		return
3523	}
3524
3525	return
3526}
3527
3528// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request.
3529func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) {
3530	pathParameters := map[string]interface{}{
3531		"name":              autorest.Encode("path", name),
3532		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3533		"slot":              autorest.Encode("path", slot),
3534		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3535	}
3536
3537	const APIVersion = "2021-01-15"
3538	queryParameters := map[string]interface{}{
3539		"api-version": APIVersion,
3540	}
3541
3542	preparer := autorest.CreatePreparer(
3543		autorest.AsContentType("application/json; charset=utf-8"),
3544		autorest.AsPut(),
3545		autorest.WithBaseURL(client.BaseURI),
3546		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
3547		autorest.WithJSON(siteSourceControl),
3548		autorest.WithQueryParameters(queryParameters))
3549	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3550}
3551
3552// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the
3553// http.Response Body if it receives an error.
3554func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) {
3555	var resp *http.Response
3556	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3557	if err != nil {
3558		return
3559	}
3560	var azf azure.Future
3561	azf, err = azure.NewFutureFromResponse(resp)
3562	future.FutureAPI = &azf
3563	future.Result = future.result
3564	return
3565}
3566
3567// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always
3568// closes the http.Response Body.
3569func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
3570	err = autorest.Respond(
3571		resp,
3572		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
3573		autorest.ByUnmarshallingJSON(&result),
3574		autorest.ByClosing())
3575	result.Response = autorest.Response{Response: resp}
3576	return
3577}
3578
3579// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck description for Integrates this Web App with a Virtual Network.
3580// This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet
3581// has already been delegated, and is not
3582// in use by another App Service Plan other than the one this App is in.
3583// Parameters:
3584// resourceGroupName - name of the resource group to which the resource belongs.
3585// name - name of the app.
3586// connectionEnvelope - properties of the Virtual Network connection. See example.
3587func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) {
3588	if tracing.IsEnabled() {
3589		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck")
3590		defer func() {
3591			sc := -1
3592			if result.Response.Response != nil {
3593				sc = result.Response.Response.StatusCode
3594			}
3595			tracing.EndSpan(ctx, sc, err)
3596		}()
3597	}
3598	if err := validation.Validate([]validation.Validation{
3599		{TargetValue: resourceGroupName,
3600			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3601				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3602				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3603		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck", err.Error())
3604	}
3605
3606	req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckPreparer(ctx, resourceGroupName, name, connectionEnvelope)
3607	if err != nil {
3608		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck", nil, "Failure preparing request")
3609		return
3610	}
3611
3612	resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSender(req)
3613	if err != nil {
3614		result.Response = autorest.Response{Response: resp}
3615		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck", resp, "Failure sending request")
3616		return
3617	}
3618
3619	result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponder(resp)
3620	if err != nil {
3621		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck", resp, "Failure responding to request")
3622		return
3623	}
3624
3625	return
3626}
3627
3628// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck request.
3629func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) {
3630	pathParameters := map[string]interface{}{
3631		"name":              autorest.Encode("path", name),
3632		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3633		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3634	}
3635
3636	const APIVersion = "2021-01-15"
3637	queryParameters := map[string]interface{}{
3638		"api-version": APIVersion,
3639	}
3640
3641	preparer := autorest.CreatePreparer(
3642		autorest.AsContentType("application/json; charset=utf-8"),
3643		autorest.AsPut(),
3644		autorest.WithBaseURL(client.BaseURI),
3645		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
3646		autorest.WithJSON(connectionEnvelope),
3647		autorest.WithQueryParameters(queryParameters))
3648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3649}
3650
3651// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck request. The method will close the
3652// http.Response Body if it receives an error.
3653func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSender(req *http.Request) (*http.Response, error) {
3654	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3655}
3656
3657// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck request. The method always
3658// closes the http.Response Body.
3659func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
3660	err = autorest.Respond(
3661		resp,
3662		azure.WithErrorUnlessStatusCode(http.StatusOK),
3663		autorest.ByUnmarshallingJSON(&result),
3664		autorest.ByClosing())
3665	result.Response = autorest.Response{Response: resp}
3666	return
3667}
3668
3669// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot description for Integrates this Web App with a Virtual
3670// Network. This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the
3671// target Subnet has already been delegated, and is not
3672// in use by another App Service Plan other than the one this App is in.
3673// Parameters:
3674// resourceGroupName - name of the resource group to which the resource belongs.
3675// name - name of the app.
3676// connectionEnvelope - properties of the Virtual Network connection. See example.
3677// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
3678// the production slot.
3679func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) {
3680	if tracing.IsEnabled() {
3681		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot")
3682		defer func() {
3683			sc := -1
3684			if result.Response.Response != nil {
3685				sc = result.Response.Response.StatusCode
3686			}
3687			tracing.EndSpan(ctx, sc, err)
3688		}()
3689	}
3690	if err := validation.Validate([]validation.Validation{
3691		{TargetValue: resourceGroupName,
3692			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3693				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3694				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3695		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot", err.Error())
3696	}
3697
3698	req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot)
3699	if err != nil {
3700		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot", nil, "Failure preparing request")
3701		return
3702	}
3703
3704	resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotSender(req)
3705	if err != nil {
3706		result.Response = autorest.Response{Response: resp}
3707		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot", resp, "Failure sending request")
3708		return
3709	}
3710
3711	result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponder(resp)
3712	if err != nil {
3713		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot", resp, "Failure responding to request")
3714		return
3715	}
3716
3717	return
3718}
3719
3720// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot request.
3721func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) {
3722	pathParameters := map[string]interface{}{
3723		"name":              autorest.Encode("path", name),
3724		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3725		"slot":              autorest.Encode("path", slot),
3726		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3727	}
3728
3729	const APIVersion = "2021-01-15"
3730	queryParameters := map[string]interface{}{
3731		"api-version": APIVersion,
3732	}
3733
3734	preparer := autorest.CreatePreparer(
3735		autorest.AsContentType("application/json; charset=utf-8"),
3736		autorest.AsPut(),
3737		autorest.WithBaseURL(client.BaseURI),
3738		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
3739		autorest.WithJSON(connectionEnvelope),
3740		autorest.WithQueryParameters(queryParameters))
3741	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3742}
3743
3744// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot request. The method will close the
3745// http.Response Body if it receives an error.
3746func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotSender(req *http.Request) (*http.Response, error) {
3747	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3748}
3749
3750// CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot request. The method always
3751// closes the http.Response Body.
3752func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
3753	err = autorest.Respond(
3754		resp,
3755		azure.WithErrorUnlessStatusCode(http.StatusOK),
3756		autorest.ByUnmarshallingJSON(&result),
3757		autorest.ByClosing())
3758	result.Response = autorest.Response{Response: resp}
3759	return
3760}
3761
3762// CreateOrUpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates
3763// the connection properties (PATCH).
3764// Parameters:
3765// resourceGroupName - name of the resource group to which the resource belongs.
3766// name - name of the app.
3767// vnetName - name of an existing Virtual Network.
3768// connectionEnvelope - properties of the Virtual Network connection. See example.
3769func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) {
3770	if tracing.IsEnabled() {
3771		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection")
3772		defer func() {
3773			sc := -1
3774			if result.Response.Response != nil {
3775				sc = result.Response.Response.StatusCode
3776			}
3777			tracing.EndSpan(ctx, sc, err)
3778		}()
3779	}
3780	if err := validation.Validate([]validation.Validation{
3781		{TargetValue: resourceGroupName,
3782			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3783				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3784				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3785		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnection", err.Error())
3786	}
3787
3788	req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope)
3789	if err != nil {
3790		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request")
3791		return
3792	}
3793
3794	resp, err := client.CreateOrUpdateVnetConnectionSender(req)
3795	if err != nil {
3796		result.Response = autorest.Response{Response: resp}
3797		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request")
3798		return
3799	}
3800
3801	result, err = client.CreateOrUpdateVnetConnectionResponder(resp)
3802	if err != nil {
3803		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request")
3804		return
3805	}
3806
3807	return
3808}
3809
3810// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request.
3811func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) {
3812	pathParameters := map[string]interface{}{
3813		"name":              autorest.Encode("path", name),
3814		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3815		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3816		"vnetName":          autorest.Encode("path", vnetName),
3817	}
3818
3819	const APIVersion = "2021-01-15"
3820	queryParameters := map[string]interface{}{
3821		"api-version": APIVersion,
3822	}
3823
3824	preparer := autorest.CreatePreparer(
3825		autorest.AsContentType("application/json; charset=utf-8"),
3826		autorest.AsPut(),
3827		autorest.WithBaseURL(client.BaseURI),
3828		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
3829		autorest.WithJSON(connectionEnvelope),
3830		autorest.WithQueryParameters(queryParameters))
3831	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3832}
3833
3834// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the
3835// http.Response Body if it receives an error.
3836func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) {
3837	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3838}
3839
3840// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always
3841// closes the http.Response Body.
3842func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
3843	err = autorest.Respond(
3844		resp,
3845		azure.WithErrorUnlessStatusCode(http.StatusOK),
3846		autorest.ByUnmarshallingJSON(&result),
3847		autorest.ByClosing())
3848	result.Response = autorest.Response{Response: resp}
3849	return
3850}
3851
3852// CreateOrUpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates
3853// it (PATCH).
3854// Parameters:
3855// resourceGroupName - name of the resource group to which the resource belongs.
3856// name - name of the app.
3857// vnetName - name of the Virtual Network.
3858// gatewayName - name of the gateway. Currently, the only supported string is "primary".
3859// connectionEnvelope - the properties to update this gateway with.
3860func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) {
3861	if tracing.IsEnabled() {
3862		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway")
3863		defer func() {
3864			sc := -1
3865			if result.Response.Response != nil {
3866				sc = result.Response.Response.StatusCode
3867			}
3868			tracing.EndSpan(ctx, sc, err)
3869		}()
3870	}
3871	if err := validation.Validate([]validation.Validation{
3872		{TargetValue: resourceGroupName,
3873			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3874				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3875				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3876		{TargetValue: connectionEnvelope,
3877			Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false,
3878				Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
3879		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error())
3880	}
3881
3882	req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope)
3883	if err != nil {
3884		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request")
3885		return
3886	}
3887
3888	resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req)
3889	if err != nil {
3890		result.Response = autorest.Response{Response: resp}
3891		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request")
3892		return
3893	}
3894
3895	result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp)
3896	if err != nil {
3897		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request")
3898		return
3899	}
3900
3901	return
3902}
3903
3904// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request.
3905func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) {
3906	pathParameters := map[string]interface{}{
3907		"gatewayName":       autorest.Encode("path", gatewayName),
3908		"name":              autorest.Encode("path", name),
3909		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3910		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3911		"vnetName":          autorest.Encode("path", vnetName),
3912	}
3913
3914	const APIVersion = "2021-01-15"
3915	queryParameters := map[string]interface{}{
3916		"api-version": APIVersion,
3917	}
3918
3919	preparer := autorest.CreatePreparer(
3920		autorest.AsContentType("application/json; charset=utf-8"),
3921		autorest.AsPut(),
3922		autorest.WithBaseURL(client.BaseURI),
3923		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
3924		autorest.WithJSON(connectionEnvelope),
3925		autorest.WithQueryParameters(queryParameters))
3926	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3927}
3928
3929// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the
3930// http.Response Body if it receives an error.
3931func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
3932	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3933}
3934
3935// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always
3936// closes the http.Response Body.
3937func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
3938	err = autorest.Respond(
3939		resp,
3940		azure.WithErrorUnlessStatusCode(http.StatusOK),
3941		autorest.ByUnmarshallingJSON(&result),
3942		autorest.ByClosing())
3943	result.Response = autorest.Response{Response: resp}
3944	return
3945}
3946
3947// CreateOrUpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or
3948// updates it (PATCH).
3949// Parameters:
3950// resourceGroupName - name of the resource group to which the resource belongs.
3951// name - name of the app.
3952// vnetName - name of the Virtual Network.
3953// gatewayName - name of the gateway. Currently, the only supported string is "primary".
3954// connectionEnvelope - the properties to update this gateway with.
3955// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the
3956// production slot's Virtual Network.
3957func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) {
3958	if tracing.IsEnabled() {
3959		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot")
3960		defer func() {
3961			sc := -1
3962			if result.Response.Response != nil {
3963				sc = result.Response.Response.StatusCode
3964			}
3965			tracing.EndSpan(ctx, sc, err)
3966		}()
3967	}
3968	if err := validation.Validate([]validation.Validation{
3969		{TargetValue: resourceGroupName,
3970			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3971				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3972				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3973		{TargetValue: connectionEnvelope,
3974			Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false,
3975				Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
3976		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error())
3977	}
3978
3979	req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot)
3980	if err != nil {
3981		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request")
3982		return
3983	}
3984
3985	resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req)
3986	if err != nil {
3987		result.Response = autorest.Response{Response: resp}
3988		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request")
3989		return
3990	}
3991
3992	result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp)
3993	if err != nil {
3994		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request")
3995		return
3996	}
3997
3998	return
3999}
4000
4001// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request.
4002func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) {
4003	pathParameters := map[string]interface{}{
4004		"gatewayName":       autorest.Encode("path", gatewayName),
4005		"name":              autorest.Encode("path", name),
4006		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4007		"slot":              autorest.Encode("path", slot),
4008		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4009		"vnetName":          autorest.Encode("path", vnetName),
4010	}
4011
4012	const APIVersion = "2021-01-15"
4013	queryParameters := map[string]interface{}{
4014		"api-version": APIVersion,
4015	}
4016
4017	preparer := autorest.CreatePreparer(
4018		autorest.AsContentType("application/json; charset=utf-8"),
4019		autorest.AsPut(),
4020		autorest.WithBaseURL(client.BaseURI),
4021		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
4022		autorest.WithJSON(connectionEnvelope),
4023		autorest.WithQueryParameters(queryParameters))
4024	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4025}
4026
4027// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the
4028// http.Response Body if it receives an error.
4029func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
4030	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4031}
4032
4033// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always
4034// closes the http.Response Body.
4035func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
4036	err = autorest.Respond(
4037		resp,
4038		azure.WithErrorUnlessStatusCode(http.StatusOK),
4039		autorest.ByUnmarshallingJSON(&result),
4040		autorest.ByClosing())
4041	result.Response = autorest.Response{Response: resp}
4042	return
4043}
4044
4045// CreateOrUpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or
4046// updates the connection properties (PATCH).
4047// Parameters:
4048// resourceGroupName - name of the resource group to which the resource belongs.
4049// name - name of the app.
4050// vnetName - name of an existing Virtual Network.
4051// connectionEnvelope - properties of the Virtual Network connection. See example.
4052// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
4053// the production slot.
4054func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) {
4055	if tracing.IsEnabled() {
4056		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot")
4057		defer func() {
4058			sc := -1
4059			if result.Response.Response != nil {
4060				sc = result.Response.Response.StatusCode
4061			}
4062			tracing.EndSpan(ctx, sc, err)
4063		}()
4064	}
4065	if err := validation.Validate([]validation.Validation{
4066		{TargetValue: resourceGroupName,
4067			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4068				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4069				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4070		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionSlot", err.Error())
4071	}
4072
4073	req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot)
4074	if err != nil {
4075		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request")
4076		return
4077	}
4078
4079	resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req)
4080	if err != nil {
4081		result.Response = autorest.Response{Response: resp}
4082		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request")
4083		return
4084	}
4085
4086	result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp)
4087	if err != nil {
4088		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request")
4089		return
4090	}
4091
4092	return
4093}
4094
4095// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request.
4096func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) {
4097	pathParameters := map[string]interface{}{
4098		"name":              autorest.Encode("path", name),
4099		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4100		"slot":              autorest.Encode("path", slot),
4101		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4102		"vnetName":          autorest.Encode("path", vnetName),
4103	}
4104
4105	const APIVersion = "2021-01-15"
4106	queryParameters := map[string]interface{}{
4107		"api-version": APIVersion,
4108	}
4109
4110	preparer := autorest.CreatePreparer(
4111		autorest.AsContentType("application/json; charset=utf-8"),
4112		autorest.AsPut(),
4113		autorest.WithBaseURL(client.BaseURI),
4114		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
4115		autorest.WithJSON(connectionEnvelope),
4116		autorest.WithQueryParameters(queryParameters))
4117	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4118}
4119
4120// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the
4121// http.Response Body if it receives an error.
4122func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
4123	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4124}
4125
4126// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always
4127// closes the http.Response Body.
4128func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
4129	err = autorest.Respond(
4130		resp,
4131		azure.WithErrorUnlessStatusCode(http.StatusOK),
4132		autorest.ByUnmarshallingJSON(&result),
4133		autorest.ByClosing())
4134	result.Response = autorest.Response{Response: resp}
4135	return
4136}
4137
4138// Delete description for Deletes a web, mobile, or API app, or one of the deployment slots.
4139// Parameters:
4140// resourceGroupName - name of the resource group to which the resource belongs.
4141// name - name of the app to delete.
4142// deleteMetrics - if true, web app metrics are also deleted.
4143// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App
4144// Service plan is deleted.
4145func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) {
4146	if tracing.IsEnabled() {
4147		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete")
4148		defer func() {
4149			sc := -1
4150			if result.Response != nil {
4151				sc = result.Response.StatusCode
4152			}
4153			tracing.EndSpan(ctx, sc, err)
4154		}()
4155	}
4156	if err := validation.Validate([]validation.Validation{
4157		{TargetValue: resourceGroupName,
4158			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4159				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4160				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4161		return result, validation.NewError("web.AppsClient", "Delete", err.Error())
4162	}
4163
4164	req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm)
4165	if err != nil {
4166		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request")
4167		return
4168	}
4169
4170	resp, err := client.DeleteSender(req)
4171	if err != nil {
4172		result.Response = resp
4173		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request")
4174		return
4175	}
4176
4177	result, err = client.DeleteResponder(resp)
4178	if err != nil {
4179		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request")
4180		return
4181	}
4182
4183	return
4184}
4185
4186// DeletePreparer prepares the Delete request.
4187func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) {
4188	pathParameters := map[string]interface{}{
4189		"name":              autorest.Encode("path", name),
4190		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4191		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4192	}
4193
4194	const APIVersion = "2021-01-15"
4195	queryParameters := map[string]interface{}{
4196		"api-version": APIVersion,
4197	}
4198	if deleteMetrics != nil {
4199		queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics)
4200	}
4201	if deleteEmptyServerFarm != nil {
4202		queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm)
4203	}
4204
4205	preparer := autorest.CreatePreparer(
4206		autorest.AsDelete(),
4207		autorest.WithBaseURL(client.BaseURI),
4208		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
4209		autorest.WithQueryParameters(queryParameters))
4210	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4211}
4212
4213// DeleteSender sends the Delete request. The method will close the
4214// http.Response Body if it receives an error.
4215func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) {
4216	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4217}
4218
4219// DeleteResponder handles the response to the Delete request. The method always
4220// closes the http.Response Body.
4221func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
4222	err = autorest.Respond(
4223		resp,
4224		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4225		autorest.ByClosing())
4226	result.Response = resp
4227	return
4228}
4229
4230// DeleteBackup description for Deletes a backup of an app by its ID.
4231// Parameters:
4232// resourceGroupName - name of the resource group to which the resource belongs.
4233// name - name of the app.
4234// backupID - ID of the backup.
4235func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) {
4236	if tracing.IsEnabled() {
4237		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup")
4238		defer func() {
4239			sc := -1
4240			if result.Response != nil {
4241				sc = result.Response.StatusCode
4242			}
4243			tracing.EndSpan(ctx, sc, err)
4244		}()
4245	}
4246	if err := validation.Validate([]validation.Validation{
4247		{TargetValue: resourceGroupName,
4248			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4249				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4250				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4251		return result, validation.NewError("web.AppsClient", "DeleteBackup", err.Error())
4252	}
4253
4254	req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID)
4255	if err != nil {
4256		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request")
4257		return
4258	}
4259
4260	resp, err := client.DeleteBackupSender(req)
4261	if err != nil {
4262		result.Response = resp
4263		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request")
4264		return
4265	}
4266
4267	result, err = client.DeleteBackupResponder(resp)
4268	if err != nil {
4269		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request")
4270		return
4271	}
4272
4273	return
4274}
4275
4276// DeleteBackupPreparer prepares the DeleteBackup request.
4277func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) {
4278	pathParameters := map[string]interface{}{
4279		"backupId":          autorest.Encode("path", backupID),
4280		"name":              autorest.Encode("path", name),
4281		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4282		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4283	}
4284
4285	const APIVersion = "2021-01-15"
4286	queryParameters := map[string]interface{}{
4287		"api-version": APIVersion,
4288	}
4289
4290	preparer := autorest.CreatePreparer(
4291		autorest.AsDelete(),
4292		autorest.WithBaseURL(client.BaseURI),
4293		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters),
4294		autorest.WithQueryParameters(queryParameters))
4295	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4296}
4297
4298// DeleteBackupSender sends the DeleteBackup request. The method will close the
4299// http.Response Body if it receives an error.
4300func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) {
4301	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4302}
4303
4304// DeleteBackupResponder handles the response to the DeleteBackup request. The method always
4305// closes the http.Response Body.
4306func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) {
4307	err = autorest.Respond(
4308		resp,
4309		azure.WithErrorUnlessStatusCode(http.StatusOK),
4310		autorest.ByClosing())
4311	result.Response = resp
4312	return
4313}
4314
4315// DeleteBackupConfiguration description for Deletes the backup configuration of an app.
4316// Parameters:
4317// resourceGroupName - name of the resource group to which the resource belongs.
4318// name - name of the app.
4319func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
4320	if tracing.IsEnabled() {
4321		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration")
4322		defer func() {
4323			sc := -1
4324			if result.Response != nil {
4325				sc = result.Response.StatusCode
4326			}
4327			tracing.EndSpan(ctx, sc, err)
4328		}()
4329	}
4330	if err := validation.Validate([]validation.Validation{
4331		{TargetValue: resourceGroupName,
4332			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4333				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4334				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4335		return result, validation.NewError("web.AppsClient", "DeleteBackupConfiguration", err.Error())
4336	}
4337
4338	req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name)
4339	if err != nil {
4340		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request")
4341		return
4342	}
4343
4344	resp, err := client.DeleteBackupConfigurationSender(req)
4345	if err != nil {
4346		result.Response = resp
4347		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request")
4348		return
4349	}
4350
4351	result, err = client.DeleteBackupConfigurationResponder(resp)
4352	if err != nil {
4353		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request")
4354		return
4355	}
4356
4357	return
4358}
4359
4360// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request.
4361func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
4362	pathParameters := map[string]interface{}{
4363		"name":              autorest.Encode("path", name),
4364		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4365		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4366	}
4367
4368	const APIVersion = "2021-01-15"
4369	queryParameters := map[string]interface{}{
4370		"api-version": APIVersion,
4371	}
4372
4373	preparer := autorest.CreatePreparer(
4374		autorest.AsDelete(),
4375		autorest.WithBaseURL(client.BaseURI),
4376		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters),
4377		autorest.WithQueryParameters(queryParameters))
4378	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4379}
4380
4381// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the
4382// http.Response Body if it receives an error.
4383func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) {
4384	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4385}
4386
4387// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always
4388// closes the http.Response Body.
4389func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) {
4390	err = autorest.Respond(
4391		resp,
4392		azure.WithErrorUnlessStatusCode(http.StatusOK),
4393		autorest.ByClosing())
4394	result.Response = resp
4395	return
4396}
4397
4398// DeleteBackupConfigurationSlot description for Deletes the backup configuration of an app.
4399// Parameters:
4400// resourceGroupName - name of the resource group to which the resource belongs.
4401// name - name of the app.
4402// slot - name of the deployment slot. If a slot is not specified, the API will delete the backup configuration
4403// for the production slot.
4404func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
4405	if tracing.IsEnabled() {
4406		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot")
4407		defer func() {
4408			sc := -1
4409			if result.Response != nil {
4410				sc = result.Response.StatusCode
4411			}
4412			tracing.EndSpan(ctx, sc, err)
4413		}()
4414	}
4415	if err := validation.Validate([]validation.Validation{
4416		{TargetValue: resourceGroupName,
4417			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4418				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4419				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4420		return result, validation.NewError("web.AppsClient", "DeleteBackupConfigurationSlot", err.Error())
4421	}
4422
4423	req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
4424	if err != nil {
4425		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request")
4426		return
4427	}
4428
4429	resp, err := client.DeleteBackupConfigurationSlotSender(req)
4430	if err != nil {
4431		result.Response = resp
4432		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request")
4433		return
4434	}
4435
4436	result, err = client.DeleteBackupConfigurationSlotResponder(resp)
4437	if err != nil {
4438		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request")
4439		return
4440	}
4441
4442	return
4443}
4444
4445// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request.
4446func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
4447	pathParameters := map[string]interface{}{
4448		"name":              autorest.Encode("path", name),
4449		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4450		"slot":              autorest.Encode("path", slot),
4451		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4452	}
4453
4454	const APIVersion = "2021-01-15"
4455	queryParameters := map[string]interface{}{
4456		"api-version": APIVersion,
4457	}
4458
4459	preparer := autorest.CreatePreparer(
4460		autorest.AsDelete(),
4461		autorest.WithBaseURL(client.BaseURI),
4462		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters),
4463		autorest.WithQueryParameters(queryParameters))
4464	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4465}
4466
4467// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the
4468// http.Response Body if it receives an error.
4469func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
4470	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4471}
4472
4473// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always
4474// closes the http.Response Body.
4475func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4476	err = autorest.Respond(
4477		resp,
4478		azure.WithErrorUnlessStatusCode(http.StatusOK),
4479		autorest.ByClosing())
4480	result.Response = resp
4481	return
4482}
4483
4484// DeleteBackupSlot description for Deletes a backup of an app by its ID.
4485// Parameters:
4486// resourceGroupName - name of the resource group to which the resource belongs.
4487// name - name of the app.
4488// backupID - ID of the backup.
4489// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the
4490// production slot.
4491func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) {
4492	if tracing.IsEnabled() {
4493		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot")
4494		defer func() {
4495			sc := -1
4496			if result.Response != nil {
4497				sc = result.Response.StatusCode
4498			}
4499			tracing.EndSpan(ctx, sc, err)
4500		}()
4501	}
4502	if err := validation.Validate([]validation.Validation{
4503		{TargetValue: resourceGroupName,
4504			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4505				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4506				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4507		return result, validation.NewError("web.AppsClient", "DeleteBackupSlot", err.Error())
4508	}
4509
4510	req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot)
4511	if err != nil {
4512		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request")
4513		return
4514	}
4515
4516	resp, err := client.DeleteBackupSlotSender(req)
4517	if err != nil {
4518		result.Response = resp
4519		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request")
4520		return
4521	}
4522
4523	result, err = client.DeleteBackupSlotResponder(resp)
4524	if err != nil {
4525		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request")
4526		return
4527	}
4528
4529	return
4530}
4531
4532// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request.
4533func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) {
4534	pathParameters := map[string]interface{}{
4535		"backupId":          autorest.Encode("path", backupID),
4536		"name":              autorest.Encode("path", name),
4537		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4538		"slot":              autorest.Encode("path", slot),
4539		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4540	}
4541
4542	const APIVersion = "2021-01-15"
4543	queryParameters := map[string]interface{}{
4544		"api-version": APIVersion,
4545	}
4546
4547	preparer := autorest.CreatePreparer(
4548		autorest.AsDelete(),
4549		autorest.WithBaseURL(client.BaseURI),
4550		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters),
4551		autorest.WithQueryParameters(queryParameters))
4552	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4553}
4554
4555// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the
4556// http.Response Body if it receives an error.
4557func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) {
4558	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4559}
4560
4561// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always
4562// closes the http.Response Body.
4563func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4564	err = autorest.Respond(
4565		resp,
4566		azure.WithErrorUnlessStatusCode(http.StatusOK),
4567		autorest.ByClosing())
4568	result.Response = resp
4569	return
4570}
4571
4572// DeleteContinuousWebJob description for Delete a continuous web job by its ID for an app, or a deployment slot.
4573// Parameters:
4574// resourceGroupName - name of the resource group to which the resource belongs.
4575// name - site name.
4576// webJobName - name of Web Job.
4577func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
4578	if tracing.IsEnabled() {
4579		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob")
4580		defer func() {
4581			sc := -1
4582			if result.Response != nil {
4583				sc = result.Response.StatusCode
4584			}
4585			tracing.EndSpan(ctx, sc, err)
4586		}()
4587	}
4588	if err := validation.Validate([]validation.Validation{
4589		{TargetValue: resourceGroupName,
4590			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4591				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4592				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4593		return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJob", err.Error())
4594	}
4595
4596	req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
4597	if err != nil {
4598		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request")
4599		return
4600	}
4601
4602	resp, err := client.DeleteContinuousWebJobSender(req)
4603	if err != nil {
4604		result.Response = resp
4605		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request")
4606		return
4607	}
4608
4609	result, err = client.DeleteContinuousWebJobResponder(resp)
4610	if err != nil {
4611		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request")
4612		return
4613	}
4614
4615	return
4616}
4617
4618// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request.
4619func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
4620	pathParameters := map[string]interface{}{
4621		"name":              autorest.Encode("path", name),
4622		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4623		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4624		"webJobName":        autorest.Encode("path", webJobName),
4625	}
4626
4627	const APIVersion = "2021-01-15"
4628	queryParameters := map[string]interface{}{
4629		"api-version": APIVersion,
4630	}
4631
4632	preparer := autorest.CreatePreparer(
4633		autorest.AsDelete(),
4634		autorest.WithBaseURL(client.BaseURI),
4635		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters),
4636		autorest.WithQueryParameters(queryParameters))
4637	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4638}
4639
4640// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the
4641// http.Response Body if it receives an error.
4642func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) {
4643	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4644}
4645
4646// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always
4647// closes the http.Response Body.
4648func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
4649	err = autorest.Respond(
4650		resp,
4651		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4652		autorest.ByClosing())
4653	result.Response = resp
4654	return
4655}
4656
4657// DeleteContinuousWebJobSlot description for Delete a continuous web job by its ID for an app, or a deployment slot.
4658// Parameters:
4659// resourceGroupName - name of the resource group to which the resource belongs.
4660// name - site name.
4661// webJobName - name of Web Job.
4662// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
4663// production slot.
4664func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
4665	if tracing.IsEnabled() {
4666		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot")
4667		defer func() {
4668			sc := -1
4669			if result.Response != nil {
4670				sc = result.Response.StatusCode
4671			}
4672			tracing.EndSpan(ctx, sc, err)
4673		}()
4674	}
4675	if err := validation.Validate([]validation.Validation{
4676		{TargetValue: resourceGroupName,
4677			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4678				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4679				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4680		return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJobSlot", err.Error())
4681	}
4682
4683	req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
4684	if err != nil {
4685		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request")
4686		return
4687	}
4688
4689	resp, err := client.DeleteContinuousWebJobSlotSender(req)
4690	if err != nil {
4691		result.Response = resp
4692		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request")
4693		return
4694	}
4695
4696	result, err = client.DeleteContinuousWebJobSlotResponder(resp)
4697	if err != nil {
4698		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request")
4699		return
4700	}
4701
4702	return
4703}
4704
4705// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request.
4706func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
4707	pathParameters := map[string]interface{}{
4708		"name":              autorest.Encode("path", name),
4709		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4710		"slot":              autorest.Encode("path", slot),
4711		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4712		"webJobName":        autorest.Encode("path", webJobName),
4713	}
4714
4715	const APIVersion = "2021-01-15"
4716	queryParameters := map[string]interface{}{
4717		"api-version": APIVersion,
4718	}
4719
4720	preparer := autorest.CreatePreparer(
4721		autorest.AsDelete(),
4722		autorest.WithBaseURL(client.BaseURI),
4723		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters),
4724		autorest.WithQueryParameters(queryParameters))
4725	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4726}
4727
4728// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the
4729// http.Response Body if it receives an error.
4730func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
4731	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4732}
4733
4734// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always
4735// closes the http.Response Body.
4736func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4737	err = autorest.Respond(
4738		resp,
4739		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4740		autorest.ByClosing())
4741	result.Response = resp
4742	return
4743}
4744
4745// DeleteDeployment description for Delete a deployment by its ID for an app, or a deployment slot.
4746// Parameters:
4747// resourceGroupName - name of the resource group to which the resource belongs.
4748// name - name of the app.
4749// ID - deployment ID.
4750func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) {
4751	if tracing.IsEnabled() {
4752		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment")
4753		defer func() {
4754			sc := -1
4755			if result.Response != nil {
4756				sc = result.Response.StatusCode
4757			}
4758			tracing.EndSpan(ctx, sc, err)
4759		}()
4760	}
4761	if err := validation.Validate([]validation.Validation{
4762		{TargetValue: resourceGroupName,
4763			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4764				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4765				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4766		return result, validation.NewError("web.AppsClient", "DeleteDeployment", err.Error())
4767	}
4768
4769	req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID)
4770	if err != nil {
4771		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request")
4772		return
4773	}
4774
4775	resp, err := client.DeleteDeploymentSender(req)
4776	if err != nil {
4777		result.Response = resp
4778		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request")
4779		return
4780	}
4781
4782	result, err = client.DeleteDeploymentResponder(resp)
4783	if err != nil {
4784		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request")
4785		return
4786	}
4787
4788	return
4789}
4790
4791// DeleteDeploymentPreparer prepares the DeleteDeployment request.
4792func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
4793	pathParameters := map[string]interface{}{
4794		"id":                autorest.Encode("path", ID),
4795		"name":              autorest.Encode("path", name),
4796		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4797		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4798	}
4799
4800	const APIVersion = "2021-01-15"
4801	queryParameters := map[string]interface{}{
4802		"api-version": APIVersion,
4803	}
4804
4805	preparer := autorest.CreatePreparer(
4806		autorest.AsDelete(),
4807		autorest.WithBaseURL(client.BaseURI),
4808		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
4809		autorest.WithQueryParameters(queryParameters))
4810	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4811}
4812
4813// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the
4814// http.Response Body if it receives an error.
4815func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) {
4816	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4817}
4818
4819// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always
4820// closes the http.Response Body.
4821func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) {
4822	err = autorest.Respond(
4823		resp,
4824		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4825		autorest.ByClosing())
4826	result.Response = resp
4827	return
4828}
4829
4830// DeleteDeploymentSlot description for Delete a deployment by its ID for an app, or a deployment slot.
4831// Parameters:
4832// resourceGroupName - name of the resource group to which the resource belongs.
4833// name - name of the app.
4834// ID - deployment ID.
4835// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
4836// production slot.
4837func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) {
4838	if tracing.IsEnabled() {
4839		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot")
4840		defer func() {
4841			sc := -1
4842			if result.Response != nil {
4843				sc = result.Response.StatusCode
4844			}
4845			tracing.EndSpan(ctx, sc, err)
4846		}()
4847	}
4848	if err := validation.Validate([]validation.Validation{
4849		{TargetValue: resourceGroupName,
4850			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4851				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4852				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4853		return result, validation.NewError("web.AppsClient", "DeleteDeploymentSlot", err.Error())
4854	}
4855
4856	req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot)
4857	if err != nil {
4858		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request")
4859		return
4860	}
4861
4862	resp, err := client.DeleteDeploymentSlotSender(req)
4863	if err != nil {
4864		result.Response = resp
4865		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request")
4866		return
4867	}
4868
4869	result, err = client.DeleteDeploymentSlotResponder(resp)
4870	if err != nil {
4871		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request")
4872		return
4873	}
4874
4875	return
4876}
4877
4878// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request.
4879func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
4880	pathParameters := map[string]interface{}{
4881		"id":                autorest.Encode("path", ID),
4882		"name":              autorest.Encode("path", name),
4883		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4884		"slot":              autorest.Encode("path", slot),
4885		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4886	}
4887
4888	const APIVersion = "2021-01-15"
4889	queryParameters := map[string]interface{}{
4890		"api-version": APIVersion,
4891	}
4892
4893	preparer := autorest.CreatePreparer(
4894		autorest.AsDelete(),
4895		autorest.WithBaseURL(client.BaseURI),
4896		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
4897		autorest.WithQueryParameters(queryParameters))
4898	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4899}
4900
4901// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the
4902// http.Response Body if it receives an error.
4903func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) {
4904	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4905}
4906
4907// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always
4908// closes the http.Response Body.
4909func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4910	err = autorest.Respond(
4911		resp,
4912		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4913		autorest.ByClosing())
4914	result.Response = resp
4915	return
4916}
4917
4918// DeleteDomainOwnershipIdentifier description for Deletes a domain ownership identifier for a web app.
4919// Parameters:
4920// resourceGroupName - name of the resource group to which the resource belongs.
4921// name - name of the app.
4922// domainOwnershipIdentifierName - name of domain ownership identifier.
4923func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) {
4924	if tracing.IsEnabled() {
4925		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier")
4926		defer func() {
4927			sc := -1
4928			if result.Response != nil {
4929				sc = result.Response.StatusCode
4930			}
4931			tracing.EndSpan(ctx, sc, err)
4932		}()
4933	}
4934	if err := validation.Validate([]validation.Validation{
4935		{TargetValue: resourceGroupName,
4936			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4937				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4938				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4939		return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifier", err.Error())
4940	}
4941
4942	req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName)
4943	if err != nil {
4944		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request")
4945		return
4946	}
4947
4948	resp, err := client.DeleteDomainOwnershipIdentifierSender(req)
4949	if err != nil {
4950		result.Response = resp
4951		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request")
4952		return
4953	}
4954
4955	result, err = client.DeleteDomainOwnershipIdentifierResponder(resp)
4956	if err != nil {
4957		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request")
4958		return
4959	}
4960
4961	return
4962}
4963
4964// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request.
4965func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) {
4966	pathParameters := map[string]interface{}{
4967		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
4968		"name":                          autorest.Encode("path", name),
4969		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
4970		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
4971	}
4972
4973	const APIVersion = "2021-01-15"
4974	queryParameters := map[string]interface{}{
4975		"api-version": APIVersion,
4976	}
4977
4978	preparer := autorest.CreatePreparer(
4979		autorest.AsDelete(),
4980		autorest.WithBaseURL(client.BaseURI),
4981		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
4982		autorest.WithQueryParameters(queryParameters))
4983	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4984}
4985
4986// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the
4987// http.Response Body if it receives an error.
4988func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
4989	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4990}
4991
4992// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always
4993// closes the http.Response Body.
4994func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) {
4995	err = autorest.Respond(
4996		resp,
4997		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
4998		autorest.ByClosing())
4999	result.Response = resp
5000	return
5001}
5002
5003// DeleteDomainOwnershipIdentifierSlot description for Deletes a domain ownership identifier for a web app.
5004// Parameters:
5005// resourceGroupName - name of the resource group to which the resource belongs.
5006// name - name of the app.
5007// domainOwnershipIdentifierName - name of domain ownership identifier.
5008// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
5009// production slot.
5010func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) {
5011	if tracing.IsEnabled() {
5012		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot")
5013		defer func() {
5014			sc := -1
5015			if result.Response != nil {
5016				sc = result.Response.StatusCode
5017			}
5018			tracing.EndSpan(ctx, sc, err)
5019		}()
5020	}
5021	if err := validation.Validate([]validation.Validation{
5022		{TargetValue: resourceGroupName,
5023			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5024				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5025				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5026		return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", err.Error())
5027	}
5028
5029	req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot)
5030	if err != nil {
5031		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
5032		return
5033	}
5034
5035	resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req)
5036	if err != nil {
5037		result.Response = resp
5038		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request")
5039		return
5040	}
5041
5042	result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp)
5043	if err != nil {
5044		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
5045		return
5046	}
5047
5048	return
5049}
5050
5051// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request.
5052func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) {
5053	pathParameters := map[string]interface{}{
5054		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
5055		"name":                          autorest.Encode("path", name),
5056		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
5057		"slot":                          autorest.Encode("path", slot),
5058		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
5059	}
5060
5061	const APIVersion = "2021-01-15"
5062	queryParameters := map[string]interface{}{
5063		"api-version": APIVersion,
5064	}
5065
5066	preparer := autorest.CreatePreparer(
5067		autorest.AsDelete(),
5068		autorest.WithBaseURL(client.BaseURI),
5069		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
5070		autorest.WithQueryParameters(queryParameters))
5071	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5072}
5073
5074// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the
5075// http.Response Body if it receives an error.
5076func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
5077	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5078}
5079
5080// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always
5081// closes the http.Response Body.
5082func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5083	err = autorest.Respond(
5084		resp,
5085		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5086		autorest.ByClosing())
5087	result.Response = resp
5088	return
5089}
5090
5091// DeleteFunction description for Delete a function for web site, or a deployment slot.
5092// Parameters:
5093// resourceGroupName - name of the resource group to which the resource belongs.
5094// name - site name.
5095// functionName - function name.
5096func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) {
5097	if tracing.IsEnabled() {
5098		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction")
5099		defer func() {
5100			sc := -1
5101			if result.Response != nil {
5102				sc = result.Response.StatusCode
5103			}
5104			tracing.EndSpan(ctx, sc, err)
5105		}()
5106	}
5107	if err := validation.Validate([]validation.Validation{
5108		{TargetValue: resourceGroupName,
5109			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5110				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5111				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5112		return result, validation.NewError("web.AppsClient", "DeleteFunction", err.Error())
5113	}
5114
5115	req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName)
5116	if err != nil {
5117		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request")
5118		return
5119	}
5120
5121	resp, err := client.DeleteFunctionSender(req)
5122	if err != nil {
5123		result.Response = resp
5124		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request")
5125		return
5126	}
5127
5128	result, err = client.DeleteFunctionResponder(resp)
5129	if err != nil {
5130		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request")
5131		return
5132	}
5133
5134	return
5135}
5136
5137// DeleteFunctionPreparer prepares the DeleteFunction request.
5138func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
5139	pathParameters := map[string]interface{}{
5140		"functionName":      autorest.Encode("path", functionName),
5141		"name":              autorest.Encode("path", name),
5142		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5143		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5144	}
5145
5146	const APIVersion = "2021-01-15"
5147	queryParameters := map[string]interface{}{
5148		"api-version": APIVersion,
5149	}
5150
5151	preparer := autorest.CreatePreparer(
5152		autorest.AsDelete(),
5153		autorest.WithBaseURL(client.BaseURI),
5154		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
5155		autorest.WithQueryParameters(queryParameters))
5156	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5157}
5158
5159// DeleteFunctionSender sends the DeleteFunction request. The method will close the
5160// http.Response Body if it receives an error.
5161func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) {
5162	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5163}
5164
5165// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always
5166// closes the http.Response Body.
5167func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) {
5168	err = autorest.Respond(
5169		resp,
5170		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5171		autorest.ByClosing())
5172	result.Response = resp
5173	return
5174}
5175
5176// DeleteFunctionSecret description for Delete a function secret.
5177// Parameters:
5178// resourceGroupName - name of the resource group to which the resource belongs.
5179// name - site name.
5180// functionName - the name of the function.
5181// keyName - the name of the key.
5182func (client AppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) {
5183	if tracing.IsEnabled() {
5184		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecret")
5185		defer func() {
5186			sc := -1
5187			if result.Response != nil {
5188				sc = result.Response.StatusCode
5189			}
5190			tracing.EndSpan(ctx, sc, err)
5191		}()
5192	}
5193	if err := validation.Validate([]validation.Validation{
5194		{TargetValue: resourceGroupName,
5195			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5196				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5197				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5198		return result, validation.NewError("web.AppsClient", "DeleteFunctionSecret", err.Error())
5199	}
5200
5201	req, err := client.DeleteFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName)
5202	if err != nil {
5203		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", nil, "Failure preparing request")
5204		return
5205	}
5206
5207	resp, err := client.DeleteFunctionSecretSender(req)
5208	if err != nil {
5209		result.Response = resp
5210		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure sending request")
5211		return
5212	}
5213
5214	result, err = client.DeleteFunctionSecretResponder(resp)
5215	if err != nil {
5216		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure responding to request")
5217		return
5218	}
5219
5220	return
5221}
5222
5223// DeleteFunctionSecretPreparer prepares the DeleteFunctionSecret request.
5224func (client AppsClient) DeleteFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (*http.Request, error) {
5225	pathParameters := map[string]interface{}{
5226		"functionName":      autorest.Encode("path", functionName),
5227		"keyName":           autorest.Encode("path", keyName),
5228		"name":              autorest.Encode("path", name),
5229		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5230		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5231	}
5232
5233	const APIVersion = "2021-01-15"
5234	queryParameters := map[string]interface{}{
5235		"api-version": APIVersion,
5236	}
5237
5238	preparer := autorest.CreatePreparer(
5239		autorest.AsDelete(),
5240		autorest.WithBaseURL(client.BaseURI),
5241		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters),
5242		autorest.WithQueryParameters(queryParameters))
5243	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5244}
5245
5246// DeleteFunctionSecretSender sends the DeleteFunctionSecret request. The method will close the
5247// http.Response Body if it receives an error.
5248func (client AppsClient) DeleteFunctionSecretSender(req *http.Request) (*http.Response, error) {
5249	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5250}
5251
5252// DeleteFunctionSecretResponder handles the response to the DeleteFunctionSecret request. The method always
5253// closes the http.Response Body.
5254func (client AppsClient) DeleteFunctionSecretResponder(resp *http.Response) (result autorest.Response, err error) {
5255	err = autorest.Respond(
5256		resp,
5257		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5258		autorest.ByClosing())
5259	result.Response = resp
5260	return
5261}
5262
5263// DeleteFunctionSecretSlot description for Delete a function secret.
5264// Parameters:
5265// resourceGroupName - name of the resource group to which the resource belongs.
5266// name - site name.
5267// functionName - the name of the function.
5268// keyName - the name of the key.
5269// slot - name of the deployment slot.
5270func (client AppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) {
5271	if tracing.IsEnabled() {
5272		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecretSlot")
5273		defer func() {
5274			sc := -1
5275			if result.Response != nil {
5276				sc = result.Response.StatusCode
5277			}
5278			tracing.EndSpan(ctx, sc, err)
5279		}()
5280	}
5281	if err := validation.Validate([]validation.Validation{
5282		{TargetValue: resourceGroupName,
5283			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5284				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5285				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5286		return result, validation.NewError("web.AppsClient", "DeleteFunctionSecretSlot", err.Error())
5287	}
5288
5289	req, err := client.DeleteFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot)
5290	if err != nil {
5291		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", nil, "Failure preparing request")
5292		return
5293	}
5294
5295	resp, err := client.DeleteFunctionSecretSlotSender(req)
5296	if err != nil {
5297		result.Response = resp
5298		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure sending request")
5299		return
5300	}
5301
5302	result, err = client.DeleteFunctionSecretSlotResponder(resp)
5303	if err != nil {
5304		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure responding to request")
5305		return
5306	}
5307
5308	return
5309}
5310
5311// DeleteFunctionSecretSlotPreparer prepares the DeleteFunctionSecretSlot request.
5312func (client AppsClient) DeleteFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (*http.Request, error) {
5313	pathParameters := map[string]interface{}{
5314		"functionName":      autorest.Encode("path", functionName),
5315		"keyName":           autorest.Encode("path", keyName),
5316		"name":              autorest.Encode("path", name),
5317		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5318		"slot":              autorest.Encode("path", slot),
5319		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5320	}
5321
5322	const APIVersion = "2021-01-15"
5323	queryParameters := map[string]interface{}{
5324		"api-version": APIVersion,
5325	}
5326
5327	preparer := autorest.CreatePreparer(
5328		autorest.AsDelete(),
5329		autorest.WithBaseURL(client.BaseURI),
5330		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters),
5331		autorest.WithQueryParameters(queryParameters))
5332	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5333}
5334
5335// DeleteFunctionSecretSlotSender sends the DeleteFunctionSecretSlot request. The method will close the
5336// http.Response Body if it receives an error.
5337func (client AppsClient) DeleteFunctionSecretSlotSender(req *http.Request) (*http.Response, error) {
5338	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5339}
5340
5341// DeleteFunctionSecretSlotResponder handles the response to the DeleteFunctionSecretSlot request. The method always
5342// closes the http.Response Body.
5343func (client AppsClient) DeleteFunctionSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5344	err = autorest.Respond(
5345		resp,
5346		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5347		autorest.ByClosing())
5348	result.Response = resp
5349	return
5350}
5351
5352// DeleteHostNameBinding description for Deletes a hostname binding for an app.
5353// Parameters:
5354// resourceGroupName - name of the resource group to which the resource belongs.
5355// name - name of the app.
5356// hostName - hostname in the hostname binding.
5357func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) {
5358	if tracing.IsEnabled() {
5359		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding")
5360		defer func() {
5361			sc := -1
5362			if result.Response != nil {
5363				sc = result.Response.StatusCode
5364			}
5365			tracing.EndSpan(ctx, sc, err)
5366		}()
5367	}
5368	if err := validation.Validate([]validation.Validation{
5369		{TargetValue: resourceGroupName,
5370			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5371				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5372				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5373		return result, validation.NewError("web.AppsClient", "DeleteHostNameBinding", err.Error())
5374	}
5375
5376	req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName)
5377	if err != nil {
5378		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request")
5379		return
5380	}
5381
5382	resp, err := client.DeleteHostNameBindingSender(req)
5383	if err != nil {
5384		result.Response = resp
5385		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request")
5386		return
5387	}
5388
5389	result, err = client.DeleteHostNameBindingResponder(resp)
5390	if err != nil {
5391		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request")
5392		return
5393	}
5394
5395	return
5396}
5397
5398// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request.
5399func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
5400	pathParameters := map[string]interface{}{
5401		"hostName":          autorest.Encode("path", hostName),
5402		"name":              autorest.Encode("path", name),
5403		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5404		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5405	}
5406
5407	const APIVersion = "2021-01-15"
5408	queryParameters := map[string]interface{}{
5409		"api-version": APIVersion,
5410	}
5411
5412	preparer := autorest.CreatePreparer(
5413		autorest.AsDelete(),
5414		autorest.WithBaseURL(client.BaseURI),
5415		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
5416		autorest.WithQueryParameters(queryParameters))
5417	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5418}
5419
5420// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the
5421// http.Response Body if it receives an error.
5422func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) {
5423	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5424}
5425
5426// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always
5427// closes the http.Response Body.
5428func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) {
5429	err = autorest.Respond(
5430		resp,
5431		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5432		autorest.ByClosing())
5433	result.Response = resp
5434	return
5435}
5436
5437// DeleteHostNameBindingSlot description for Deletes a hostname binding for an app.
5438// Parameters:
5439// resourceGroupName - name of the resource group to which the resource belongs.
5440// name - name of the app.
5441// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
5442// production slot.
5443// hostName - hostname in the hostname binding.
5444func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) {
5445	if tracing.IsEnabled() {
5446		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot")
5447		defer func() {
5448			sc := -1
5449			if result.Response != nil {
5450				sc = result.Response.StatusCode
5451			}
5452			tracing.EndSpan(ctx, sc, err)
5453		}()
5454	}
5455	if err := validation.Validate([]validation.Validation{
5456		{TargetValue: resourceGroupName,
5457			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5458				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5459				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5460		return result, validation.NewError("web.AppsClient", "DeleteHostNameBindingSlot", err.Error())
5461	}
5462
5463	req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
5464	if err != nil {
5465		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request")
5466		return
5467	}
5468
5469	resp, err := client.DeleteHostNameBindingSlotSender(req)
5470	if err != nil {
5471		result.Response = resp
5472		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request")
5473		return
5474	}
5475
5476	result, err = client.DeleteHostNameBindingSlotResponder(resp)
5477	if err != nil {
5478		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request")
5479		return
5480	}
5481
5482	return
5483}
5484
5485// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request.
5486func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
5487	pathParameters := map[string]interface{}{
5488		"hostName":          autorest.Encode("path", hostName),
5489		"name":              autorest.Encode("path", name),
5490		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5491		"slot":              autorest.Encode("path", slot),
5492		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5493	}
5494
5495	const APIVersion = "2021-01-15"
5496	queryParameters := map[string]interface{}{
5497		"api-version": APIVersion,
5498	}
5499
5500	preparer := autorest.CreatePreparer(
5501		autorest.AsDelete(),
5502		autorest.WithBaseURL(client.BaseURI),
5503		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
5504		autorest.WithQueryParameters(queryParameters))
5505	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5506}
5507
5508// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the
5509// http.Response Body if it receives an error.
5510func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
5511	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5512}
5513
5514// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always
5515// closes the http.Response Body.
5516func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5517	err = autorest.Respond(
5518		resp,
5519		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5520		autorest.ByClosing())
5521	result.Response = resp
5522	return
5523}
5524
5525// DeleteHostSecret description for Delete a host level secret.
5526// Parameters:
5527// resourceGroupName - name of the resource group to which the resource belongs.
5528// name - site name.
5529// keyType - the type of host key.
5530// keyName - the name of the key.
5531func (client AppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) {
5532	if tracing.IsEnabled() {
5533		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecret")
5534		defer func() {
5535			sc := -1
5536			if result.Response != nil {
5537				sc = result.Response.StatusCode
5538			}
5539			tracing.EndSpan(ctx, sc, err)
5540		}()
5541	}
5542	if err := validation.Validate([]validation.Validation{
5543		{TargetValue: resourceGroupName,
5544			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5545				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5546				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5547		return result, validation.NewError("web.AppsClient", "DeleteHostSecret", err.Error())
5548	}
5549
5550	req, err := client.DeleteHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName)
5551	if err != nil {
5552		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", nil, "Failure preparing request")
5553		return
5554	}
5555
5556	resp, err := client.DeleteHostSecretSender(req)
5557	if err != nil {
5558		result.Response = resp
5559		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure sending request")
5560		return
5561	}
5562
5563	result, err = client.DeleteHostSecretResponder(resp)
5564	if err != nil {
5565		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure responding to request")
5566		return
5567	}
5568
5569	return
5570}
5571
5572// DeleteHostSecretPreparer prepares the DeleteHostSecret request.
5573func (client AppsClient) DeleteHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (*http.Request, error) {
5574	pathParameters := map[string]interface{}{
5575		"keyName":           autorest.Encode("path", keyName),
5576		"keyType":           autorest.Encode("path", keyType),
5577		"name":              autorest.Encode("path", name),
5578		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5579		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5580	}
5581
5582	const APIVersion = "2021-01-15"
5583	queryParameters := map[string]interface{}{
5584		"api-version": APIVersion,
5585	}
5586
5587	preparer := autorest.CreatePreparer(
5588		autorest.AsDelete(),
5589		autorest.WithBaseURL(client.BaseURI),
5590		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters),
5591		autorest.WithQueryParameters(queryParameters))
5592	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5593}
5594
5595// DeleteHostSecretSender sends the DeleteHostSecret request. The method will close the
5596// http.Response Body if it receives an error.
5597func (client AppsClient) DeleteHostSecretSender(req *http.Request) (*http.Response, error) {
5598	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5599}
5600
5601// DeleteHostSecretResponder handles the response to the DeleteHostSecret request. The method always
5602// closes the http.Response Body.
5603func (client AppsClient) DeleteHostSecretResponder(resp *http.Response) (result autorest.Response, err error) {
5604	err = autorest.Respond(
5605		resp,
5606		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5607		autorest.ByClosing())
5608	result.Response = resp
5609	return
5610}
5611
5612// DeleteHostSecretSlot description for Delete a host level secret.
5613// Parameters:
5614// resourceGroupName - name of the resource group to which the resource belongs.
5615// name - site name.
5616// keyType - the type of host key.
5617// keyName - the name of the key.
5618// slot - name of the deployment slot.
5619func (client AppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) {
5620	if tracing.IsEnabled() {
5621		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecretSlot")
5622		defer func() {
5623			sc := -1
5624			if result.Response != nil {
5625				sc = result.Response.StatusCode
5626			}
5627			tracing.EndSpan(ctx, sc, err)
5628		}()
5629	}
5630	if err := validation.Validate([]validation.Validation{
5631		{TargetValue: resourceGroupName,
5632			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5633				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5634				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5635		return result, validation.NewError("web.AppsClient", "DeleteHostSecretSlot", err.Error())
5636	}
5637
5638	req, err := client.DeleteHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot)
5639	if err != nil {
5640		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", nil, "Failure preparing request")
5641		return
5642	}
5643
5644	resp, err := client.DeleteHostSecretSlotSender(req)
5645	if err != nil {
5646		result.Response = resp
5647		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure sending request")
5648		return
5649	}
5650
5651	result, err = client.DeleteHostSecretSlotResponder(resp)
5652	if err != nil {
5653		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure responding to request")
5654		return
5655	}
5656
5657	return
5658}
5659
5660// DeleteHostSecretSlotPreparer prepares the DeleteHostSecretSlot request.
5661func (client AppsClient) DeleteHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (*http.Request, error) {
5662	pathParameters := map[string]interface{}{
5663		"keyName":           autorest.Encode("path", keyName),
5664		"keyType":           autorest.Encode("path", keyType),
5665		"name":              autorest.Encode("path", name),
5666		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5667		"slot":              autorest.Encode("path", slot),
5668		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5669	}
5670
5671	const APIVersion = "2021-01-15"
5672	queryParameters := map[string]interface{}{
5673		"api-version": APIVersion,
5674	}
5675
5676	preparer := autorest.CreatePreparer(
5677		autorest.AsDelete(),
5678		autorest.WithBaseURL(client.BaseURI),
5679		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters),
5680		autorest.WithQueryParameters(queryParameters))
5681	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5682}
5683
5684// DeleteHostSecretSlotSender sends the DeleteHostSecretSlot request. The method will close the
5685// http.Response Body if it receives an error.
5686func (client AppsClient) DeleteHostSecretSlotSender(req *http.Request) (*http.Response, error) {
5687	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5688}
5689
5690// DeleteHostSecretSlotResponder handles the response to the DeleteHostSecretSlot request. The method always
5691// closes the http.Response Body.
5692func (client AppsClient) DeleteHostSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5693	err = autorest.Respond(
5694		resp,
5695		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5696		autorest.ByClosing())
5697	result.Response = resp
5698	return
5699}
5700
5701// DeleteHybridConnection description for Removes a Hybrid Connection from this site.
5702// Parameters:
5703// resourceGroupName - name of the resource group to which the resource belongs.
5704// name - the name of the web app.
5705// namespaceName - the namespace for this hybrid connection.
5706// relayName - the relay name for this hybrid connection.
5707func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) {
5708	if tracing.IsEnabled() {
5709		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection")
5710		defer func() {
5711			sc := -1
5712			if result.Response != nil {
5713				sc = result.Response.StatusCode
5714			}
5715			tracing.EndSpan(ctx, sc, err)
5716		}()
5717	}
5718	if err := validation.Validate([]validation.Validation{
5719		{TargetValue: resourceGroupName,
5720			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5721				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5722				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5723		return result, validation.NewError("web.AppsClient", "DeleteHybridConnection", err.Error())
5724	}
5725
5726	req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
5727	if err != nil {
5728		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request")
5729		return
5730	}
5731
5732	resp, err := client.DeleteHybridConnectionSender(req)
5733	if err != nil {
5734		result.Response = resp
5735		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request")
5736		return
5737	}
5738
5739	result, err = client.DeleteHybridConnectionResponder(resp)
5740	if err != nil {
5741		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request")
5742		return
5743	}
5744
5745	return
5746}
5747
5748// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request.
5749func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
5750	pathParameters := map[string]interface{}{
5751		"name":              autorest.Encode("path", name),
5752		"namespaceName":     autorest.Encode("path", namespaceName),
5753		"relayName":         autorest.Encode("path", relayName),
5754		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5755		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5756	}
5757
5758	const APIVersion = "2021-01-15"
5759	queryParameters := map[string]interface{}{
5760		"api-version": APIVersion,
5761	}
5762
5763	preparer := autorest.CreatePreparer(
5764		autorest.AsDelete(),
5765		autorest.WithBaseURL(client.BaseURI),
5766		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
5767		autorest.WithQueryParameters(queryParameters))
5768	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5769}
5770
5771// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the
5772// http.Response Body if it receives an error.
5773func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) {
5774	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5775}
5776
5777// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always
5778// closes the http.Response Body.
5779func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
5780	err = autorest.Respond(
5781		resp,
5782		azure.WithErrorUnlessStatusCode(http.StatusOK),
5783		autorest.ByClosing())
5784	result.Response = resp
5785	return
5786}
5787
5788// DeleteHybridConnectionSlot description for Removes a Hybrid Connection from this site.
5789// Parameters:
5790// resourceGroupName - name of the resource group to which the resource belongs.
5791// name - the name of the web app.
5792// namespaceName - the namespace for this hybrid connection.
5793// relayName - the relay name for this hybrid connection.
5794// slot - the name of the slot for the web app.
5795func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) {
5796	if tracing.IsEnabled() {
5797		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot")
5798		defer func() {
5799			sc := -1
5800			if result.Response != nil {
5801				sc = result.Response.StatusCode
5802			}
5803			tracing.EndSpan(ctx, sc, err)
5804		}()
5805	}
5806	if err := validation.Validate([]validation.Validation{
5807		{TargetValue: resourceGroupName,
5808			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5809				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5810				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5811		return result, validation.NewError("web.AppsClient", "DeleteHybridConnectionSlot", err.Error())
5812	}
5813
5814	req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
5815	if err != nil {
5816		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request")
5817		return
5818	}
5819
5820	resp, err := client.DeleteHybridConnectionSlotSender(req)
5821	if err != nil {
5822		result.Response = resp
5823		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request")
5824		return
5825	}
5826
5827	result, err = client.DeleteHybridConnectionSlotResponder(resp)
5828	if err != nil {
5829		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request")
5830		return
5831	}
5832
5833	return
5834}
5835
5836// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request.
5837func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
5838	pathParameters := map[string]interface{}{
5839		"name":              autorest.Encode("path", name),
5840		"namespaceName":     autorest.Encode("path", namespaceName),
5841		"relayName":         autorest.Encode("path", relayName),
5842		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5843		"slot":              autorest.Encode("path", slot),
5844		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5845	}
5846
5847	const APIVersion = "2021-01-15"
5848	queryParameters := map[string]interface{}{
5849		"api-version": APIVersion,
5850	}
5851
5852	preparer := autorest.CreatePreparer(
5853		autorest.AsDelete(),
5854		autorest.WithBaseURL(client.BaseURI),
5855		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
5856		autorest.WithQueryParameters(queryParameters))
5857	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5858}
5859
5860// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the
5861// http.Response Body if it receives an error.
5862func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
5863	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5864}
5865
5866// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always
5867// closes the http.Response Body.
5868func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5869	err = autorest.Respond(
5870		resp,
5871		azure.WithErrorUnlessStatusCode(http.StatusOK),
5872		autorest.ByClosing())
5873	result.Response = resp
5874	return
5875}
5876
5877// DeleteInstanceFunctionSlot description for Delete a function for web site, or a deployment slot.
5878// Parameters:
5879// resourceGroupName - name of the resource group to which the resource belongs.
5880// name - site name.
5881// functionName - function name.
5882// slot - name of the deployment slot.
5883func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) {
5884	if tracing.IsEnabled() {
5885		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot")
5886		defer func() {
5887			sc := -1
5888			if result.Response != nil {
5889				sc = result.Response.StatusCode
5890			}
5891			tracing.EndSpan(ctx, sc, err)
5892		}()
5893	}
5894	if err := validation.Validate([]validation.Validation{
5895		{TargetValue: resourceGroupName,
5896			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5897				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5898				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5899		return result, validation.NewError("web.AppsClient", "DeleteInstanceFunctionSlot", err.Error())
5900	}
5901
5902	req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
5903	if err != nil {
5904		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request")
5905		return
5906	}
5907
5908	resp, err := client.DeleteInstanceFunctionSlotSender(req)
5909	if err != nil {
5910		result.Response = resp
5911		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request")
5912		return
5913	}
5914
5915	result, err = client.DeleteInstanceFunctionSlotResponder(resp)
5916	if err != nil {
5917		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request")
5918		return
5919	}
5920
5921	return
5922}
5923
5924// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request.
5925func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
5926	pathParameters := map[string]interface{}{
5927		"functionName":      autorest.Encode("path", functionName),
5928		"name":              autorest.Encode("path", name),
5929		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5930		"slot":              autorest.Encode("path", slot),
5931		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5932	}
5933
5934	const APIVersion = "2021-01-15"
5935	queryParameters := map[string]interface{}{
5936		"api-version": APIVersion,
5937	}
5938
5939	preparer := autorest.CreatePreparer(
5940		autorest.AsDelete(),
5941		autorest.WithBaseURL(client.BaseURI),
5942		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
5943		autorest.WithQueryParameters(queryParameters))
5944	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5945}
5946
5947// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the
5948// http.Response Body if it receives an error.
5949func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) {
5950	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5951}
5952
5953// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always
5954// closes the http.Response Body.
5955func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5956	err = autorest.Respond(
5957		resp,
5958		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5959		autorest.ByClosing())
5960	result.Response = resp
5961	return
5962}
5963
5964// DeleteInstanceProcess description for Terminate a process by its ID for a web site, or a deployment slot, or
5965// specific scaled-out instance in a web site.
5966// Parameters:
5967// resourceGroupName - name of the resource group to which the resource belongs.
5968// name - site name.
5969// processID - pID.
5970// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
5971// response from "GET api/sites/{siteName}/instances".
5972func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) {
5973	if tracing.IsEnabled() {
5974		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess")
5975		defer func() {
5976			sc := -1
5977			if result.Response != nil {
5978				sc = result.Response.StatusCode
5979			}
5980			tracing.EndSpan(ctx, sc, err)
5981		}()
5982	}
5983	if err := validation.Validate([]validation.Validation{
5984		{TargetValue: resourceGroupName,
5985			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5986				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5987				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5988		return result, validation.NewError("web.AppsClient", "DeleteInstanceProcess", err.Error())
5989	}
5990
5991	req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID)
5992	if err != nil {
5993		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request")
5994		return
5995	}
5996
5997	resp, err := client.DeleteInstanceProcessSender(req)
5998	if err != nil {
5999		result.Response = resp
6000		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request")
6001		return
6002	}
6003
6004	result, err = client.DeleteInstanceProcessResponder(resp)
6005	if err != nil {
6006		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request")
6007		return
6008	}
6009
6010	return
6011}
6012
6013// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request.
6014func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
6015	pathParameters := map[string]interface{}{
6016		"instanceId":        autorest.Encode("path", instanceID),
6017		"name":              autorest.Encode("path", name),
6018		"processId":         autorest.Encode("path", processID),
6019		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6020		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6021	}
6022
6023	const APIVersion = "2021-01-15"
6024	queryParameters := map[string]interface{}{
6025		"api-version": APIVersion,
6026	}
6027
6028	preparer := autorest.CreatePreparer(
6029		autorest.AsDelete(),
6030		autorest.WithBaseURL(client.BaseURI),
6031		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters),
6032		autorest.WithQueryParameters(queryParameters))
6033	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6034}
6035
6036// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the
6037// http.Response Body if it receives an error.
6038func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) {
6039	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6040}
6041
6042// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always
6043// closes the http.Response Body.
6044func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) {
6045	err = autorest.Respond(
6046		resp,
6047		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6048		autorest.ByClosing())
6049	result.Response = resp
6050	return
6051}
6052
6053// DeleteInstanceProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or
6054// specific scaled-out instance in a web site.
6055// Parameters:
6056// resourceGroupName - name of the resource group to which the resource belongs.
6057// name - site name.
6058// processID - pID.
6059// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
6060// production slot.
6061// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
6062// response from "GET api/sites/{siteName}/instances".
6063func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) {
6064	if tracing.IsEnabled() {
6065		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot")
6066		defer func() {
6067			sc := -1
6068			if result.Response != nil {
6069				sc = result.Response.StatusCode
6070			}
6071			tracing.EndSpan(ctx, sc, err)
6072		}()
6073	}
6074	if err := validation.Validate([]validation.Validation{
6075		{TargetValue: resourceGroupName,
6076			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6077				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6078				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6079		return result, validation.NewError("web.AppsClient", "DeleteInstanceProcessSlot", err.Error())
6080	}
6081
6082	req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
6083	if err != nil {
6084		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request")
6085		return
6086	}
6087
6088	resp, err := client.DeleteInstanceProcessSlotSender(req)
6089	if err != nil {
6090		result.Response = resp
6091		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request")
6092		return
6093	}
6094
6095	result, err = client.DeleteInstanceProcessSlotResponder(resp)
6096	if err != nil {
6097		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request")
6098		return
6099	}
6100
6101	return
6102}
6103
6104// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request.
6105func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
6106	pathParameters := map[string]interface{}{
6107		"instanceId":        autorest.Encode("path", instanceID),
6108		"name":              autorest.Encode("path", name),
6109		"processId":         autorest.Encode("path", processID),
6110		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6111		"slot":              autorest.Encode("path", slot),
6112		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6113	}
6114
6115	const APIVersion = "2021-01-15"
6116	queryParameters := map[string]interface{}{
6117		"api-version": APIVersion,
6118	}
6119
6120	preparer := autorest.CreatePreparer(
6121		autorest.AsDelete(),
6122		autorest.WithBaseURL(client.BaseURI),
6123		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters),
6124		autorest.WithQueryParameters(queryParameters))
6125	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6126}
6127
6128// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the
6129// http.Response Body if it receives an error.
6130func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) {
6131	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6132}
6133
6134// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always
6135// closes the http.Response Body.
6136func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6137	err = autorest.Respond(
6138		resp,
6139		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6140		autorest.ByClosing())
6141	result.Response = resp
6142	return
6143}
6144
6145// DeletePremierAddOn description for Delete a premier add-on from an app.
6146// Parameters:
6147// resourceGroupName - name of the resource group to which the resource belongs.
6148// name - name of the app.
6149// premierAddOnName - add-on name.
6150func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) {
6151	if tracing.IsEnabled() {
6152		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn")
6153		defer func() {
6154			sc := -1
6155			if result.Response != nil {
6156				sc = result.Response.StatusCode
6157			}
6158			tracing.EndSpan(ctx, sc, err)
6159		}()
6160	}
6161	if err := validation.Validate([]validation.Validation{
6162		{TargetValue: resourceGroupName,
6163			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6164				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6165				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6166		return result, validation.NewError("web.AppsClient", "DeletePremierAddOn", err.Error())
6167	}
6168
6169	req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName)
6170	if err != nil {
6171		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request")
6172		return
6173	}
6174
6175	resp, err := client.DeletePremierAddOnSender(req)
6176	if err != nil {
6177		result.Response = resp
6178		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request")
6179		return
6180	}
6181
6182	result, err = client.DeletePremierAddOnResponder(resp)
6183	if err != nil {
6184		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request")
6185		return
6186	}
6187
6188	return
6189}
6190
6191// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request.
6192func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) {
6193	pathParameters := map[string]interface{}{
6194		"name":              autorest.Encode("path", name),
6195		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
6196		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6197		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6198	}
6199
6200	const APIVersion = "2021-01-15"
6201	queryParameters := map[string]interface{}{
6202		"api-version": APIVersion,
6203	}
6204
6205	preparer := autorest.CreatePreparer(
6206		autorest.AsDelete(),
6207		autorest.WithBaseURL(client.BaseURI),
6208		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
6209		autorest.WithQueryParameters(queryParameters))
6210	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6211}
6212
6213// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the
6214// http.Response Body if it receives an error.
6215func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) {
6216	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6217}
6218
6219// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always
6220// closes the http.Response Body.
6221func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) {
6222	err = autorest.Respond(
6223		resp,
6224		azure.WithErrorUnlessStatusCode(http.StatusOK),
6225		autorest.ByClosing())
6226	result.Response = resp
6227	return
6228}
6229
6230// DeletePremierAddOnSlot description for Delete a premier add-on from an app.
6231// Parameters:
6232// resourceGroupName - name of the resource group to which the resource belongs.
6233// name - name of the app.
6234// premierAddOnName - add-on name.
6235// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the
6236// production slot.
6237func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) {
6238	if tracing.IsEnabled() {
6239		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot")
6240		defer func() {
6241			sc := -1
6242			if result.Response != nil {
6243				sc = result.Response.StatusCode
6244			}
6245			tracing.EndSpan(ctx, sc, err)
6246		}()
6247	}
6248	if err := validation.Validate([]validation.Validation{
6249		{TargetValue: resourceGroupName,
6250			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6251				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6252				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6253		return result, validation.NewError("web.AppsClient", "DeletePremierAddOnSlot", err.Error())
6254	}
6255
6256	req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot)
6257	if err != nil {
6258		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request")
6259		return
6260	}
6261
6262	resp, err := client.DeletePremierAddOnSlotSender(req)
6263	if err != nil {
6264		result.Response = resp
6265		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request")
6266		return
6267	}
6268
6269	result, err = client.DeletePremierAddOnSlotResponder(resp)
6270	if err != nil {
6271		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request")
6272		return
6273	}
6274
6275	return
6276}
6277
6278// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request.
6279func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) {
6280	pathParameters := map[string]interface{}{
6281		"name":              autorest.Encode("path", name),
6282		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
6283		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6284		"slot":              autorest.Encode("path", slot),
6285		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6286	}
6287
6288	const APIVersion = "2021-01-15"
6289	queryParameters := map[string]interface{}{
6290		"api-version": APIVersion,
6291	}
6292
6293	preparer := autorest.CreatePreparer(
6294		autorest.AsDelete(),
6295		autorest.WithBaseURL(client.BaseURI),
6296		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
6297		autorest.WithQueryParameters(queryParameters))
6298	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6299}
6300
6301// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the
6302// http.Response Body if it receives an error.
6303func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
6304	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6305}
6306
6307// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always
6308// closes the http.Response Body.
6309func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6310	err = autorest.Respond(
6311		resp,
6312		azure.WithErrorUnlessStatusCode(http.StatusOK),
6313		autorest.ByClosing())
6314	result.Response = resp
6315	return
6316}
6317
6318// DeletePrivateEndpointConnection description for Deletes a private endpoint connection
6319// Parameters:
6320// resourceGroupName - name of the resource group to which the resource belongs.
6321// name - name of the site.
6322func (client AppsClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result AppsDeletePrivateEndpointConnectionFuture, err error) {
6323	if tracing.IsEnabled() {
6324		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePrivateEndpointConnection")
6325		defer func() {
6326			sc := -1
6327			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
6328				sc = result.FutureAPI.Response().StatusCode
6329			}
6330			tracing.EndSpan(ctx, sc, err)
6331		}()
6332	}
6333	if err := validation.Validate([]validation.Validation{
6334		{TargetValue: resourceGroupName,
6335			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6336				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6337				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6338		return result, validation.NewError("web.AppsClient", "DeletePrivateEndpointConnection", err.Error())
6339	}
6340
6341	req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName)
6342	if err != nil {
6343		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request")
6344		return
6345	}
6346
6347	result, err = client.DeletePrivateEndpointConnectionSender(req)
6348	if err != nil {
6349		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePrivateEndpointConnection", nil, "Failure sending request")
6350		return
6351	}
6352
6353	return
6354}
6355
6356// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request.
6357func (client AppsClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) {
6358	pathParameters := map[string]interface{}{
6359		"name":                          autorest.Encode("path", name),
6360		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
6361		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
6362		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
6363	}
6364
6365	const APIVersion = "2021-01-15"
6366	queryParameters := map[string]interface{}{
6367		"api-version": APIVersion,
6368	}
6369
6370	preparer := autorest.CreatePreparer(
6371		autorest.AsDelete(),
6372		autorest.WithBaseURL(client.BaseURI),
6373		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
6374		autorest.WithQueryParameters(queryParameters))
6375	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6376}
6377
6378// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the
6379// http.Response Body if it receives an error.
6380func (client AppsClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future AppsDeletePrivateEndpointConnectionFuture, err error) {
6381	var resp *http.Response
6382	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
6383	if err != nil {
6384		return
6385	}
6386	var azf azure.Future
6387	azf, err = azure.NewFutureFromResponse(resp)
6388	future.FutureAPI = &azf
6389	future.Result = future.result
6390	return
6391}
6392
6393// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always
6394// closes the http.Response Body.
6395func (client AppsClient) DeletePrivateEndpointConnectionResponder(resp *http.Response) (result SetObject, err error) {
6396	err = autorest.Respond(
6397		resp,
6398		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
6399		autorest.ByUnmarshallingJSON(&result),
6400		autorest.ByClosing())
6401	result.Response = autorest.Response{Response: resp}
6402	return
6403}
6404
6405// DeletePrivateEndpointConnectionSlot description for Deletes a private endpoint connection
6406// Parameters:
6407// resourceGroupName - name of the resource group to which the resource belongs.
6408// name - name of the site.
6409func (client AppsClient) DeletePrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string) (result AppsDeletePrivateEndpointConnectionSlotFuture, err error) {
6410	if tracing.IsEnabled() {
6411		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePrivateEndpointConnectionSlot")
6412		defer func() {
6413			sc := -1
6414			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
6415				sc = result.FutureAPI.Response().StatusCode
6416			}
6417			tracing.EndSpan(ctx, sc, err)
6418		}()
6419	}
6420	if err := validation.Validate([]validation.Validation{
6421		{TargetValue: resourceGroupName,
6422			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6423				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6424				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6425		return result, validation.NewError("web.AppsClient", "DeletePrivateEndpointConnectionSlot", err.Error())
6426	}
6427
6428	req, err := client.DeletePrivateEndpointConnectionSlotPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName, slot)
6429	if err != nil {
6430		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePrivateEndpointConnectionSlot", nil, "Failure preparing request")
6431		return
6432	}
6433
6434	result, err = client.DeletePrivateEndpointConnectionSlotSender(req)
6435	if err != nil {
6436		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePrivateEndpointConnectionSlot", nil, "Failure sending request")
6437		return
6438	}
6439
6440	return
6441}
6442
6443// DeletePrivateEndpointConnectionSlotPreparer prepares the DeletePrivateEndpointConnectionSlot request.
6444func (client AppsClient) DeletePrivateEndpointConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string) (*http.Request, error) {
6445	pathParameters := map[string]interface{}{
6446		"name":                          autorest.Encode("path", name),
6447		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
6448		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
6449		"slot":                          autorest.Encode("path", slot),
6450		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
6451	}
6452
6453	const APIVersion = "2021-01-15"
6454	queryParameters := map[string]interface{}{
6455		"api-version": APIVersion,
6456	}
6457
6458	preparer := autorest.CreatePreparer(
6459		autorest.AsDelete(),
6460		autorest.WithBaseURL(client.BaseURI),
6461		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
6462		autorest.WithQueryParameters(queryParameters))
6463	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6464}
6465
6466// DeletePrivateEndpointConnectionSlotSender sends the DeletePrivateEndpointConnectionSlot request. The method will close the
6467// http.Response Body if it receives an error.
6468func (client AppsClient) DeletePrivateEndpointConnectionSlotSender(req *http.Request) (future AppsDeletePrivateEndpointConnectionSlotFuture, err error) {
6469	var resp *http.Response
6470	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
6471	if err != nil {
6472		return
6473	}
6474	var azf azure.Future
6475	azf, err = azure.NewFutureFromResponse(resp)
6476	future.FutureAPI = &azf
6477	future.Result = future.result
6478	return
6479}
6480
6481// DeletePrivateEndpointConnectionSlotResponder handles the response to the DeletePrivateEndpointConnectionSlot request. The method always
6482// closes the http.Response Body.
6483func (client AppsClient) DeletePrivateEndpointConnectionSlotResponder(resp *http.Response) (result SetObject, err error) {
6484	err = autorest.Respond(
6485		resp,
6486		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
6487		autorest.ByUnmarshallingJSON(&result),
6488		autorest.ByClosing())
6489	result.Response = autorest.Response{Response: resp}
6490	return
6491}
6492
6493// DeleteProcess description for Terminate a process by its ID for a web site, or a deployment slot, or specific
6494// scaled-out instance in a web site.
6495// Parameters:
6496// resourceGroupName - name of the resource group to which the resource belongs.
6497// name - site name.
6498// processID - pID.
6499func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) {
6500	if tracing.IsEnabled() {
6501		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess")
6502		defer func() {
6503			sc := -1
6504			if result.Response != nil {
6505				sc = result.Response.StatusCode
6506			}
6507			tracing.EndSpan(ctx, sc, err)
6508		}()
6509	}
6510	if err := validation.Validate([]validation.Validation{
6511		{TargetValue: resourceGroupName,
6512			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6513				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6514				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6515		return result, validation.NewError("web.AppsClient", "DeleteProcess", err.Error())
6516	}
6517
6518	req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID)
6519	if err != nil {
6520		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request")
6521		return
6522	}
6523
6524	resp, err := client.DeleteProcessSender(req)
6525	if err != nil {
6526		result.Response = resp
6527		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request")
6528		return
6529	}
6530
6531	result, err = client.DeleteProcessResponder(resp)
6532	if err != nil {
6533		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request")
6534		return
6535	}
6536
6537	return
6538}
6539
6540// DeleteProcessPreparer prepares the DeleteProcess request.
6541func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
6542	pathParameters := map[string]interface{}{
6543		"name":              autorest.Encode("path", name),
6544		"processId":         autorest.Encode("path", processID),
6545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6546		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6547	}
6548
6549	const APIVersion = "2021-01-15"
6550	queryParameters := map[string]interface{}{
6551		"api-version": APIVersion,
6552	}
6553
6554	preparer := autorest.CreatePreparer(
6555		autorest.AsDelete(),
6556		autorest.WithBaseURL(client.BaseURI),
6557		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters),
6558		autorest.WithQueryParameters(queryParameters))
6559	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6560}
6561
6562// DeleteProcessSender sends the DeleteProcess request. The method will close the
6563// http.Response Body if it receives an error.
6564func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) {
6565	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6566}
6567
6568// DeleteProcessResponder handles the response to the DeleteProcess request. The method always
6569// closes the http.Response Body.
6570func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) {
6571	err = autorest.Respond(
6572		resp,
6573		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6574		autorest.ByClosing())
6575	result.Response = resp
6576	return
6577}
6578
6579// DeleteProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or specific
6580// scaled-out instance in a web site.
6581// Parameters:
6582// resourceGroupName - name of the resource group to which the resource belongs.
6583// name - site name.
6584// processID - pID.
6585// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
6586// production slot.
6587func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) {
6588	if tracing.IsEnabled() {
6589		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot")
6590		defer func() {
6591			sc := -1
6592			if result.Response != nil {
6593				sc = result.Response.StatusCode
6594			}
6595			tracing.EndSpan(ctx, sc, err)
6596		}()
6597	}
6598	if err := validation.Validate([]validation.Validation{
6599		{TargetValue: resourceGroupName,
6600			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6601				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6602				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6603		return result, validation.NewError("web.AppsClient", "DeleteProcessSlot", err.Error())
6604	}
6605
6606	req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot)
6607	if err != nil {
6608		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request")
6609		return
6610	}
6611
6612	resp, err := client.DeleteProcessSlotSender(req)
6613	if err != nil {
6614		result.Response = resp
6615		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request")
6616		return
6617	}
6618
6619	result, err = client.DeleteProcessSlotResponder(resp)
6620	if err != nil {
6621		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request")
6622		return
6623	}
6624
6625	return
6626}
6627
6628// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request.
6629func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
6630	pathParameters := map[string]interface{}{
6631		"name":              autorest.Encode("path", name),
6632		"processId":         autorest.Encode("path", processID),
6633		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6634		"slot":              autorest.Encode("path", slot),
6635		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6636	}
6637
6638	const APIVersion = "2021-01-15"
6639	queryParameters := map[string]interface{}{
6640		"api-version": APIVersion,
6641	}
6642
6643	preparer := autorest.CreatePreparer(
6644		autorest.AsDelete(),
6645		autorest.WithBaseURL(client.BaseURI),
6646		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters),
6647		autorest.WithQueryParameters(queryParameters))
6648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6649}
6650
6651// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the
6652// http.Response Body if it receives an error.
6653func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) {
6654	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6655}
6656
6657// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always
6658// closes the http.Response Body.
6659func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6660	err = autorest.Respond(
6661		resp,
6662		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6663		autorest.ByClosing())
6664	result.Response = resp
6665	return
6666}
6667
6668// DeletePublicCertificate description for Deletes a hostname binding for an app.
6669// Parameters:
6670// resourceGroupName - name of the resource group to which the resource belongs.
6671// name - name of the app.
6672// publicCertificateName - public certificate name.
6673func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) {
6674	if tracing.IsEnabled() {
6675		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate")
6676		defer func() {
6677			sc := -1
6678			if result.Response != nil {
6679				sc = result.Response.StatusCode
6680			}
6681			tracing.EndSpan(ctx, sc, err)
6682		}()
6683	}
6684	if err := validation.Validate([]validation.Validation{
6685		{TargetValue: resourceGroupName,
6686			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6687				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6688				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6689		return result, validation.NewError("web.AppsClient", "DeletePublicCertificate", err.Error())
6690	}
6691
6692	req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName)
6693	if err != nil {
6694		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request")
6695		return
6696	}
6697
6698	resp, err := client.DeletePublicCertificateSender(req)
6699	if err != nil {
6700		result.Response = resp
6701		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request")
6702		return
6703	}
6704
6705	result, err = client.DeletePublicCertificateResponder(resp)
6706	if err != nil {
6707		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request")
6708		return
6709	}
6710
6711	return
6712}
6713
6714// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request.
6715func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) {
6716	pathParameters := map[string]interface{}{
6717		"name":                  autorest.Encode("path", name),
6718		"publicCertificateName": autorest.Encode("path", publicCertificateName),
6719		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
6720		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
6721	}
6722
6723	const APIVersion = "2021-01-15"
6724	queryParameters := map[string]interface{}{
6725		"api-version": APIVersion,
6726	}
6727
6728	preparer := autorest.CreatePreparer(
6729		autorest.AsDelete(),
6730		autorest.WithBaseURL(client.BaseURI),
6731		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
6732		autorest.WithQueryParameters(queryParameters))
6733	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6734}
6735
6736// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the
6737// http.Response Body if it receives an error.
6738func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) {
6739	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6740}
6741
6742// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always
6743// closes the http.Response Body.
6744func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) {
6745	err = autorest.Respond(
6746		resp,
6747		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6748		autorest.ByClosing())
6749	result.Response = resp
6750	return
6751}
6752
6753// DeletePublicCertificateSlot description for Deletes a hostname binding for an app.
6754// Parameters:
6755// resourceGroupName - name of the resource group to which the resource belongs.
6756// name - name of the app.
6757// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
6758// production slot.
6759// publicCertificateName - public certificate name.
6760func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) {
6761	if tracing.IsEnabled() {
6762		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot")
6763		defer func() {
6764			sc := -1
6765			if result.Response != nil {
6766				sc = result.Response.StatusCode
6767			}
6768			tracing.EndSpan(ctx, sc, err)
6769		}()
6770	}
6771	if err := validation.Validate([]validation.Validation{
6772		{TargetValue: resourceGroupName,
6773			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6774				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6775				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6776		return result, validation.NewError("web.AppsClient", "DeletePublicCertificateSlot", err.Error())
6777	}
6778
6779	req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName)
6780	if err != nil {
6781		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request")
6782		return
6783	}
6784
6785	resp, err := client.DeletePublicCertificateSlotSender(req)
6786	if err != nil {
6787		result.Response = resp
6788		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request")
6789		return
6790	}
6791
6792	result, err = client.DeletePublicCertificateSlotResponder(resp)
6793	if err != nil {
6794		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request")
6795		return
6796	}
6797
6798	return
6799}
6800
6801// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request.
6802func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) {
6803	pathParameters := map[string]interface{}{
6804		"name":                  autorest.Encode("path", name),
6805		"publicCertificateName": autorest.Encode("path", publicCertificateName),
6806		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
6807		"slot":                  autorest.Encode("path", slot),
6808		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
6809	}
6810
6811	const APIVersion = "2021-01-15"
6812	queryParameters := map[string]interface{}{
6813		"api-version": APIVersion,
6814	}
6815
6816	preparer := autorest.CreatePreparer(
6817		autorest.AsDelete(),
6818		autorest.WithBaseURL(client.BaseURI),
6819		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
6820		autorest.WithQueryParameters(queryParameters))
6821	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6822}
6823
6824// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the
6825// http.Response Body if it receives an error.
6826func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
6827	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6828}
6829
6830// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always
6831// closes the http.Response Body.
6832func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6833	err = autorest.Respond(
6834		resp,
6835		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
6836		autorest.ByClosing())
6837	result.Response = resp
6838	return
6839}
6840
6841// DeleteRelayServiceConnection description for Deletes a relay service connection by its name.
6842// Parameters:
6843// resourceGroupName - name of the resource group to which the resource belongs.
6844// name - name of the app.
6845// entityName - name of the hybrid connection configuration.
6846func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) {
6847	if tracing.IsEnabled() {
6848		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection")
6849		defer func() {
6850			sc := -1
6851			if result.Response != nil {
6852				sc = result.Response.StatusCode
6853			}
6854			tracing.EndSpan(ctx, sc, err)
6855		}()
6856	}
6857	if err := validation.Validate([]validation.Validation{
6858		{TargetValue: resourceGroupName,
6859			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6860				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6861				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6862		return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnection", err.Error())
6863	}
6864
6865	req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName)
6866	if err != nil {
6867		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request")
6868		return
6869	}
6870
6871	resp, err := client.DeleteRelayServiceConnectionSender(req)
6872	if err != nil {
6873		result.Response = resp
6874		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request")
6875		return
6876	}
6877
6878	result, err = client.DeleteRelayServiceConnectionResponder(resp)
6879	if err != nil {
6880		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request")
6881		return
6882	}
6883
6884	return
6885}
6886
6887// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request.
6888func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) {
6889	pathParameters := map[string]interface{}{
6890		"entityName":        autorest.Encode("path", entityName),
6891		"name":              autorest.Encode("path", name),
6892		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6893		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6894	}
6895
6896	const APIVersion = "2021-01-15"
6897	queryParameters := map[string]interface{}{
6898		"api-version": APIVersion,
6899	}
6900
6901	preparer := autorest.CreatePreparer(
6902		autorest.AsDelete(),
6903		autorest.WithBaseURL(client.BaseURI),
6904		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
6905		autorest.WithQueryParameters(queryParameters))
6906	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6907}
6908
6909// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the
6910// http.Response Body if it receives an error.
6911func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
6912	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6913}
6914
6915// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always
6916// closes the http.Response Body.
6917func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
6918	err = autorest.Respond(
6919		resp,
6920		azure.WithErrorUnlessStatusCode(http.StatusOK),
6921		autorest.ByClosing())
6922	result.Response = resp
6923	return
6924}
6925
6926// DeleteRelayServiceConnectionSlot description for Deletes a relay service connection by its name.
6927// Parameters:
6928// resourceGroupName - name of the resource group to which the resource belongs.
6929// name - name of the app.
6930// entityName - name of the hybrid connection configuration.
6931// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for
6932// the production slot.
6933func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) {
6934	if tracing.IsEnabled() {
6935		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot")
6936		defer func() {
6937			sc := -1
6938			if result.Response != nil {
6939				sc = result.Response.StatusCode
6940			}
6941			tracing.EndSpan(ctx, sc, err)
6942		}()
6943	}
6944	if err := validation.Validate([]validation.Validation{
6945		{TargetValue: resourceGroupName,
6946			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6947				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6948				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6949		return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnectionSlot", err.Error())
6950	}
6951
6952	req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot)
6953	if err != nil {
6954		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request")
6955		return
6956	}
6957
6958	resp, err := client.DeleteRelayServiceConnectionSlotSender(req)
6959	if err != nil {
6960		result.Response = resp
6961		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request")
6962		return
6963	}
6964
6965	result, err = client.DeleteRelayServiceConnectionSlotResponder(resp)
6966	if err != nil {
6967		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request")
6968		return
6969	}
6970
6971	return
6972}
6973
6974// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request.
6975func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) {
6976	pathParameters := map[string]interface{}{
6977		"entityName":        autorest.Encode("path", entityName),
6978		"name":              autorest.Encode("path", name),
6979		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6980		"slot":              autorest.Encode("path", slot),
6981		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6982	}
6983
6984	const APIVersion = "2021-01-15"
6985	queryParameters := map[string]interface{}{
6986		"api-version": APIVersion,
6987	}
6988
6989	preparer := autorest.CreatePreparer(
6990		autorest.AsDelete(),
6991		autorest.WithBaseURL(client.BaseURI),
6992		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
6993		autorest.WithQueryParameters(queryParameters))
6994	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6995}
6996
6997// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the
6998// http.Response Body if it receives an error.
6999func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
7000	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7001}
7002
7003// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always
7004// closes the http.Response Body.
7005func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7006	err = autorest.Respond(
7007		resp,
7008		azure.WithErrorUnlessStatusCode(http.StatusOK),
7009		autorest.ByClosing())
7010	result.Response = resp
7011	return
7012}
7013
7014// DeleteSiteExtension description for Remove a site extension from a web site, or a deployment slot.
7015// Parameters:
7016// resourceGroupName - name of the resource group to which the resource belongs.
7017// name - site name.
7018// siteExtensionID - site extension name.
7019func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) {
7020	if tracing.IsEnabled() {
7021		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension")
7022		defer func() {
7023			sc := -1
7024			if result.Response != nil {
7025				sc = result.Response.StatusCode
7026			}
7027			tracing.EndSpan(ctx, sc, err)
7028		}()
7029	}
7030	if err := validation.Validate([]validation.Validation{
7031		{TargetValue: resourceGroupName,
7032			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7033				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7034				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7035		return result, validation.NewError("web.AppsClient", "DeleteSiteExtension", err.Error())
7036	}
7037
7038	req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
7039	if err != nil {
7040		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request")
7041		return
7042	}
7043
7044	resp, err := client.DeleteSiteExtensionSender(req)
7045	if err != nil {
7046		result.Response = resp
7047		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request")
7048		return
7049	}
7050
7051	result, err = client.DeleteSiteExtensionResponder(resp)
7052	if err != nil {
7053		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request")
7054		return
7055	}
7056
7057	return
7058}
7059
7060// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request.
7061func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
7062	pathParameters := map[string]interface{}{
7063		"name":              autorest.Encode("path", name),
7064		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7065		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
7066		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7067	}
7068
7069	const APIVersion = "2021-01-15"
7070	queryParameters := map[string]interface{}{
7071		"api-version": APIVersion,
7072	}
7073
7074	preparer := autorest.CreatePreparer(
7075		autorest.AsDelete(),
7076		autorest.WithBaseURL(client.BaseURI),
7077		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
7078		autorest.WithQueryParameters(queryParameters))
7079	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7080}
7081
7082// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the
7083// http.Response Body if it receives an error.
7084func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) {
7085	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7086}
7087
7088// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always
7089// closes the http.Response Body.
7090func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) {
7091	err = autorest.Respond(
7092		resp,
7093		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7094		autorest.ByClosing())
7095	result.Response = resp
7096	return
7097}
7098
7099// DeleteSiteExtensionSlot description for Remove a site extension from a web site, or a deployment slot.
7100// Parameters:
7101// resourceGroupName - name of the resource group to which the resource belongs.
7102// name - site name.
7103// siteExtensionID - site extension name.
7104// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
7105// production slot.
7106func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) {
7107	if tracing.IsEnabled() {
7108		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot")
7109		defer func() {
7110			sc := -1
7111			if result.Response != nil {
7112				sc = result.Response.StatusCode
7113			}
7114			tracing.EndSpan(ctx, sc, err)
7115		}()
7116	}
7117	if err := validation.Validate([]validation.Validation{
7118		{TargetValue: resourceGroupName,
7119			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7120				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7121				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7122		return result, validation.NewError("web.AppsClient", "DeleteSiteExtensionSlot", err.Error())
7123	}
7124
7125	req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
7126	if err != nil {
7127		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request")
7128		return
7129	}
7130
7131	resp, err := client.DeleteSiteExtensionSlotSender(req)
7132	if err != nil {
7133		result.Response = resp
7134		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request")
7135		return
7136	}
7137
7138	result, err = client.DeleteSiteExtensionSlotResponder(resp)
7139	if err != nil {
7140		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request")
7141		return
7142	}
7143
7144	return
7145}
7146
7147// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request.
7148func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
7149	pathParameters := map[string]interface{}{
7150		"name":              autorest.Encode("path", name),
7151		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7152		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
7153		"slot":              autorest.Encode("path", slot),
7154		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7155	}
7156
7157	const APIVersion = "2021-01-15"
7158	queryParameters := map[string]interface{}{
7159		"api-version": APIVersion,
7160	}
7161
7162	preparer := autorest.CreatePreparer(
7163		autorest.AsDelete(),
7164		autorest.WithBaseURL(client.BaseURI),
7165		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
7166		autorest.WithQueryParameters(queryParameters))
7167	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7168}
7169
7170// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the
7171// http.Response Body if it receives an error.
7172func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) {
7173	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7174}
7175
7176// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always
7177// closes the http.Response Body.
7178func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7179	err = autorest.Respond(
7180		resp,
7181		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7182		autorest.ByClosing())
7183	result.Response = resp
7184	return
7185}
7186
7187// DeleteSlot description for Deletes a web, mobile, or API app, or one of the deployment slots.
7188// Parameters:
7189// resourceGroupName - name of the resource group to which the resource belongs.
7190// name - name of the app to delete.
7191// slot - name of the deployment slot to delete. By default, the API deletes the production slot.
7192// deleteMetrics - if true, web app metrics are also deleted.
7193// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App
7194// Service plan is deleted.
7195func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) {
7196	if tracing.IsEnabled() {
7197		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot")
7198		defer func() {
7199			sc := -1
7200			if result.Response != nil {
7201				sc = result.Response.StatusCode
7202			}
7203			tracing.EndSpan(ctx, sc, err)
7204		}()
7205	}
7206	if err := validation.Validate([]validation.Validation{
7207		{TargetValue: resourceGroupName,
7208			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7209				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7210				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7211		return result, validation.NewError("web.AppsClient", "DeleteSlot", err.Error())
7212	}
7213
7214	req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm)
7215	if err != nil {
7216		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request")
7217		return
7218	}
7219
7220	resp, err := client.DeleteSlotSender(req)
7221	if err != nil {
7222		result.Response = resp
7223		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request")
7224		return
7225	}
7226
7227	result, err = client.DeleteSlotResponder(resp)
7228	if err != nil {
7229		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request")
7230		return
7231	}
7232
7233	return
7234}
7235
7236// DeleteSlotPreparer prepares the DeleteSlot request.
7237func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) {
7238	pathParameters := map[string]interface{}{
7239		"name":              autorest.Encode("path", name),
7240		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7241		"slot":              autorest.Encode("path", slot),
7242		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7243	}
7244
7245	const APIVersion = "2021-01-15"
7246	queryParameters := map[string]interface{}{
7247		"api-version": APIVersion,
7248	}
7249	if deleteMetrics != nil {
7250		queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics)
7251	}
7252	if deleteEmptyServerFarm != nil {
7253		queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm)
7254	}
7255
7256	preparer := autorest.CreatePreparer(
7257		autorest.AsDelete(),
7258		autorest.WithBaseURL(client.BaseURI),
7259		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
7260		autorest.WithQueryParameters(queryParameters))
7261	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7262}
7263
7264// DeleteSlotSender sends the DeleteSlot request. The method will close the
7265// http.Response Body if it receives an error.
7266func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) {
7267	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7268}
7269
7270// DeleteSlotResponder handles the response to the DeleteSlot request. The method always
7271// closes the http.Response Body.
7272func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7273	err = autorest.Respond(
7274		resp,
7275		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7276		autorest.ByClosing())
7277	result.Response = resp
7278	return
7279}
7280
7281// DeleteSourceControl description for Deletes the source control configuration of an app.
7282// Parameters:
7283// resourceGroupName - name of the resource group to which the resource belongs.
7284// name - name of the app.
7285func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string, additionalFlags string) (result autorest.Response, err error) {
7286	if tracing.IsEnabled() {
7287		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl")
7288		defer func() {
7289			sc := -1
7290			if result.Response != nil {
7291				sc = result.Response.StatusCode
7292			}
7293			tracing.EndSpan(ctx, sc, err)
7294		}()
7295	}
7296	if err := validation.Validate([]validation.Validation{
7297		{TargetValue: resourceGroupName,
7298			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7299				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7300				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7301		return result, validation.NewError("web.AppsClient", "DeleteSourceControl", err.Error())
7302	}
7303
7304	req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name, additionalFlags)
7305	if err != nil {
7306		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request")
7307		return
7308	}
7309
7310	resp, err := client.DeleteSourceControlSender(req)
7311	if err != nil {
7312		result.Response = resp
7313		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request")
7314		return
7315	}
7316
7317	result, err = client.DeleteSourceControlResponder(resp)
7318	if err != nil {
7319		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request")
7320		return
7321	}
7322
7323	return
7324}
7325
7326// DeleteSourceControlPreparer prepares the DeleteSourceControl request.
7327func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, additionalFlags string) (*http.Request, error) {
7328	pathParameters := map[string]interface{}{
7329		"name":              autorest.Encode("path", name),
7330		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7331		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7332	}
7333
7334	const APIVersion = "2021-01-15"
7335	queryParameters := map[string]interface{}{
7336		"api-version": APIVersion,
7337	}
7338	if len(additionalFlags) > 0 {
7339		queryParameters["additionalFlags"] = autorest.Encode("query", additionalFlags)
7340	}
7341
7342	preparer := autorest.CreatePreparer(
7343		autorest.AsDelete(),
7344		autorest.WithBaseURL(client.BaseURI),
7345		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
7346		autorest.WithQueryParameters(queryParameters))
7347	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7348}
7349
7350// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the
7351// http.Response Body if it receives an error.
7352func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) {
7353	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7354}
7355
7356// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always
7357// closes the http.Response Body.
7358func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) {
7359	err = autorest.Respond(
7360		resp,
7361		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
7362		autorest.ByClosing())
7363	result.Response = resp
7364	return
7365}
7366
7367// DeleteSourceControlSlot description for Deletes the source control configuration of an app.
7368// Parameters:
7369// resourceGroupName - name of the resource group to which the resource belongs.
7370// name - name of the app.
7371// slot - name of the deployment slot. If a slot is not specified, the API will delete the source control
7372// configuration for the production slot.
7373func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string, additionalFlags string) (result autorest.Response, err error) {
7374	if tracing.IsEnabled() {
7375		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot")
7376		defer func() {
7377			sc := -1
7378			if result.Response != nil {
7379				sc = result.Response.StatusCode
7380			}
7381			tracing.EndSpan(ctx, sc, err)
7382		}()
7383	}
7384	if err := validation.Validate([]validation.Validation{
7385		{TargetValue: resourceGroupName,
7386			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7387				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7388				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7389		return result, validation.NewError("web.AppsClient", "DeleteSourceControlSlot", err.Error())
7390	}
7391
7392	req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot, additionalFlags)
7393	if err != nil {
7394		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request")
7395		return
7396	}
7397
7398	resp, err := client.DeleteSourceControlSlotSender(req)
7399	if err != nil {
7400		result.Response = resp
7401		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request")
7402		return
7403	}
7404
7405	result, err = client.DeleteSourceControlSlotResponder(resp)
7406	if err != nil {
7407		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request")
7408		return
7409	}
7410
7411	return
7412}
7413
7414// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request.
7415func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, additionalFlags string) (*http.Request, error) {
7416	pathParameters := map[string]interface{}{
7417		"name":              autorest.Encode("path", name),
7418		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7419		"slot":              autorest.Encode("path", slot),
7420		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7421	}
7422
7423	const APIVersion = "2021-01-15"
7424	queryParameters := map[string]interface{}{
7425		"api-version": APIVersion,
7426	}
7427	if len(additionalFlags) > 0 {
7428		queryParameters["additionalFlags"] = autorest.Encode("query", additionalFlags)
7429	}
7430
7431	preparer := autorest.CreatePreparer(
7432		autorest.AsDelete(),
7433		autorest.WithBaseURL(client.BaseURI),
7434		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
7435		autorest.WithQueryParameters(queryParameters))
7436	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7437}
7438
7439// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the
7440// http.Response Body if it receives an error.
7441func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) {
7442	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7443}
7444
7445// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always
7446// closes the http.Response Body.
7447func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7448	err = autorest.Respond(
7449		resp,
7450		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
7451		autorest.ByClosing())
7452	result.Response = resp
7453	return
7454}
7455
7456// DeleteSwiftVirtualNetwork description for Deletes a Swift Virtual Network connection from an app (or deployment
7457// slot).
7458// Parameters:
7459// resourceGroupName - name of the resource group to which the resource belongs.
7460// name - name of the app.
7461func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
7462	if tracing.IsEnabled() {
7463		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork")
7464		defer func() {
7465			sc := -1
7466			if result.Response != nil {
7467				sc = result.Response.StatusCode
7468			}
7469			tracing.EndSpan(ctx, sc, err)
7470		}()
7471	}
7472	if err := validation.Validate([]validation.Validation{
7473		{TargetValue: resourceGroupName,
7474			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7475				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7476				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7477		return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetwork", err.Error())
7478	}
7479
7480	req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name)
7481	if err != nil {
7482		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request")
7483		return
7484	}
7485
7486	resp, err := client.DeleteSwiftVirtualNetworkSender(req)
7487	if err != nil {
7488		result.Response = resp
7489		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request")
7490		return
7491	}
7492
7493	result, err = client.DeleteSwiftVirtualNetworkResponder(resp)
7494	if err != nil {
7495		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request")
7496		return
7497	}
7498
7499	return
7500}
7501
7502// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request.
7503func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
7504	pathParameters := map[string]interface{}{
7505		"name":              autorest.Encode("path", name),
7506		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7507		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7508	}
7509
7510	const APIVersion = "2021-01-15"
7511	queryParameters := map[string]interface{}{
7512		"api-version": APIVersion,
7513	}
7514
7515	preparer := autorest.CreatePreparer(
7516		autorest.AsDelete(),
7517		autorest.WithBaseURL(client.BaseURI),
7518		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
7519		autorest.WithQueryParameters(queryParameters))
7520	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7521}
7522
7523// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the
7524// http.Response Body if it receives an error.
7525func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) {
7526	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7527}
7528
7529// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always
7530// closes the http.Response Body.
7531func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) {
7532	err = autorest.Respond(
7533		resp,
7534		azure.WithErrorUnlessStatusCode(http.StatusOK),
7535		autorest.ByClosing())
7536	result.Response = resp
7537	return
7538}
7539
7540// DeleteSwiftVirtualNetworkSlot description for Deletes a Swift Virtual Network connection from an app (or deployment
7541// slot).
7542// Parameters:
7543// resourceGroupName - name of the resource group to which the resource belongs.
7544// name - name of the app.
7545// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the
7546// production slot.
7547func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
7548	if tracing.IsEnabled() {
7549		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot")
7550		defer func() {
7551			sc := -1
7552			if result.Response != nil {
7553				sc = result.Response.StatusCode
7554			}
7555			tracing.EndSpan(ctx, sc, err)
7556		}()
7557	}
7558	if err := validation.Validate([]validation.Validation{
7559		{TargetValue: resourceGroupName,
7560			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7561				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7562				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7563		return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetworkSlot", err.Error())
7564	}
7565
7566	req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot)
7567	if err != nil {
7568		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request")
7569		return
7570	}
7571
7572	resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req)
7573	if err != nil {
7574		result.Response = resp
7575		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request")
7576		return
7577	}
7578
7579	result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp)
7580	if err != nil {
7581		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request")
7582		return
7583	}
7584
7585	return
7586}
7587
7588// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request.
7589func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
7590	pathParameters := map[string]interface{}{
7591		"name":              autorest.Encode("path", name),
7592		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7593		"slot":              autorest.Encode("path", slot),
7594		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7595	}
7596
7597	const APIVersion = "2021-01-15"
7598	queryParameters := map[string]interface{}{
7599		"api-version": APIVersion,
7600	}
7601
7602	preparer := autorest.CreatePreparer(
7603		autorest.AsDelete(),
7604		autorest.WithBaseURL(client.BaseURI),
7605		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
7606		autorest.WithQueryParameters(queryParameters))
7607	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7608}
7609
7610// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the
7611// http.Response Body if it receives an error.
7612func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) {
7613	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7614}
7615
7616// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always
7617// closes the http.Response Body.
7618func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7619	err = autorest.Respond(
7620		resp,
7621		azure.WithErrorUnlessStatusCode(http.StatusOK),
7622		autorest.ByClosing())
7623	result.Response = resp
7624	return
7625}
7626
7627// DeleteTriggeredWebJob description for Delete a triggered web job by its ID for an app, or a deployment slot.
7628// Parameters:
7629// resourceGroupName - name of the resource group to which the resource belongs.
7630// name - site name.
7631// webJobName - name of Web Job.
7632func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
7633	if tracing.IsEnabled() {
7634		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob")
7635		defer func() {
7636			sc := -1
7637			if result.Response != nil {
7638				sc = result.Response.StatusCode
7639			}
7640			tracing.EndSpan(ctx, sc, err)
7641		}()
7642	}
7643	if err := validation.Validate([]validation.Validation{
7644		{TargetValue: resourceGroupName,
7645			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7646				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7647				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7648		return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJob", err.Error())
7649	}
7650
7651	req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
7652	if err != nil {
7653		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request")
7654		return
7655	}
7656
7657	resp, err := client.DeleteTriggeredWebJobSender(req)
7658	if err != nil {
7659		result.Response = resp
7660		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request")
7661		return
7662	}
7663
7664	result, err = client.DeleteTriggeredWebJobResponder(resp)
7665	if err != nil {
7666		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request")
7667		return
7668	}
7669
7670	return
7671}
7672
7673// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request.
7674func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
7675	pathParameters := map[string]interface{}{
7676		"name":              autorest.Encode("path", name),
7677		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7678		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7679		"webJobName":        autorest.Encode("path", webJobName),
7680	}
7681
7682	const APIVersion = "2021-01-15"
7683	queryParameters := map[string]interface{}{
7684		"api-version": APIVersion,
7685	}
7686
7687	preparer := autorest.CreatePreparer(
7688		autorest.AsDelete(),
7689		autorest.WithBaseURL(client.BaseURI),
7690		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters),
7691		autorest.WithQueryParameters(queryParameters))
7692	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7693}
7694
7695// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the
7696// http.Response Body if it receives an error.
7697func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
7698	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7699}
7700
7701// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always
7702// closes the http.Response Body.
7703func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
7704	err = autorest.Respond(
7705		resp,
7706		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7707		autorest.ByClosing())
7708	result.Response = resp
7709	return
7710}
7711
7712// DeleteTriggeredWebJobSlot description for Delete a triggered web job by its ID for an app, or a deployment slot.
7713// Parameters:
7714// resourceGroupName - name of the resource group to which the resource belongs.
7715// name - site name.
7716// webJobName - name of Web Job.
7717// slot - name of the deployment slot. If a slot is not specified, the API deletes web job for the production
7718// slot.
7719func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
7720	if tracing.IsEnabled() {
7721		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot")
7722		defer func() {
7723			sc := -1
7724			if result.Response != nil {
7725				sc = result.Response.StatusCode
7726			}
7727			tracing.EndSpan(ctx, sc, err)
7728		}()
7729	}
7730	if err := validation.Validate([]validation.Validation{
7731		{TargetValue: resourceGroupName,
7732			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7733				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7734				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7735		return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJobSlot", err.Error())
7736	}
7737
7738	req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
7739	if err != nil {
7740		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request")
7741		return
7742	}
7743
7744	resp, err := client.DeleteTriggeredWebJobSlotSender(req)
7745	if err != nil {
7746		result.Response = resp
7747		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request")
7748		return
7749	}
7750
7751	result, err = client.DeleteTriggeredWebJobSlotResponder(resp)
7752	if err != nil {
7753		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request")
7754		return
7755	}
7756
7757	return
7758}
7759
7760// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request.
7761func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
7762	pathParameters := map[string]interface{}{
7763		"name":              autorest.Encode("path", name),
7764		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7765		"slot":              autorest.Encode("path", slot),
7766		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7767		"webJobName":        autorest.Encode("path", webJobName),
7768	}
7769
7770	const APIVersion = "2021-01-15"
7771	queryParameters := map[string]interface{}{
7772		"api-version": APIVersion,
7773	}
7774
7775	preparer := autorest.CreatePreparer(
7776		autorest.AsDelete(),
7777		autorest.WithBaseURL(client.BaseURI),
7778		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters),
7779		autorest.WithQueryParameters(queryParameters))
7780	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7781}
7782
7783// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the
7784// http.Response Body if it receives an error.
7785func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
7786	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7787}
7788
7789// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always
7790// closes the http.Response Body.
7791func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7792	err = autorest.Respond(
7793		resp,
7794		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7795		autorest.ByClosing())
7796	result.Response = resp
7797	return
7798}
7799
7800// DeleteVnetConnection description for Deletes a connection from an app (or deployment slot to a named virtual
7801// network.
7802// Parameters:
7803// resourceGroupName - name of the resource group to which the resource belongs.
7804// name - name of the app.
7805// vnetName - name of the virtual network.
7806func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) {
7807	if tracing.IsEnabled() {
7808		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection")
7809		defer func() {
7810			sc := -1
7811			if result.Response != nil {
7812				sc = result.Response.StatusCode
7813			}
7814			tracing.EndSpan(ctx, sc, err)
7815		}()
7816	}
7817	if err := validation.Validate([]validation.Validation{
7818		{TargetValue: resourceGroupName,
7819			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7820				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7821				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7822		return result, validation.NewError("web.AppsClient", "DeleteVnetConnection", err.Error())
7823	}
7824
7825	req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName)
7826	if err != nil {
7827		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request")
7828		return
7829	}
7830
7831	resp, err := client.DeleteVnetConnectionSender(req)
7832	if err != nil {
7833		result.Response = resp
7834		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request")
7835		return
7836	}
7837
7838	result, err = client.DeleteVnetConnectionResponder(resp)
7839	if err != nil {
7840		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request")
7841		return
7842	}
7843
7844	return
7845}
7846
7847// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request.
7848func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) {
7849	pathParameters := map[string]interface{}{
7850		"name":              autorest.Encode("path", name),
7851		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7852		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7853		"vnetName":          autorest.Encode("path", vnetName),
7854	}
7855
7856	const APIVersion = "2021-01-15"
7857	queryParameters := map[string]interface{}{
7858		"api-version": APIVersion,
7859	}
7860
7861	preparer := autorest.CreatePreparer(
7862		autorest.AsDelete(),
7863		autorest.WithBaseURL(client.BaseURI),
7864		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
7865		autorest.WithQueryParameters(queryParameters))
7866	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7867}
7868
7869// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the
7870// http.Response Body if it receives an error.
7871func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) {
7872	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7873}
7874
7875// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always
7876// closes the http.Response Body.
7877func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
7878	err = autorest.Respond(
7879		resp,
7880		azure.WithErrorUnlessStatusCode(http.StatusOK),
7881		autorest.ByClosing())
7882	result.Response = resp
7883	return
7884}
7885
7886// DeleteVnetConnectionSlot description for Deletes a connection from an app (or deployment slot to a named virtual
7887// network.
7888// Parameters:
7889// resourceGroupName - name of the resource group to which the resource belongs.
7890// name - name of the app.
7891// vnetName - name of the virtual network.
7892// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the
7893// production slot.
7894func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) {
7895	if tracing.IsEnabled() {
7896		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot")
7897		defer func() {
7898			sc := -1
7899			if result.Response != nil {
7900				sc = result.Response.StatusCode
7901			}
7902			tracing.EndSpan(ctx, sc, err)
7903		}()
7904	}
7905	if err := validation.Validate([]validation.Validation{
7906		{TargetValue: resourceGroupName,
7907			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7908				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7909				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7910		return result, validation.NewError("web.AppsClient", "DeleteVnetConnectionSlot", err.Error())
7911	}
7912
7913	req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot)
7914	if err != nil {
7915		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request")
7916		return
7917	}
7918
7919	resp, err := client.DeleteVnetConnectionSlotSender(req)
7920	if err != nil {
7921		result.Response = resp
7922		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request")
7923		return
7924	}
7925
7926	result, err = client.DeleteVnetConnectionSlotResponder(resp)
7927	if err != nil {
7928		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request")
7929		return
7930	}
7931
7932	return
7933}
7934
7935// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request.
7936func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) {
7937	pathParameters := map[string]interface{}{
7938		"name":              autorest.Encode("path", name),
7939		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7940		"slot":              autorest.Encode("path", slot),
7941		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7942		"vnetName":          autorest.Encode("path", vnetName),
7943	}
7944
7945	const APIVersion = "2021-01-15"
7946	queryParameters := map[string]interface{}{
7947		"api-version": APIVersion,
7948	}
7949
7950	preparer := autorest.CreatePreparer(
7951		autorest.AsDelete(),
7952		autorest.WithBaseURL(client.BaseURI),
7953		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
7954		autorest.WithQueryParameters(queryParameters))
7955	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7956}
7957
7958// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the
7959// http.Response Body if it receives an error.
7960func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
7961	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7962}
7963
7964// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always
7965// closes the http.Response Body.
7966func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7967	err = autorest.Respond(
7968		resp,
7969		azure.WithErrorUnlessStatusCode(http.StatusOK),
7970		autorest.ByClosing())
7971	result.Response = resp
7972	return
7973}
7974
7975// DiscoverBackup description for Discovers an existing app backup that can be restored from a blob in Azure storage.
7976// Use this to get information about the databases stored in a backup.
7977// Parameters:
7978// resourceGroupName - name of the resource group to which the resource belongs.
7979// name - name of the app.
7980// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup.
7981func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) {
7982	if tracing.IsEnabled() {
7983		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup")
7984		defer func() {
7985			sc := -1
7986			if result.Response.Response != nil {
7987				sc = result.Response.Response.StatusCode
7988			}
7989			tracing.EndSpan(ctx, sc, err)
7990		}()
7991	}
7992	if err := validation.Validate([]validation.Validation{
7993		{TargetValue: resourceGroupName,
7994			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7995				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7996				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
7997		{TargetValue: request,
7998			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
7999				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
8000					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
8001				}}}}}); err != nil {
8002		return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error())
8003	}
8004
8005	req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request)
8006	if err != nil {
8007		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request")
8008		return
8009	}
8010
8011	resp, err := client.DiscoverBackupSender(req)
8012	if err != nil {
8013		result.Response = autorest.Response{Response: resp}
8014		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request")
8015		return
8016	}
8017
8018	result, err = client.DiscoverBackupResponder(resp)
8019	if err != nil {
8020		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request")
8021		return
8022	}
8023
8024	return
8025}
8026
8027// DiscoverBackupPreparer prepares the DiscoverBackup request.
8028func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) {
8029	pathParameters := map[string]interface{}{
8030		"name":              autorest.Encode("path", name),
8031		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8032		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8033	}
8034
8035	const APIVersion = "2021-01-15"
8036	queryParameters := map[string]interface{}{
8037		"api-version": APIVersion,
8038	}
8039
8040	preparer := autorest.CreatePreparer(
8041		autorest.AsContentType("application/json; charset=utf-8"),
8042		autorest.AsPost(),
8043		autorest.WithBaseURL(client.BaseURI),
8044		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters),
8045		autorest.WithJSON(request),
8046		autorest.WithQueryParameters(queryParameters))
8047	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8048}
8049
8050// DiscoverBackupSender sends the DiscoverBackup request. The method will close the
8051// http.Response Body if it receives an error.
8052func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) {
8053	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8054}
8055
8056// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always
8057// closes the http.Response Body.
8058func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) {
8059	err = autorest.Respond(
8060		resp,
8061		azure.WithErrorUnlessStatusCode(http.StatusOK),
8062		autorest.ByUnmarshallingJSON(&result),
8063		autorest.ByClosing())
8064	result.Response = autorest.Response{Response: resp}
8065	return
8066}
8067
8068// DiscoverBackupSlot description for Discovers an existing app backup that can be restored from a blob in Azure
8069// storage. Use this to get information about the databases stored in a backup.
8070// Parameters:
8071// resourceGroupName - name of the resource group to which the resource belongs.
8072// name - name of the app.
8073// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup.
8074// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the
8075// production slot.
8076func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) {
8077	if tracing.IsEnabled() {
8078		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot")
8079		defer func() {
8080			sc := -1
8081			if result.Response.Response != nil {
8082				sc = result.Response.Response.StatusCode
8083			}
8084			tracing.EndSpan(ctx, sc, err)
8085		}()
8086	}
8087	if err := validation.Validate([]validation.Validation{
8088		{TargetValue: resourceGroupName,
8089			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8090				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8091				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
8092		{TargetValue: request,
8093			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
8094				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
8095					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
8096				}}}}}); err != nil {
8097		return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error())
8098	}
8099
8100	req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot)
8101	if err != nil {
8102		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request")
8103		return
8104	}
8105
8106	resp, err := client.DiscoverBackupSlotSender(req)
8107	if err != nil {
8108		result.Response = autorest.Response{Response: resp}
8109		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request")
8110		return
8111	}
8112
8113	result, err = client.DiscoverBackupSlotResponder(resp)
8114	if err != nil {
8115		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request")
8116		return
8117	}
8118
8119	return
8120}
8121
8122// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request.
8123func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) {
8124	pathParameters := map[string]interface{}{
8125		"name":              autorest.Encode("path", name),
8126		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8127		"slot":              autorest.Encode("path", slot),
8128		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8129	}
8130
8131	const APIVersion = "2021-01-15"
8132	queryParameters := map[string]interface{}{
8133		"api-version": APIVersion,
8134	}
8135
8136	preparer := autorest.CreatePreparer(
8137		autorest.AsContentType("application/json; charset=utf-8"),
8138		autorest.AsPost(),
8139		autorest.WithBaseURL(client.BaseURI),
8140		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters),
8141		autorest.WithJSON(request),
8142		autorest.WithQueryParameters(queryParameters))
8143	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8144}
8145
8146// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the
8147// http.Response Body if it receives an error.
8148func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) {
8149	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8150}
8151
8152// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always
8153// closes the http.Response Body.
8154func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) {
8155	err = autorest.Respond(
8156		resp,
8157		azure.WithErrorUnlessStatusCode(http.StatusOK),
8158		autorest.ByUnmarshallingJSON(&result),
8159		autorest.ByClosing())
8160	result.Response = autorest.Response{Response: resp}
8161	return
8162}
8163
8164// GenerateNewSitePublishingPassword description for Generates a new publishing password for an app (or deployment
8165// slot, if specified).
8166// Parameters:
8167// resourceGroupName - name of the resource group to which the resource belongs.
8168// name - name of the app.
8169func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
8170	if tracing.IsEnabled() {
8171		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword")
8172		defer func() {
8173			sc := -1
8174			if result.Response != nil {
8175				sc = result.Response.StatusCode
8176			}
8177			tracing.EndSpan(ctx, sc, err)
8178		}()
8179	}
8180	if err := validation.Validate([]validation.Validation{
8181		{TargetValue: resourceGroupName,
8182			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8183				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8184				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8185		return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPassword", err.Error())
8186	}
8187
8188	req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name)
8189	if err != nil {
8190		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request")
8191		return
8192	}
8193
8194	resp, err := client.GenerateNewSitePublishingPasswordSender(req)
8195	if err != nil {
8196		result.Response = resp
8197		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request")
8198		return
8199	}
8200
8201	result, err = client.GenerateNewSitePublishingPasswordResponder(resp)
8202	if err != nil {
8203		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request")
8204		return
8205	}
8206
8207	return
8208}
8209
8210// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request.
8211func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8212	pathParameters := map[string]interface{}{
8213		"name":              autorest.Encode("path", name),
8214		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8215		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8216	}
8217
8218	const APIVersion = "2021-01-15"
8219	queryParameters := map[string]interface{}{
8220		"api-version": APIVersion,
8221	}
8222
8223	preparer := autorest.CreatePreparer(
8224		autorest.AsPost(),
8225		autorest.WithBaseURL(client.BaseURI),
8226		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters),
8227		autorest.WithQueryParameters(queryParameters))
8228	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8229}
8230
8231// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the
8232// http.Response Body if it receives an error.
8233func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) {
8234	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8235}
8236
8237// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always
8238// closes the http.Response Body.
8239func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) {
8240	err = autorest.Respond(
8241		resp,
8242		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
8243		autorest.ByClosing())
8244	result.Response = resp
8245	return
8246}
8247
8248// GenerateNewSitePublishingPasswordSlot description for Generates a new publishing password for an app (or deployment
8249// slot, if specified).
8250// Parameters:
8251// resourceGroupName - name of the resource group to which the resource belongs.
8252// name - name of the app.
8253// slot - name of the deployment slot. If a slot is not specified, the API generate a new publishing password
8254// for the production slot.
8255func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
8256	if tracing.IsEnabled() {
8257		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot")
8258		defer func() {
8259			sc := -1
8260			if result.Response != nil {
8261				sc = result.Response.StatusCode
8262			}
8263			tracing.EndSpan(ctx, sc, err)
8264		}()
8265	}
8266	if err := validation.Validate([]validation.Validation{
8267		{TargetValue: resourceGroupName,
8268			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8269				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8270				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8271		return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPasswordSlot", err.Error())
8272	}
8273
8274	req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot)
8275	if err != nil {
8276		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request")
8277		return
8278	}
8279
8280	resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req)
8281	if err != nil {
8282		result.Response = resp
8283		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request")
8284		return
8285	}
8286
8287	result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp)
8288	if err != nil {
8289		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request")
8290		return
8291	}
8292
8293	return
8294}
8295
8296// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request.
8297func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8298	pathParameters := map[string]interface{}{
8299		"name":              autorest.Encode("path", name),
8300		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8301		"slot":              autorest.Encode("path", slot),
8302		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8303	}
8304
8305	const APIVersion = "2021-01-15"
8306	queryParameters := map[string]interface{}{
8307		"api-version": APIVersion,
8308	}
8309
8310	preparer := autorest.CreatePreparer(
8311		autorest.AsPost(),
8312		autorest.WithBaseURL(client.BaseURI),
8313		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters),
8314		autorest.WithQueryParameters(queryParameters))
8315	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8316}
8317
8318// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the
8319// http.Response Body if it receives an error.
8320func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) {
8321	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8322}
8323
8324// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always
8325// closes the http.Response Body.
8326func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) {
8327	err = autorest.Respond(
8328		resp,
8329		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
8330		autorest.ByClosing())
8331	result.Response = resp
8332	return
8333}
8334
8335// Get description for Gets the details of a web, mobile, or API app.
8336// Parameters:
8337// resourceGroupName - name of the resource group to which the resource belongs.
8338// name - name of the app.
8339func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) {
8340	if tracing.IsEnabled() {
8341		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get")
8342		defer func() {
8343			sc := -1
8344			if result.Response.Response != nil {
8345				sc = result.Response.Response.StatusCode
8346			}
8347			tracing.EndSpan(ctx, sc, err)
8348		}()
8349	}
8350	if err := validation.Validate([]validation.Validation{
8351		{TargetValue: resourceGroupName,
8352			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8353				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8354				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8355		return result, validation.NewError("web.AppsClient", "Get", err.Error())
8356	}
8357
8358	req, err := client.GetPreparer(ctx, resourceGroupName, name)
8359	if err != nil {
8360		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request")
8361		return
8362	}
8363
8364	resp, err := client.GetSender(req)
8365	if err != nil {
8366		result.Response = autorest.Response{Response: resp}
8367		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request")
8368		return
8369	}
8370
8371	result, err = client.GetResponder(resp)
8372	if err != nil {
8373		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request")
8374		return
8375	}
8376
8377	return
8378}
8379
8380// GetPreparer prepares the Get request.
8381func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8382	pathParameters := map[string]interface{}{
8383		"name":              autorest.Encode("path", name),
8384		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8385		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8386	}
8387
8388	const APIVersion = "2021-01-15"
8389	queryParameters := map[string]interface{}{
8390		"api-version": APIVersion,
8391	}
8392
8393	preparer := autorest.CreatePreparer(
8394		autorest.AsGet(),
8395		autorest.WithBaseURL(client.BaseURI),
8396		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
8397		autorest.WithQueryParameters(queryParameters))
8398	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8399}
8400
8401// GetSender sends the Get request. The method will close the
8402// http.Response Body if it receives an error.
8403func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) {
8404	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8405}
8406
8407// GetResponder handles the response to the Get request. The method always
8408// closes the http.Response Body.
8409func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) {
8410	err = autorest.Respond(
8411		resp,
8412		azure.WithErrorUnlessStatusCode(http.StatusOK),
8413		autorest.ByUnmarshallingJSON(&result),
8414		autorest.ByClosing())
8415	result.Response = autorest.Response{Response: resp}
8416	return
8417}
8418
8419// GetAppSettingKeyVaultReference description for Gets the config reference and status of an app
8420// Parameters:
8421// resourceGroupName - name of the resource group to which the resource belongs.
8422// name - name of the app.
8423// appSettingKey - app Setting key name.
8424func (client AppsClient) GetAppSettingKeyVaultReference(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (result APIKVReference, err error) {
8425	if tracing.IsEnabled() {
8426		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingKeyVaultReference")
8427		defer func() {
8428			sc := -1
8429			if result.Response.Response != nil {
8430				sc = result.Response.Response.StatusCode
8431			}
8432			tracing.EndSpan(ctx, sc, err)
8433		}()
8434	}
8435	if err := validation.Validate([]validation.Validation{
8436		{TargetValue: resourceGroupName,
8437			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8438				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8439				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8440		return result, validation.NewError("web.AppsClient", "GetAppSettingKeyVaultReference", err.Error())
8441	}
8442
8443	req, err := client.GetAppSettingKeyVaultReferencePreparer(ctx, resourceGroupName, name, appSettingKey)
8444	if err != nil {
8445		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", nil, "Failure preparing request")
8446		return
8447	}
8448
8449	resp, err := client.GetAppSettingKeyVaultReferenceSender(req)
8450	if err != nil {
8451		result.Response = autorest.Response{Response: resp}
8452		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure sending request")
8453		return
8454	}
8455
8456	result, err = client.GetAppSettingKeyVaultReferenceResponder(resp)
8457	if err != nil {
8458		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReference", resp, "Failure responding to request")
8459		return
8460	}
8461
8462	return
8463}
8464
8465// GetAppSettingKeyVaultReferencePreparer prepares the GetAppSettingKeyVaultReference request.
8466func (client AppsClient) GetAppSettingKeyVaultReferencePreparer(ctx context.Context, resourceGroupName string, name string, appSettingKey string) (*http.Request, error) {
8467	pathParameters := map[string]interface{}{
8468		"appSettingKey":     autorest.Encode("path", appSettingKey),
8469		"name":              autorest.Encode("path", name),
8470		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8471		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8472	}
8473
8474	const APIVersion = "2021-01-15"
8475	queryParameters := map[string]interface{}{
8476		"api-version": APIVersion,
8477	}
8478
8479	preparer := autorest.CreatePreparer(
8480		autorest.AsGet(),
8481		autorest.WithBaseURL(client.BaseURI),
8482		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}", pathParameters),
8483		autorest.WithQueryParameters(queryParameters))
8484	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8485}
8486
8487// GetAppSettingKeyVaultReferenceSender sends the GetAppSettingKeyVaultReference request. The method will close the
8488// http.Response Body if it receives an error.
8489func (client AppsClient) GetAppSettingKeyVaultReferenceSender(req *http.Request) (*http.Response, error) {
8490	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8491}
8492
8493// GetAppSettingKeyVaultReferenceResponder handles the response to the GetAppSettingKeyVaultReference request. The method always
8494// closes the http.Response Body.
8495func (client AppsClient) GetAppSettingKeyVaultReferenceResponder(resp *http.Response) (result APIKVReference, err error) {
8496	err = autorest.Respond(
8497		resp,
8498		azure.WithErrorUnlessStatusCode(http.StatusOK),
8499		autorest.ByUnmarshallingJSON(&result),
8500		autorest.ByClosing())
8501	result.Response = autorest.Response{Response: resp}
8502	return
8503}
8504
8505// GetAppSettingKeyVaultReferenceSlot description for Gets the config reference and status of an app
8506// Parameters:
8507// resourceGroupName - name of the resource group to which the resource belongs.
8508// name - name of the app.
8509// appSettingKey - app Setting key name.
8510func (client AppsClient) GetAppSettingKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string) (result APIKVReference, err error) {
8511	if tracing.IsEnabled() {
8512		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingKeyVaultReferenceSlot")
8513		defer func() {
8514			sc := -1
8515			if result.Response.Response != nil {
8516				sc = result.Response.Response.StatusCode
8517			}
8518			tracing.EndSpan(ctx, sc, err)
8519		}()
8520	}
8521	if err := validation.Validate([]validation.Validation{
8522		{TargetValue: resourceGroupName,
8523			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8524				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8525				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8526		return result, validation.NewError("web.AppsClient", "GetAppSettingKeyVaultReferenceSlot", err.Error())
8527	}
8528
8529	req, err := client.GetAppSettingKeyVaultReferenceSlotPreparer(ctx, resourceGroupName, name, appSettingKey, slot)
8530	if err != nil {
8531		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReferenceSlot", nil, "Failure preparing request")
8532		return
8533	}
8534
8535	resp, err := client.GetAppSettingKeyVaultReferenceSlotSender(req)
8536	if err != nil {
8537		result.Response = autorest.Response{Response: resp}
8538		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReferenceSlot", resp, "Failure sending request")
8539		return
8540	}
8541
8542	result, err = client.GetAppSettingKeyVaultReferenceSlotResponder(resp)
8543	if err != nil {
8544		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingKeyVaultReferenceSlot", resp, "Failure responding to request")
8545		return
8546	}
8547
8548	return
8549}
8550
8551// GetAppSettingKeyVaultReferenceSlotPreparer prepares the GetAppSettingKeyVaultReferenceSlot request.
8552func (client AppsClient) GetAppSettingKeyVaultReferenceSlotPreparer(ctx context.Context, resourceGroupName string, name string, appSettingKey string, slot string) (*http.Request, error) {
8553	pathParameters := map[string]interface{}{
8554		"appSettingKey":     autorest.Encode("path", appSettingKey),
8555		"name":              autorest.Encode("path", name),
8556		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8557		"slot":              autorest.Encode("path", slot),
8558		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8559	}
8560
8561	const APIVersion = "2021-01-15"
8562	queryParameters := map[string]interface{}{
8563		"api-version": APIVersion,
8564	}
8565
8566	preparer := autorest.CreatePreparer(
8567		autorest.AsGet(),
8568		autorest.WithBaseURL(client.BaseURI),
8569		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}", pathParameters),
8570		autorest.WithQueryParameters(queryParameters))
8571	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8572}
8573
8574// GetAppSettingKeyVaultReferenceSlotSender sends the GetAppSettingKeyVaultReferenceSlot request. The method will close the
8575// http.Response Body if it receives an error.
8576func (client AppsClient) GetAppSettingKeyVaultReferenceSlotSender(req *http.Request) (*http.Response, error) {
8577	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8578}
8579
8580// GetAppSettingKeyVaultReferenceSlotResponder handles the response to the GetAppSettingKeyVaultReferenceSlot request. The method always
8581// closes the http.Response Body.
8582func (client AppsClient) GetAppSettingKeyVaultReferenceSlotResponder(resp *http.Response) (result APIKVReference, err error) {
8583	err = autorest.Respond(
8584		resp,
8585		azure.WithErrorUnlessStatusCode(http.StatusOK),
8586		autorest.ByUnmarshallingJSON(&result),
8587		autorest.ByClosing())
8588	result.Response = autorest.Response{Response: resp}
8589	return
8590}
8591
8592// GetAppSettingsKeyVaultReferences description for Gets the config reference app settings and status of an app
8593// Parameters:
8594// resourceGroupName - name of the resource group to which the resource belongs.
8595// name - name of the app.
8596func (client AppsClient) GetAppSettingsKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionPage, err error) {
8597	if tracing.IsEnabled() {
8598		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferences")
8599		defer func() {
8600			sc := -1
8601			if result.arc.Response.Response != nil {
8602				sc = result.arc.Response.Response.StatusCode
8603			}
8604			tracing.EndSpan(ctx, sc, err)
8605		}()
8606	}
8607	if err := validation.Validate([]validation.Validation{
8608		{TargetValue: resourceGroupName,
8609			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8610				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8611				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8612		return result, validation.NewError("web.AppsClient", "GetAppSettingsKeyVaultReferences", err.Error())
8613	}
8614
8615	result.fn = client.getAppSettingsKeyVaultReferencesNextResults
8616	req, err := client.GetAppSettingsKeyVaultReferencesPreparer(ctx, resourceGroupName, name)
8617	if err != nil {
8618		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", nil, "Failure preparing request")
8619		return
8620	}
8621
8622	resp, err := client.GetAppSettingsKeyVaultReferencesSender(req)
8623	if err != nil {
8624		result.arc.Response = autorest.Response{Response: resp}
8625		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure sending request")
8626		return
8627	}
8628
8629	result.arc, err = client.GetAppSettingsKeyVaultReferencesResponder(resp)
8630	if err != nil {
8631		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferences", resp, "Failure responding to request")
8632		return
8633	}
8634	if result.arc.hasNextLink() && result.arc.IsEmpty() {
8635		err = result.NextWithContext(ctx)
8636		return
8637	}
8638
8639	return
8640}
8641
8642// GetAppSettingsKeyVaultReferencesPreparer prepares the GetAppSettingsKeyVaultReferences request.
8643func (client AppsClient) GetAppSettingsKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8644	pathParameters := map[string]interface{}{
8645		"name":              autorest.Encode("path", name),
8646		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8647		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8648	}
8649
8650	const APIVersion = "2021-01-15"
8651	queryParameters := map[string]interface{}{
8652		"api-version": APIVersion,
8653	}
8654
8655	preparer := autorest.CreatePreparer(
8656		autorest.AsGet(),
8657		autorest.WithBaseURL(client.BaseURI),
8658		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings", pathParameters),
8659		autorest.WithQueryParameters(queryParameters))
8660	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8661}
8662
8663// GetAppSettingsKeyVaultReferencesSender sends the GetAppSettingsKeyVaultReferences request. The method will close the
8664// http.Response Body if it receives an error.
8665func (client AppsClient) GetAppSettingsKeyVaultReferencesSender(req *http.Request) (*http.Response, error) {
8666	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8667}
8668
8669// GetAppSettingsKeyVaultReferencesResponder handles the response to the GetAppSettingsKeyVaultReferences request. The method always
8670// closes the http.Response Body.
8671func (client AppsClient) GetAppSettingsKeyVaultReferencesResponder(resp *http.Response) (result APIKVReferenceCollection, err error) {
8672	err = autorest.Respond(
8673		resp,
8674		azure.WithErrorUnlessStatusCode(http.StatusOK),
8675		autorest.ByUnmarshallingJSON(&result),
8676		autorest.ByClosing())
8677	result.Response = autorest.Response{Response: resp}
8678	return
8679}
8680
8681// getAppSettingsKeyVaultReferencesNextResults retrieves the next set of results, if any.
8682func (client AppsClient) getAppSettingsKeyVaultReferencesNextResults(ctx context.Context, lastResults APIKVReferenceCollection) (result APIKVReferenceCollection, err error) {
8683	req, err := lastResults.aPIKVReferenceCollectionPreparer(ctx)
8684	if err != nil {
8685		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getAppSettingsKeyVaultReferencesNextResults", nil, "Failure preparing next results request")
8686	}
8687	if req == nil {
8688		return
8689	}
8690	resp, err := client.GetAppSettingsKeyVaultReferencesSender(req)
8691	if err != nil {
8692		result.Response = autorest.Response{Response: resp}
8693		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getAppSettingsKeyVaultReferencesNextResults", resp, "Failure sending next results request")
8694	}
8695	result, err = client.GetAppSettingsKeyVaultReferencesResponder(resp)
8696	if err != nil {
8697		err = autorest.NewErrorWithError(err, "web.AppsClient", "getAppSettingsKeyVaultReferencesNextResults", resp, "Failure responding to next results request")
8698	}
8699	return
8700}
8701
8702// GetAppSettingsKeyVaultReferencesComplete enumerates all values, automatically crossing page boundaries as required.
8703func (client AppsClient) GetAppSettingsKeyVaultReferencesComplete(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionIterator, err error) {
8704	if tracing.IsEnabled() {
8705		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferences")
8706		defer func() {
8707			sc := -1
8708			if result.Response().Response.Response != nil {
8709				sc = result.page.Response().Response.Response.StatusCode
8710			}
8711			tracing.EndSpan(ctx, sc, err)
8712		}()
8713	}
8714	result.page, err = client.GetAppSettingsKeyVaultReferences(ctx, resourceGroupName, name)
8715	return
8716}
8717
8718// GetAppSettingsKeyVaultReferencesSlot description for Gets the config reference app settings and status of an app
8719// Parameters:
8720// resourceGroupName - name of the resource group to which the resource belongs.
8721// name - name of the app.
8722func (client AppsClient) GetAppSettingsKeyVaultReferencesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result APIKVReferenceCollectionPage, err error) {
8723	if tracing.IsEnabled() {
8724		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferencesSlot")
8725		defer func() {
8726			sc := -1
8727			if result.arc.Response.Response != nil {
8728				sc = result.arc.Response.Response.StatusCode
8729			}
8730			tracing.EndSpan(ctx, sc, err)
8731		}()
8732	}
8733	if err := validation.Validate([]validation.Validation{
8734		{TargetValue: resourceGroupName,
8735			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8736				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8737				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8738		return result, validation.NewError("web.AppsClient", "GetAppSettingsKeyVaultReferencesSlot", err.Error())
8739	}
8740
8741	result.fn = client.getAppSettingsKeyVaultReferencesSlotNextResults
8742	req, err := client.GetAppSettingsKeyVaultReferencesSlotPreparer(ctx, resourceGroupName, name, slot)
8743	if err != nil {
8744		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferencesSlot", nil, "Failure preparing request")
8745		return
8746	}
8747
8748	resp, err := client.GetAppSettingsKeyVaultReferencesSlotSender(req)
8749	if err != nil {
8750		result.arc.Response = autorest.Response{Response: resp}
8751		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferencesSlot", resp, "Failure sending request")
8752		return
8753	}
8754
8755	result.arc, err = client.GetAppSettingsKeyVaultReferencesSlotResponder(resp)
8756	if err != nil {
8757		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAppSettingsKeyVaultReferencesSlot", resp, "Failure responding to request")
8758		return
8759	}
8760	if result.arc.hasNextLink() && result.arc.IsEmpty() {
8761		err = result.NextWithContext(ctx)
8762		return
8763	}
8764
8765	return
8766}
8767
8768// GetAppSettingsKeyVaultReferencesSlotPreparer prepares the GetAppSettingsKeyVaultReferencesSlot request.
8769func (client AppsClient) GetAppSettingsKeyVaultReferencesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8770	pathParameters := map[string]interface{}{
8771		"name":              autorest.Encode("path", name),
8772		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8773		"slot":              autorest.Encode("path", slot),
8774		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8775	}
8776
8777	const APIVersion = "2021-01-15"
8778	queryParameters := map[string]interface{}{
8779		"api-version": APIVersion,
8780	}
8781
8782	preparer := autorest.CreatePreparer(
8783		autorest.AsGet(),
8784		autorest.WithBaseURL(client.BaseURI),
8785		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings", pathParameters),
8786		autorest.WithQueryParameters(queryParameters))
8787	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8788}
8789
8790// GetAppSettingsKeyVaultReferencesSlotSender sends the GetAppSettingsKeyVaultReferencesSlot request. The method will close the
8791// http.Response Body if it receives an error.
8792func (client AppsClient) GetAppSettingsKeyVaultReferencesSlotSender(req *http.Request) (*http.Response, error) {
8793	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8794}
8795
8796// GetAppSettingsKeyVaultReferencesSlotResponder handles the response to the GetAppSettingsKeyVaultReferencesSlot request. The method always
8797// closes the http.Response Body.
8798func (client AppsClient) GetAppSettingsKeyVaultReferencesSlotResponder(resp *http.Response) (result APIKVReferenceCollection, err error) {
8799	err = autorest.Respond(
8800		resp,
8801		azure.WithErrorUnlessStatusCode(http.StatusOK),
8802		autorest.ByUnmarshallingJSON(&result),
8803		autorest.ByClosing())
8804	result.Response = autorest.Response{Response: resp}
8805	return
8806}
8807
8808// getAppSettingsKeyVaultReferencesSlotNextResults retrieves the next set of results, if any.
8809func (client AppsClient) getAppSettingsKeyVaultReferencesSlotNextResults(ctx context.Context, lastResults APIKVReferenceCollection) (result APIKVReferenceCollection, err error) {
8810	req, err := lastResults.aPIKVReferenceCollectionPreparer(ctx)
8811	if err != nil {
8812		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getAppSettingsKeyVaultReferencesSlotNextResults", nil, "Failure preparing next results request")
8813	}
8814	if req == nil {
8815		return
8816	}
8817	resp, err := client.GetAppSettingsKeyVaultReferencesSlotSender(req)
8818	if err != nil {
8819		result.Response = autorest.Response{Response: resp}
8820		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getAppSettingsKeyVaultReferencesSlotNextResults", resp, "Failure sending next results request")
8821	}
8822	result, err = client.GetAppSettingsKeyVaultReferencesSlotResponder(resp)
8823	if err != nil {
8824		err = autorest.NewErrorWithError(err, "web.AppsClient", "getAppSettingsKeyVaultReferencesSlotNextResults", resp, "Failure responding to next results request")
8825	}
8826	return
8827}
8828
8829// GetAppSettingsKeyVaultReferencesSlotComplete enumerates all values, automatically crossing page boundaries as required.
8830func (client AppsClient) GetAppSettingsKeyVaultReferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result APIKVReferenceCollectionIterator, err error) {
8831	if tracing.IsEnabled() {
8832		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAppSettingsKeyVaultReferencesSlot")
8833		defer func() {
8834			sc := -1
8835			if result.Response().Response.Response != nil {
8836				sc = result.page.Response().Response.Response.StatusCode
8837			}
8838			tracing.EndSpan(ctx, sc, err)
8839		}()
8840	}
8841	result.page, err = client.GetAppSettingsKeyVaultReferencesSlot(ctx, resourceGroupName, name, slot)
8842	return
8843}
8844
8845// GetAuthSettings description for Gets the Authentication/Authorization settings of an app.
8846// Parameters:
8847// resourceGroupName - name of the resource group to which the resource belongs.
8848// name - name of the app.
8849func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) {
8850	if tracing.IsEnabled() {
8851		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings")
8852		defer func() {
8853			sc := -1
8854			if result.Response.Response != nil {
8855				sc = result.Response.Response.StatusCode
8856			}
8857			tracing.EndSpan(ctx, sc, err)
8858		}()
8859	}
8860	if err := validation.Validate([]validation.Validation{
8861		{TargetValue: resourceGroupName,
8862			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8863				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8864				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8865		return result, validation.NewError("web.AppsClient", "GetAuthSettings", err.Error())
8866	}
8867
8868	req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name)
8869	if err != nil {
8870		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request")
8871		return
8872	}
8873
8874	resp, err := client.GetAuthSettingsSender(req)
8875	if err != nil {
8876		result.Response = autorest.Response{Response: resp}
8877		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request")
8878		return
8879	}
8880
8881	result, err = client.GetAuthSettingsResponder(resp)
8882	if err != nil {
8883		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request")
8884		return
8885	}
8886
8887	return
8888}
8889
8890// GetAuthSettingsPreparer prepares the GetAuthSettings request.
8891func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8892	pathParameters := map[string]interface{}{
8893		"name":              autorest.Encode("path", name),
8894		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8895		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8896	}
8897
8898	const APIVersion = "2021-01-15"
8899	queryParameters := map[string]interface{}{
8900		"api-version": APIVersion,
8901	}
8902
8903	preparer := autorest.CreatePreparer(
8904		autorest.AsPost(),
8905		autorest.WithBaseURL(client.BaseURI),
8906		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters),
8907		autorest.WithQueryParameters(queryParameters))
8908	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8909}
8910
8911// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the
8912// http.Response Body if it receives an error.
8913func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) {
8914	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8915}
8916
8917// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always
8918// closes the http.Response Body.
8919func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) {
8920	err = autorest.Respond(
8921		resp,
8922		azure.WithErrorUnlessStatusCode(http.StatusOK),
8923		autorest.ByUnmarshallingJSON(&result),
8924		autorest.ByClosing())
8925	result.Response = autorest.Response{Response: resp}
8926	return
8927}
8928
8929// GetAuthSettingsSlot description for Gets the Authentication/Authorization settings of an app.
8930// Parameters:
8931// resourceGroupName - name of the resource group to which the resource belongs.
8932// name - name of the app.
8933// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the
8934// production slot.
8935func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) {
8936	if tracing.IsEnabled() {
8937		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot")
8938		defer func() {
8939			sc := -1
8940			if result.Response.Response != nil {
8941				sc = result.Response.Response.StatusCode
8942			}
8943			tracing.EndSpan(ctx, sc, err)
8944		}()
8945	}
8946	if err := validation.Validate([]validation.Validation{
8947		{TargetValue: resourceGroupName,
8948			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8949				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8950				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8951		return result, validation.NewError("web.AppsClient", "GetAuthSettingsSlot", err.Error())
8952	}
8953
8954	req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
8955	if err != nil {
8956		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request")
8957		return
8958	}
8959
8960	resp, err := client.GetAuthSettingsSlotSender(req)
8961	if err != nil {
8962		result.Response = autorest.Response{Response: resp}
8963		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request")
8964		return
8965	}
8966
8967	result, err = client.GetAuthSettingsSlotResponder(resp)
8968	if err != nil {
8969		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request")
8970		return
8971	}
8972
8973	return
8974}
8975
8976// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request.
8977func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8978	pathParameters := map[string]interface{}{
8979		"name":              autorest.Encode("path", name),
8980		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8981		"slot":              autorest.Encode("path", slot),
8982		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8983	}
8984
8985	const APIVersion = "2021-01-15"
8986	queryParameters := map[string]interface{}{
8987		"api-version": APIVersion,
8988	}
8989
8990	preparer := autorest.CreatePreparer(
8991		autorest.AsPost(),
8992		autorest.WithBaseURL(client.BaseURI),
8993		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters),
8994		autorest.WithQueryParameters(queryParameters))
8995	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8996}
8997
8998// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the
8999// http.Response Body if it receives an error.
9000func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) {
9001	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9002}
9003
9004// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always
9005// closes the http.Response Body.
9006func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) {
9007	err = autorest.Respond(
9008		resp,
9009		azure.WithErrorUnlessStatusCode(http.StatusOK),
9010		autorest.ByUnmarshallingJSON(&result),
9011		autorest.ByClosing())
9012	result.Response = autorest.Response{Response: resp}
9013	return
9014}
9015
9016// GetAuthSettingsV2 description for Gets site's Authentication / Authorization settings for apps via the V2 format
9017// Parameters:
9018// resourceGroupName - name of the resource group to which the resource belongs.
9019// name - name of the app.
9020func (client AppsClient) GetAuthSettingsV2(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettingsV2, err error) {
9021	if tracing.IsEnabled() {
9022		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsV2")
9023		defer func() {
9024			sc := -1
9025			if result.Response.Response != nil {
9026				sc = result.Response.Response.StatusCode
9027			}
9028			tracing.EndSpan(ctx, sc, err)
9029		}()
9030	}
9031	if err := validation.Validate([]validation.Validation{
9032		{TargetValue: resourceGroupName,
9033			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9034				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9035				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9036		return result, validation.NewError("web.AppsClient", "GetAuthSettingsV2", err.Error())
9037	}
9038
9039	req, err := client.GetAuthSettingsV2Preparer(ctx, resourceGroupName, name)
9040	if err != nil {
9041		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2", nil, "Failure preparing request")
9042		return
9043	}
9044
9045	resp, err := client.GetAuthSettingsV2Sender(req)
9046	if err != nil {
9047		result.Response = autorest.Response{Response: resp}
9048		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2", resp, "Failure sending request")
9049		return
9050	}
9051
9052	result, err = client.GetAuthSettingsV2Responder(resp)
9053	if err != nil {
9054		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2", resp, "Failure responding to request")
9055		return
9056	}
9057
9058	return
9059}
9060
9061// GetAuthSettingsV2Preparer prepares the GetAuthSettingsV2 request.
9062func (client AppsClient) GetAuthSettingsV2Preparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9063	pathParameters := map[string]interface{}{
9064		"name":              autorest.Encode("path", name),
9065		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9066		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9067	}
9068
9069	const APIVersion = "2021-01-15"
9070	queryParameters := map[string]interface{}{
9071		"api-version": APIVersion,
9072	}
9073
9074	preparer := autorest.CreatePreparer(
9075		autorest.AsGet(),
9076		autorest.WithBaseURL(client.BaseURI),
9077		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list", pathParameters),
9078		autorest.WithQueryParameters(queryParameters))
9079	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9080}
9081
9082// GetAuthSettingsV2Sender sends the GetAuthSettingsV2 request. The method will close the
9083// http.Response Body if it receives an error.
9084func (client AppsClient) GetAuthSettingsV2Sender(req *http.Request) (*http.Response, error) {
9085	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9086}
9087
9088// GetAuthSettingsV2Responder handles the response to the GetAuthSettingsV2 request. The method always
9089// closes the http.Response Body.
9090func (client AppsClient) GetAuthSettingsV2Responder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
9091	err = autorest.Respond(
9092		resp,
9093		azure.WithErrorUnlessStatusCode(http.StatusOK),
9094		autorest.ByUnmarshallingJSON(&result),
9095		autorest.ByClosing())
9096	result.Response = autorest.Response{Response: resp}
9097	return
9098}
9099
9100// GetAuthSettingsV2Slot description for Gets site's Authentication / Authorization settings for apps via the V2 format
9101// Parameters:
9102// resourceGroupName - name of the resource group to which the resource belongs.
9103// name - name of the app.
9104// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the
9105// production slot.
9106func (client AppsClient) GetAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettingsV2, err error) {
9107	if tracing.IsEnabled() {
9108		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsV2Slot")
9109		defer func() {
9110			sc := -1
9111			if result.Response.Response != nil {
9112				sc = result.Response.Response.StatusCode
9113			}
9114			tracing.EndSpan(ctx, sc, err)
9115		}()
9116	}
9117	if err := validation.Validate([]validation.Validation{
9118		{TargetValue: resourceGroupName,
9119			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9120				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9121				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9122		return result, validation.NewError("web.AppsClient", "GetAuthSettingsV2Slot", err.Error())
9123	}
9124
9125	req, err := client.GetAuthSettingsV2SlotPreparer(ctx, resourceGroupName, name, slot)
9126	if err != nil {
9127		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2Slot", nil, "Failure preparing request")
9128		return
9129	}
9130
9131	resp, err := client.GetAuthSettingsV2SlotSender(req)
9132	if err != nil {
9133		result.Response = autorest.Response{Response: resp}
9134		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2Slot", resp, "Failure sending request")
9135		return
9136	}
9137
9138	result, err = client.GetAuthSettingsV2SlotResponder(resp)
9139	if err != nil {
9140		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2Slot", resp, "Failure responding to request")
9141		return
9142	}
9143
9144	return
9145}
9146
9147// GetAuthSettingsV2SlotPreparer prepares the GetAuthSettingsV2Slot request.
9148func (client AppsClient) GetAuthSettingsV2SlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9149	pathParameters := map[string]interface{}{
9150		"name":              autorest.Encode("path", name),
9151		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9152		"slot":              autorest.Encode("path", slot),
9153		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9154	}
9155
9156	const APIVersion = "2021-01-15"
9157	queryParameters := map[string]interface{}{
9158		"api-version": APIVersion,
9159	}
9160
9161	preparer := autorest.CreatePreparer(
9162		autorest.AsGet(),
9163		autorest.WithBaseURL(client.BaseURI),
9164		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list", pathParameters),
9165		autorest.WithQueryParameters(queryParameters))
9166	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9167}
9168
9169// GetAuthSettingsV2SlotSender sends the GetAuthSettingsV2Slot request. The method will close the
9170// http.Response Body if it receives an error.
9171func (client AppsClient) GetAuthSettingsV2SlotSender(req *http.Request) (*http.Response, error) {
9172	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9173}
9174
9175// GetAuthSettingsV2SlotResponder handles the response to the GetAuthSettingsV2Slot request. The method always
9176// closes the http.Response Body.
9177func (client AppsClient) GetAuthSettingsV2SlotResponder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
9178	err = autorest.Respond(
9179		resp,
9180		azure.WithErrorUnlessStatusCode(http.StatusOK),
9181		autorest.ByUnmarshallingJSON(&result),
9182		autorest.ByClosing())
9183	result.Response = autorest.Response{Response: resp}
9184	return
9185}
9186
9187// GetBackupConfiguration description for Gets the backup configuration of an app.
9188// Parameters:
9189// resourceGroupName - name of the resource group to which the resource belongs.
9190// name - name of the app.
9191func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) {
9192	if tracing.IsEnabled() {
9193		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration")
9194		defer func() {
9195			sc := -1
9196			if result.Response.Response != nil {
9197				sc = result.Response.Response.StatusCode
9198			}
9199			tracing.EndSpan(ctx, sc, err)
9200		}()
9201	}
9202	if err := validation.Validate([]validation.Validation{
9203		{TargetValue: resourceGroupName,
9204			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9205				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9206				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9207		return result, validation.NewError("web.AppsClient", "GetBackupConfiguration", err.Error())
9208	}
9209
9210	req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name)
9211	if err != nil {
9212		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request")
9213		return
9214	}
9215
9216	resp, err := client.GetBackupConfigurationSender(req)
9217	if err != nil {
9218		result.Response = autorest.Response{Response: resp}
9219		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request")
9220		return
9221	}
9222
9223	result, err = client.GetBackupConfigurationResponder(resp)
9224	if err != nil {
9225		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request")
9226		return
9227	}
9228
9229	return
9230}
9231
9232// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request.
9233func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9234	pathParameters := map[string]interface{}{
9235		"name":              autorest.Encode("path", name),
9236		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9237		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9238	}
9239
9240	const APIVersion = "2021-01-15"
9241	queryParameters := map[string]interface{}{
9242		"api-version": APIVersion,
9243	}
9244
9245	preparer := autorest.CreatePreparer(
9246		autorest.AsPost(),
9247		autorest.WithBaseURL(client.BaseURI),
9248		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters),
9249		autorest.WithQueryParameters(queryParameters))
9250	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9251}
9252
9253// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the
9254// http.Response Body if it receives an error.
9255func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) {
9256	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9257}
9258
9259// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always
9260// closes the http.Response Body.
9261func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) {
9262	err = autorest.Respond(
9263		resp,
9264		azure.WithErrorUnlessStatusCode(http.StatusOK),
9265		autorest.ByUnmarshallingJSON(&result),
9266		autorest.ByClosing())
9267	result.Response = autorest.Response{Response: resp}
9268	return
9269}
9270
9271// GetBackupConfigurationSlot description for Gets the backup configuration of an app.
9272// Parameters:
9273// resourceGroupName - name of the resource group to which the resource belongs.
9274// name - name of the app.
9275// slot - name of the deployment slot. If a slot is not specified, the API will get the backup configuration
9276// for the production slot.
9277func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) {
9278	if tracing.IsEnabled() {
9279		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot")
9280		defer func() {
9281			sc := -1
9282			if result.Response.Response != nil {
9283				sc = result.Response.Response.StatusCode
9284			}
9285			tracing.EndSpan(ctx, sc, err)
9286		}()
9287	}
9288	if err := validation.Validate([]validation.Validation{
9289		{TargetValue: resourceGroupName,
9290			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9291				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9292				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9293		return result, validation.NewError("web.AppsClient", "GetBackupConfigurationSlot", err.Error())
9294	}
9295
9296	req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
9297	if err != nil {
9298		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request")
9299		return
9300	}
9301
9302	resp, err := client.GetBackupConfigurationSlotSender(req)
9303	if err != nil {
9304		result.Response = autorest.Response{Response: resp}
9305		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request")
9306		return
9307	}
9308
9309	result, err = client.GetBackupConfigurationSlotResponder(resp)
9310	if err != nil {
9311		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request")
9312		return
9313	}
9314
9315	return
9316}
9317
9318// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request.
9319func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9320	pathParameters := map[string]interface{}{
9321		"name":              autorest.Encode("path", name),
9322		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9323		"slot":              autorest.Encode("path", slot),
9324		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9325	}
9326
9327	const APIVersion = "2021-01-15"
9328	queryParameters := map[string]interface{}{
9329		"api-version": APIVersion,
9330	}
9331
9332	preparer := autorest.CreatePreparer(
9333		autorest.AsPost(),
9334		autorest.WithBaseURL(client.BaseURI),
9335		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters),
9336		autorest.WithQueryParameters(queryParameters))
9337	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9338}
9339
9340// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the
9341// http.Response Body if it receives an error.
9342func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
9343	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9344}
9345
9346// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always
9347// closes the http.Response Body.
9348func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) {
9349	err = autorest.Respond(
9350		resp,
9351		azure.WithErrorUnlessStatusCode(http.StatusOK),
9352		autorest.ByUnmarshallingJSON(&result),
9353		autorest.ByClosing())
9354	result.Response = autorest.Response{Response: resp}
9355	return
9356}
9357
9358// GetBackupStatus description for Gets a backup of an app by its ID.
9359// Parameters:
9360// resourceGroupName - name of the resource group to which the resource belongs.
9361// name - name of the app.
9362// backupID - ID of the backup.
9363func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) {
9364	if tracing.IsEnabled() {
9365		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus")
9366		defer func() {
9367			sc := -1
9368			if result.Response.Response != nil {
9369				sc = result.Response.Response.StatusCode
9370			}
9371			tracing.EndSpan(ctx, sc, err)
9372		}()
9373	}
9374	if err := validation.Validate([]validation.Validation{
9375		{TargetValue: resourceGroupName,
9376			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9377				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9378				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9379		return result, validation.NewError("web.AppsClient", "GetBackupStatus", err.Error())
9380	}
9381
9382	req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID)
9383	if err != nil {
9384		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request")
9385		return
9386	}
9387
9388	resp, err := client.GetBackupStatusSender(req)
9389	if err != nil {
9390		result.Response = autorest.Response{Response: resp}
9391		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request")
9392		return
9393	}
9394
9395	result, err = client.GetBackupStatusResponder(resp)
9396	if err != nil {
9397		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request")
9398		return
9399	}
9400
9401	return
9402}
9403
9404// GetBackupStatusPreparer prepares the GetBackupStatus request.
9405func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) {
9406	pathParameters := map[string]interface{}{
9407		"backupId":          autorest.Encode("path", backupID),
9408		"name":              autorest.Encode("path", name),
9409		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9410		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9411	}
9412
9413	const APIVersion = "2021-01-15"
9414	queryParameters := map[string]interface{}{
9415		"api-version": APIVersion,
9416	}
9417
9418	preparer := autorest.CreatePreparer(
9419		autorest.AsGet(),
9420		autorest.WithBaseURL(client.BaseURI),
9421		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters),
9422		autorest.WithQueryParameters(queryParameters))
9423	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9424}
9425
9426// GetBackupStatusSender sends the GetBackupStatus request. The method will close the
9427// http.Response Body if it receives an error.
9428func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) {
9429	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9430}
9431
9432// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always
9433// closes the http.Response Body.
9434func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) {
9435	err = autorest.Respond(
9436		resp,
9437		azure.WithErrorUnlessStatusCode(http.StatusOK),
9438		autorest.ByUnmarshallingJSON(&result),
9439		autorest.ByClosing())
9440	result.Response = autorest.Response{Response: resp}
9441	return
9442}
9443
9444// GetBackupStatusSlot description for Gets a backup of an app by its ID.
9445// Parameters:
9446// resourceGroupName - name of the resource group to which the resource belongs.
9447// name - name of the app.
9448// backupID - ID of the backup.
9449// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production
9450// slot.
9451func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) {
9452	if tracing.IsEnabled() {
9453		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot")
9454		defer func() {
9455			sc := -1
9456			if result.Response.Response != nil {
9457				sc = result.Response.Response.StatusCode
9458			}
9459			tracing.EndSpan(ctx, sc, err)
9460		}()
9461	}
9462	if err := validation.Validate([]validation.Validation{
9463		{TargetValue: resourceGroupName,
9464			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9465				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9466				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9467		return result, validation.NewError("web.AppsClient", "GetBackupStatusSlot", err.Error())
9468	}
9469
9470	req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot)
9471	if err != nil {
9472		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request")
9473		return
9474	}
9475
9476	resp, err := client.GetBackupStatusSlotSender(req)
9477	if err != nil {
9478		result.Response = autorest.Response{Response: resp}
9479		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request")
9480		return
9481	}
9482
9483	result, err = client.GetBackupStatusSlotResponder(resp)
9484	if err != nil {
9485		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request")
9486		return
9487	}
9488
9489	return
9490}
9491
9492// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request.
9493func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) {
9494	pathParameters := map[string]interface{}{
9495		"backupId":          autorest.Encode("path", backupID),
9496		"name":              autorest.Encode("path", name),
9497		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9498		"slot":              autorest.Encode("path", slot),
9499		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9500	}
9501
9502	const APIVersion = "2021-01-15"
9503	queryParameters := map[string]interface{}{
9504		"api-version": APIVersion,
9505	}
9506
9507	preparer := autorest.CreatePreparer(
9508		autorest.AsGet(),
9509		autorest.WithBaseURL(client.BaseURI),
9510		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters),
9511		autorest.WithQueryParameters(queryParameters))
9512	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9513}
9514
9515// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the
9516// http.Response Body if it receives an error.
9517func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) {
9518	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9519}
9520
9521// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always
9522// closes the http.Response Body.
9523func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) {
9524	err = autorest.Respond(
9525		resp,
9526		azure.WithErrorUnlessStatusCode(http.StatusOK),
9527		autorest.ByUnmarshallingJSON(&result),
9528		autorest.ByClosing())
9529	result.Response = autorest.Response{Response: resp}
9530	return
9531}
9532
9533// GetConfiguration description for Gets the configuration of an app, such as platform version and bitness, default
9534// documents, virtual applications, Always On, etc.
9535// Parameters:
9536// resourceGroupName - name of the resource group to which the resource belongs.
9537// name - name of the app.
9538func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) {
9539	if tracing.IsEnabled() {
9540		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration")
9541		defer func() {
9542			sc := -1
9543			if result.Response.Response != nil {
9544				sc = result.Response.Response.StatusCode
9545			}
9546			tracing.EndSpan(ctx, sc, err)
9547		}()
9548	}
9549	if err := validation.Validate([]validation.Validation{
9550		{TargetValue: resourceGroupName,
9551			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9552				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9553				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9554		return result, validation.NewError("web.AppsClient", "GetConfiguration", err.Error())
9555	}
9556
9557	req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name)
9558	if err != nil {
9559		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request")
9560		return
9561	}
9562
9563	resp, err := client.GetConfigurationSender(req)
9564	if err != nil {
9565		result.Response = autorest.Response{Response: resp}
9566		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request")
9567		return
9568	}
9569
9570	result, err = client.GetConfigurationResponder(resp)
9571	if err != nil {
9572		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request")
9573		return
9574	}
9575
9576	return
9577}
9578
9579// GetConfigurationPreparer prepares the GetConfiguration request.
9580func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9581	pathParameters := map[string]interface{}{
9582		"name":              autorest.Encode("path", name),
9583		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9584		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9585	}
9586
9587	const APIVersion = "2021-01-15"
9588	queryParameters := map[string]interface{}{
9589		"api-version": APIVersion,
9590	}
9591
9592	preparer := autorest.CreatePreparer(
9593		autorest.AsGet(),
9594		autorest.WithBaseURL(client.BaseURI),
9595		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
9596		autorest.WithQueryParameters(queryParameters))
9597	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9598}
9599
9600// GetConfigurationSender sends the GetConfiguration request. The method will close the
9601// http.Response Body if it receives an error.
9602func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) {
9603	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9604}
9605
9606// GetConfigurationResponder handles the response to the GetConfiguration request. The method always
9607// closes the http.Response Body.
9608func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
9609	err = autorest.Respond(
9610		resp,
9611		azure.WithErrorUnlessStatusCode(http.StatusOK),
9612		autorest.ByUnmarshallingJSON(&result),
9613		autorest.ByClosing())
9614	result.Response = autorest.Response{Response: resp}
9615	return
9616}
9617
9618// GetConfigurationSlot description for Gets the configuration of an app, such as platform version and bitness, default
9619// documents, virtual applications, Always On, etc.
9620// Parameters:
9621// resourceGroupName - name of the resource group to which the resource belongs.
9622// name - name of the app.
9623// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
9624// production slot.
9625func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) {
9626	if tracing.IsEnabled() {
9627		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot")
9628		defer func() {
9629			sc := -1
9630			if result.Response.Response != nil {
9631				sc = result.Response.Response.StatusCode
9632			}
9633			tracing.EndSpan(ctx, sc, err)
9634		}()
9635	}
9636	if err := validation.Validate([]validation.Validation{
9637		{TargetValue: resourceGroupName,
9638			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9639				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9640				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9641		return result, validation.NewError("web.AppsClient", "GetConfigurationSlot", err.Error())
9642	}
9643
9644	req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
9645	if err != nil {
9646		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request")
9647		return
9648	}
9649
9650	resp, err := client.GetConfigurationSlotSender(req)
9651	if err != nil {
9652		result.Response = autorest.Response{Response: resp}
9653		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request")
9654		return
9655	}
9656
9657	result, err = client.GetConfigurationSlotResponder(resp)
9658	if err != nil {
9659		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request")
9660		return
9661	}
9662
9663	return
9664}
9665
9666// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request.
9667func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9668	pathParameters := map[string]interface{}{
9669		"name":              autorest.Encode("path", name),
9670		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9671		"slot":              autorest.Encode("path", slot),
9672		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9673	}
9674
9675	const APIVersion = "2021-01-15"
9676	queryParameters := map[string]interface{}{
9677		"api-version": APIVersion,
9678	}
9679
9680	preparer := autorest.CreatePreparer(
9681		autorest.AsGet(),
9682		autorest.WithBaseURL(client.BaseURI),
9683		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
9684		autorest.WithQueryParameters(queryParameters))
9685	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9686}
9687
9688// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the
9689// http.Response Body if it receives an error.
9690func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) {
9691	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9692}
9693
9694// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always
9695// closes the http.Response Body.
9696func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
9697	err = autorest.Respond(
9698		resp,
9699		azure.WithErrorUnlessStatusCode(http.StatusOK),
9700		autorest.ByUnmarshallingJSON(&result),
9701		autorest.ByClosing())
9702	result.Response = autorest.Response{Response: resp}
9703	return
9704}
9705
9706// GetConfigurationSnapshot description for Gets a snapshot of the configuration of an app at a previous point in time.
9707// Parameters:
9708// resourceGroupName - name of the resource group to which the resource belongs.
9709// name - name of the app.
9710// snapshotID - the ID of the snapshot to read.
9711func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) {
9712	if tracing.IsEnabled() {
9713		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot")
9714		defer func() {
9715			sc := -1
9716			if result.Response.Response != nil {
9717				sc = result.Response.Response.StatusCode
9718			}
9719			tracing.EndSpan(ctx, sc, err)
9720		}()
9721	}
9722	if err := validation.Validate([]validation.Validation{
9723		{TargetValue: resourceGroupName,
9724			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9725				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9726				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9727		return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshot", err.Error())
9728	}
9729
9730	req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID)
9731	if err != nil {
9732		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request")
9733		return
9734	}
9735
9736	resp, err := client.GetConfigurationSnapshotSender(req)
9737	if err != nil {
9738		result.Response = autorest.Response{Response: resp}
9739		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request")
9740		return
9741	}
9742
9743	result, err = client.GetConfigurationSnapshotResponder(resp)
9744	if err != nil {
9745		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request")
9746		return
9747	}
9748
9749	return
9750}
9751
9752// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request.
9753func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) {
9754	pathParameters := map[string]interface{}{
9755		"name":              autorest.Encode("path", name),
9756		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9757		"snapshotId":        autorest.Encode("path", snapshotID),
9758		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9759	}
9760
9761	const APIVersion = "2021-01-15"
9762	queryParameters := map[string]interface{}{
9763		"api-version": APIVersion,
9764	}
9765
9766	preparer := autorest.CreatePreparer(
9767		autorest.AsGet(),
9768		autorest.WithBaseURL(client.BaseURI),
9769		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters),
9770		autorest.WithQueryParameters(queryParameters))
9771	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9772}
9773
9774// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the
9775// http.Response Body if it receives an error.
9776func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) {
9777	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9778}
9779
9780// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always
9781// closes the http.Response Body.
9782func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) {
9783	err = autorest.Respond(
9784		resp,
9785		azure.WithErrorUnlessStatusCode(http.StatusOK),
9786		autorest.ByUnmarshallingJSON(&result),
9787		autorest.ByClosing())
9788	result.Response = autorest.Response{Response: resp}
9789	return
9790}
9791
9792// GetConfigurationSnapshotSlot description for Gets a snapshot of the configuration of an app at a previous point in
9793// time.
9794// Parameters:
9795// resourceGroupName - name of the resource group to which the resource belongs.
9796// name - name of the app.
9797// snapshotID - the ID of the snapshot to read.
9798// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
9799// production slot.
9800func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) {
9801	if tracing.IsEnabled() {
9802		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot")
9803		defer func() {
9804			sc := -1
9805			if result.Response.Response != nil {
9806				sc = result.Response.Response.StatusCode
9807			}
9808			tracing.EndSpan(ctx, sc, err)
9809		}()
9810	}
9811	if err := validation.Validate([]validation.Validation{
9812		{TargetValue: resourceGroupName,
9813			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9814				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9815				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9816		return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshotSlot", err.Error())
9817	}
9818
9819	req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot)
9820	if err != nil {
9821		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request")
9822		return
9823	}
9824
9825	resp, err := client.GetConfigurationSnapshotSlotSender(req)
9826	if err != nil {
9827		result.Response = autorest.Response{Response: resp}
9828		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request")
9829		return
9830	}
9831
9832	result, err = client.GetConfigurationSnapshotSlotResponder(resp)
9833	if err != nil {
9834		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request")
9835		return
9836	}
9837
9838	return
9839}
9840
9841// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request.
9842func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) {
9843	pathParameters := map[string]interface{}{
9844		"name":              autorest.Encode("path", name),
9845		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9846		"slot":              autorest.Encode("path", slot),
9847		"snapshotId":        autorest.Encode("path", snapshotID),
9848		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9849	}
9850
9851	const APIVersion = "2021-01-15"
9852	queryParameters := map[string]interface{}{
9853		"api-version": APIVersion,
9854	}
9855
9856	preparer := autorest.CreatePreparer(
9857		autorest.AsGet(),
9858		autorest.WithBaseURL(client.BaseURI),
9859		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters),
9860		autorest.WithQueryParameters(queryParameters))
9861	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9862}
9863
9864// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the
9865// http.Response Body if it receives an error.
9866func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) {
9867	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9868}
9869
9870// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always
9871// closes the http.Response Body.
9872func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
9873	err = autorest.Respond(
9874		resp,
9875		azure.WithErrorUnlessStatusCode(http.StatusOK),
9876		autorest.ByUnmarshallingJSON(&result),
9877		autorest.ByClosing())
9878	result.Response = autorest.Response{Response: resp}
9879	return
9880}
9881
9882// GetContainerLogsZip description for Gets the ZIP archived docker log files for the given site
9883// Parameters:
9884// resourceGroupName - name of the resource group to which the resource belongs.
9885// name - name of web app.
9886func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) {
9887	if tracing.IsEnabled() {
9888		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip")
9889		defer func() {
9890			sc := -1
9891			if result.Response.Response != nil {
9892				sc = result.Response.Response.StatusCode
9893			}
9894			tracing.EndSpan(ctx, sc, err)
9895		}()
9896	}
9897	if err := validation.Validate([]validation.Validation{
9898		{TargetValue: resourceGroupName,
9899			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9900				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9901				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9902		return result, validation.NewError("web.AppsClient", "GetContainerLogsZip", err.Error())
9903	}
9904
9905	req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name)
9906	if err != nil {
9907		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request")
9908		return
9909	}
9910
9911	resp, err := client.GetContainerLogsZipSender(req)
9912	if err != nil {
9913		result.Response = autorest.Response{Response: resp}
9914		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request")
9915		return
9916	}
9917
9918	result, err = client.GetContainerLogsZipResponder(resp)
9919	if err != nil {
9920		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request")
9921		return
9922	}
9923
9924	return
9925}
9926
9927// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request.
9928func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9929	pathParameters := map[string]interface{}{
9930		"name":              autorest.Encode("path", name),
9931		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9932		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9933	}
9934
9935	const APIVersion = "2021-01-15"
9936	queryParameters := map[string]interface{}{
9937		"api-version": APIVersion,
9938	}
9939
9940	preparer := autorest.CreatePreparer(
9941		autorest.AsPost(),
9942		autorest.WithBaseURL(client.BaseURI),
9943		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters),
9944		autorest.WithQueryParameters(queryParameters))
9945	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9946}
9947
9948// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the
9949// http.Response Body if it receives an error.
9950func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) {
9951	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9952}
9953
9954// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always
9955// closes the http.Response Body.
9956func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) {
9957	result.Value = &resp.Body
9958	err = autorest.Respond(
9959		resp,
9960		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
9961	result.Response = autorest.Response{Response: resp}
9962	return
9963}
9964
9965// GetContainerLogsZipSlot description for Gets the ZIP archived docker log files for the given site
9966// Parameters:
9967// resourceGroupName - name of the resource group to which the resource belongs.
9968// name - name of web app.
9969// slot - name of web app slot. If not specified then will default to production slot.
9970func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) {
9971	if tracing.IsEnabled() {
9972		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot")
9973		defer func() {
9974			sc := -1
9975			if result.Response.Response != nil {
9976				sc = result.Response.Response.StatusCode
9977			}
9978			tracing.EndSpan(ctx, sc, err)
9979		}()
9980	}
9981	if err := validation.Validate([]validation.Validation{
9982		{TargetValue: resourceGroupName,
9983			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9984				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9985				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9986		return result, validation.NewError("web.AppsClient", "GetContainerLogsZipSlot", err.Error())
9987	}
9988
9989	req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot)
9990	if err != nil {
9991		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request")
9992		return
9993	}
9994
9995	resp, err := client.GetContainerLogsZipSlotSender(req)
9996	if err != nil {
9997		result.Response = autorest.Response{Response: resp}
9998		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request")
9999		return
10000	}
10001
10002	result, err = client.GetContainerLogsZipSlotResponder(resp)
10003	if err != nil {
10004		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request")
10005		return
10006	}
10007
10008	return
10009}
10010
10011// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request.
10012func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
10013	pathParameters := map[string]interface{}{
10014		"name":              autorest.Encode("path", name),
10015		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10016		"slot":              autorest.Encode("path", slot),
10017		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10018	}
10019
10020	const APIVersion = "2021-01-15"
10021	queryParameters := map[string]interface{}{
10022		"api-version": APIVersion,
10023	}
10024
10025	preparer := autorest.CreatePreparer(
10026		autorest.AsPost(),
10027		autorest.WithBaseURL(client.BaseURI),
10028		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters),
10029		autorest.WithQueryParameters(queryParameters))
10030	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10031}
10032
10033// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the
10034// http.Response Body if it receives an error.
10035func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) {
10036	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10037}
10038
10039// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always
10040// closes the http.Response Body.
10041func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) {
10042	result.Value = &resp.Body
10043	err = autorest.Respond(
10044		resp,
10045		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
10046	result.Response = autorest.Response{Response: resp}
10047	return
10048}
10049
10050// GetContinuousWebJob description for Gets a continuous web job by its ID for an app, or a deployment slot.
10051// Parameters:
10052// resourceGroupName - name of the resource group to which the resource belongs.
10053// name - site name.
10054// webJobName - name of Web Job.
10055func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) {
10056	if tracing.IsEnabled() {
10057		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob")
10058		defer func() {
10059			sc := -1
10060			if result.Response.Response != nil {
10061				sc = result.Response.Response.StatusCode
10062			}
10063			tracing.EndSpan(ctx, sc, err)
10064		}()
10065	}
10066	if err := validation.Validate([]validation.Validation{
10067		{TargetValue: resourceGroupName,
10068			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10069				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10070				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10071		return result, validation.NewError("web.AppsClient", "GetContinuousWebJob", err.Error())
10072	}
10073
10074	req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
10075	if err != nil {
10076		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request")
10077		return
10078	}
10079
10080	resp, err := client.GetContinuousWebJobSender(req)
10081	if err != nil {
10082		result.Response = autorest.Response{Response: resp}
10083		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request")
10084		return
10085	}
10086
10087	result, err = client.GetContinuousWebJobResponder(resp)
10088	if err != nil {
10089		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request")
10090		return
10091	}
10092
10093	return
10094}
10095
10096// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request.
10097func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
10098	pathParameters := map[string]interface{}{
10099		"name":              autorest.Encode("path", name),
10100		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10101		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10102		"webJobName":        autorest.Encode("path", webJobName),
10103	}
10104
10105	const APIVersion = "2021-01-15"
10106	queryParameters := map[string]interface{}{
10107		"api-version": APIVersion,
10108	}
10109
10110	preparer := autorest.CreatePreparer(
10111		autorest.AsGet(),
10112		autorest.WithBaseURL(client.BaseURI),
10113		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters),
10114		autorest.WithQueryParameters(queryParameters))
10115	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10116}
10117
10118// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the
10119// http.Response Body if it receives an error.
10120func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) {
10121	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10122}
10123
10124// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always
10125// closes the http.Response Body.
10126func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) {
10127	err = autorest.Respond(
10128		resp,
10129		azure.WithErrorUnlessStatusCode(http.StatusOK),
10130		autorest.ByUnmarshallingJSON(&result),
10131		autorest.ByClosing())
10132	result.Response = autorest.Response{Response: resp}
10133	return
10134}
10135
10136// GetContinuousWebJobSlot description for Gets a continuous web job by its ID for an app, or a deployment slot.
10137// Parameters:
10138// resourceGroupName - name of the resource group to which the resource belongs.
10139// name - site name.
10140// webJobName - name of Web Job.
10141// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
10142// production slot.
10143func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) {
10144	if tracing.IsEnabled() {
10145		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot")
10146		defer func() {
10147			sc := -1
10148			if result.Response.Response != nil {
10149				sc = result.Response.Response.StatusCode
10150			}
10151			tracing.EndSpan(ctx, sc, err)
10152		}()
10153	}
10154	if err := validation.Validate([]validation.Validation{
10155		{TargetValue: resourceGroupName,
10156			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10157				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10158				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10159		return result, validation.NewError("web.AppsClient", "GetContinuousWebJobSlot", err.Error())
10160	}
10161
10162	req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
10163	if err != nil {
10164		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request")
10165		return
10166	}
10167
10168	resp, err := client.GetContinuousWebJobSlotSender(req)
10169	if err != nil {
10170		result.Response = autorest.Response{Response: resp}
10171		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request")
10172		return
10173	}
10174
10175	result, err = client.GetContinuousWebJobSlotResponder(resp)
10176	if err != nil {
10177		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request")
10178		return
10179	}
10180
10181	return
10182}
10183
10184// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request.
10185func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
10186	pathParameters := map[string]interface{}{
10187		"name":              autorest.Encode("path", name),
10188		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10189		"slot":              autorest.Encode("path", slot),
10190		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10191		"webJobName":        autorest.Encode("path", webJobName),
10192	}
10193
10194	const APIVersion = "2021-01-15"
10195	queryParameters := map[string]interface{}{
10196		"api-version": APIVersion,
10197	}
10198
10199	preparer := autorest.CreatePreparer(
10200		autorest.AsGet(),
10201		autorest.WithBaseURL(client.BaseURI),
10202		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters),
10203		autorest.WithQueryParameters(queryParameters))
10204	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10205}
10206
10207// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the
10208// http.Response Body if it receives an error.
10209func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
10210	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10211}
10212
10213// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always
10214// closes the http.Response Body.
10215func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) {
10216	err = autorest.Respond(
10217		resp,
10218		azure.WithErrorUnlessStatusCode(http.StatusOK),
10219		autorest.ByUnmarshallingJSON(&result),
10220		autorest.ByClosing())
10221	result.Response = autorest.Response{Response: resp}
10222	return
10223}
10224
10225// GetDeployment description for Get a deployment by its ID for an app, or a deployment slot.
10226// Parameters:
10227// resourceGroupName - name of the resource group to which the resource belongs.
10228// name - name of the app.
10229// ID - deployment ID.
10230func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) {
10231	if tracing.IsEnabled() {
10232		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment")
10233		defer func() {
10234			sc := -1
10235			if result.Response.Response != nil {
10236				sc = result.Response.Response.StatusCode
10237			}
10238			tracing.EndSpan(ctx, sc, err)
10239		}()
10240	}
10241	if err := validation.Validate([]validation.Validation{
10242		{TargetValue: resourceGroupName,
10243			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10244				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10245				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10246		return result, validation.NewError("web.AppsClient", "GetDeployment", err.Error())
10247	}
10248
10249	req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID)
10250	if err != nil {
10251		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request")
10252		return
10253	}
10254
10255	resp, err := client.GetDeploymentSender(req)
10256	if err != nil {
10257		result.Response = autorest.Response{Response: resp}
10258		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request")
10259		return
10260	}
10261
10262	result, err = client.GetDeploymentResponder(resp)
10263	if err != nil {
10264		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request")
10265		return
10266	}
10267
10268	return
10269}
10270
10271// GetDeploymentPreparer prepares the GetDeployment request.
10272func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
10273	pathParameters := map[string]interface{}{
10274		"id":                autorest.Encode("path", ID),
10275		"name":              autorest.Encode("path", name),
10276		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10277		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10278	}
10279
10280	const APIVersion = "2021-01-15"
10281	queryParameters := map[string]interface{}{
10282		"api-version": APIVersion,
10283	}
10284
10285	preparer := autorest.CreatePreparer(
10286		autorest.AsGet(),
10287		autorest.WithBaseURL(client.BaseURI),
10288		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
10289		autorest.WithQueryParameters(queryParameters))
10290	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10291}
10292
10293// GetDeploymentSender sends the GetDeployment request. The method will close the
10294// http.Response Body if it receives an error.
10295func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) {
10296	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10297}
10298
10299// GetDeploymentResponder handles the response to the GetDeployment request. The method always
10300// closes the http.Response Body.
10301func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) {
10302	err = autorest.Respond(
10303		resp,
10304		azure.WithErrorUnlessStatusCode(http.StatusOK),
10305		autorest.ByUnmarshallingJSON(&result),
10306		autorest.ByClosing())
10307	result.Response = autorest.Response{Response: resp}
10308	return
10309}
10310
10311// GetDeploymentSlot description for Get a deployment by its ID for an app, or a deployment slot.
10312// Parameters:
10313// resourceGroupName - name of the resource group to which the resource belongs.
10314// name - name of the app.
10315// ID - deployment ID.
10316// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production
10317// slot.
10318func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) {
10319	if tracing.IsEnabled() {
10320		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot")
10321		defer func() {
10322			sc := -1
10323			if result.Response.Response != nil {
10324				sc = result.Response.Response.StatusCode
10325			}
10326			tracing.EndSpan(ctx, sc, err)
10327		}()
10328	}
10329	if err := validation.Validate([]validation.Validation{
10330		{TargetValue: resourceGroupName,
10331			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10332				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10333				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10334		return result, validation.NewError("web.AppsClient", "GetDeploymentSlot", err.Error())
10335	}
10336
10337	req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot)
10338	if err != nil {
10339		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request")
10340		return
10341	}
10342
10343	resp, err := client.GetDeploymentSlotSender(req)
10344	if err != nil {
10345		result.Response = autorest.Response{Response: resp}
10346		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request")
10347		return
10348	}
10349
10350	result, err = client.GetDeploymentSlotResponder(resp)
10351	if err != nil {
10352		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request")
10353		return
10354	}
10355
10356	return
10357}
10358
10359// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request.
10360func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
10361	pathParameters := map[string]interface{}{
10362		"id":                autorest.Encode("path", ID),
10363		"name":              autorest.Encode("path", name),
10364		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10365		"slot":              autorest.Encode("path", slot),
10366		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10367	}
10368
10369	const APIVersion = "2021-01-15"
10370	queryParameters := map[string]interface{}{
10371		"api-version": APIVersion,
10372	}
10373
10374	preparer := autorest.CreatePreparer(
10375		autorest.AsGet(),
10376		autorest.WithBaseURL(client.BaseURI),
10377		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
10378		autorest.WithQueryParameters(queryParameters))
10379	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10380}
10381
10382// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the
10383// http.Response Body if it receives an error.
10384func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) {
10385	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10386}
10387
10388// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always
10389// closes the http.Response Body.
10390func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) {
10391	err = autorest.Respond(
10392		resp,
10393		azure.WithErrorUnlessStatusCode(http.StatusOK),
10394		autorest.ByUnmarshallingJSON(&result),
10395		autorest.ByClosing())
10396	result.Response = autorest.Response{Response: resp}
10397	return
10398}
10399
10400// GetDiagnosticLogsConfiguration description for Gets the logging configuration of an app.
10401// Parameters:
10402// resourceGroupName - name of the resource group to which the resource belongs.
10403// name - name of the app.
10404func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) {
10405	if tracing.IsEnabled() {
10406		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration")
10407		defer func() {
10408			sc := -1
10409			if result.Response.Response != nil {
10410				sc = result.Response.Response.StatusCode
10411			}
10412			tracing.EndSpan(ctx, sc, err)
10413		}()
10414	}
10415	if err := validation.Validate([]validation.Validation{
10416		{TargetValue: resourceGroupName,
10417			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10418				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10419				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10420		return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfiguration", err.Error())
10421	}
10422
10423	req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name)
10424	if err != nil {
10425		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request")
10426		return
10427	}
10428
10429	resp, err := client.GetDiagnosticLogsConfigurationSender(req)
10430	if err != nil {
10431		result.Response = autorest.Response{Response: resp}
10432		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request")
10433		return
10434	}
10435
10436	result, err = client.GetDiagnosticLogsConfigurationResponder(resp)
10437	if err != nil {
10438		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request")
10439		return
10440	}
10441
10442	return
10443}
10444
10445// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request.
10446func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
10447	pathParameters := map[string]interface{}{
10448		"name":              autorest.Encode("path", name),
10449		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10450		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10451	}
10452
10453	const APIVersion = "2021-01-15"
10454	queryParameters := map[string]interface{}{
10455		"api-version": APIVersion,
10456	}
10457
10458	preparer := autorest.CreatePreparer(
10459		autorest.AsGet(),
10460		autorest.WithBaseURL(client.BaseURI),
10461		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters),
10462		autorest.WithQueryParameters(queryParameters))
10463	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10464}
10465
10466// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the
10467// http.Response Body if it receives an error.
10468func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) {
10469	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10470}
10471
10472// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always
10473// closes the http.Response Body.
10474func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) {
10475	err = autorest.Respond(
10476		resp,
10477		azure.WithErrorUnlessStatusCode(http.StatusOK),
10478		autorest.ByUnmarshallingJSON(&result),
10479		autorest.ByClosing())
10480	result.Response = autorest.Response{Response: resp}
10481	return
10482}
10483
10484// GetDiagnosticLogsConfigurationSlot description for Gets the logging configuration of an app.
10485// Parameters:
10486// resourceGroupName - name of the resource group to which the resource belongs.
10487// name - name of the app.
10488// slot - name of the deployment slot. If a slot is not specified, the API will get the logging configuration
10489// for the production slot.
10490func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) {
10491	if tracing.IsEnabled() {
10492		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot")
10493		defer func() {
10494			sc := -1
10495			if result.Response.Response != nil {
10496				sc = result.Response.Response.StatusCode
10497			}
10498			tracing.EndSpan(ctx, sc, err)
10499		}()
10500	}
10501	if err := validation.Validate([]validation.Validation{
10502		{TargetValue: resourceGroupName,
10503			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10504				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10505				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10506		return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfigurationSlot", err.Error())
10507	}
10508
10509	req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
10510	if err != nil {
10511		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request")
10512		return
10513	}
10514
10515	resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req)
10516	if err != nil {
10517		result.Response = autorest.Response{Response: resp}
10518		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request")
10519		return
10520	}
10521
10522	result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp)
10523	if err != nil {
10524		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request")
10525		return
10526	}
10527
10528	return
10529}
10530
10531// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request.
10532func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
10533	pathParameters := map[string]interface{}{
10534		"name":              autorest.Encode("path", name),
10535		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10536		"slot":              autorest.Encode("path", slot),
10537		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10538	}
10539
10540	const APIVersion = "2021-01-15"
10541	queryParameters := map[string]interface{}{
10542		"api-version": APIVersion,
10543	}
10544
10545	preparer := autorest.CreatePreparer(
10546		autorest.AsGet(),
10547		autorest.WithBaseURL(client.BaseURI),
10548		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters),
10549		autorest.WithQueryParameters(queryParameters))
10550	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10551}
10552
10553// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the
10554// http.Response Body if it receives an error.
10555func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) {
10556	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10557}
10558
10559// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always
10560// closes the http.Response Body.
10561func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) {
10562	err = autorest.Respond(
10563		resp,
10564		azure.WithErrorUnlessStatusCode(http.StatusOK),
10565		autorest.ByUnmarshallingJSON(&result),
10566		autorest.ByClosing())
10567	result.Response = autorest.Response{Response: resp}
10568	return
10569}
10570
10571// GetDomainOwnershipIdentifier description for Get domain ownership identifier for web app.
10572// Parameters:
10573// resourceGroupName - name of the resource group to which the resource belongs.
10574// name - name of the app.
10575// domainOwnershipIdentifierName - name of domain ownership identifier.
10576func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) {
10577	if tracing.IsEnabled() {
10578		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier")
10579		defer func() {
10580			sc := -1
10581			if result.Response.Response != nil {
10582				sc = result.Response.Response.StatusCode
10583			}
10584			tracing.EndSpan(ctx, sc, err)
10585		}()
10586	}
10587	if err := validation.Validate([]validation.Validation{
10588		{TargetValue: resourceGroupName,
10589			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10590				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10591				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10592		return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifier", err.Error())
10593	}
10594
10595	req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName)
10596	if err != nil {
10597		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request")
10598		return
10599	}
10600
10601	resp, err := client.GetDomainOwnershipIdentifierSender(req)
10602	if err != nil {
10603		result.Response = autorest.Response{Response: resp}
10604		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request")
10605		return
10606	}
10607
10608	result, err = client.GetDomainOwnershipIdentifierResponder(resp)
10609	if err != nil {
10610		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request")
10611		return
10612	}
10613
10614	return
10615}
10616
10617// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request.
10618func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) {
10619	pathParameters := map[string]interface{}{
10620		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
10621		"name":                          autorest.Encode("path", name),
10622		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
10623		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
10624	}
10625
10626	const APIVersion = "2021-01-15"
10627	queryParameters := map[string]interface{}{
10628		"api-version": APIVersion,
10629	}
10630
10631	preparer := autorest.CreatePreparer(
10632		autorest.AsGet(),
10633		autorest.WithBaseURL(client.BaseURI),
10634		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
10635		autorest.WithQueryParameters(queryParameters))
10636	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10637}
10638
10639// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the
10640// http.Response Body if it receives an error.
10641func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
10642	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10643}
10644
10645// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always
10646// closes the http.Response Body.
10647func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
10648	err = autorest.Respond(
10649		resp,
10650		azure.WithErrorUnlessStatusCode(http.StatusOK),
10651		autorest.ByUnmarshallingJSON(&result),
10652		autorest.ByClosing())
10653	result.Response = autorest.Response{Response: resp}
10654	return
10655}
10656
10657// GetDomainOwnershipIdentifierSlot description for Get domain ownership identifier for web app.
10658// Parameters:
10659// resourceGroupName - name of the resource group to which the resource belongs.
10660// name - name of the app.
10661// domainOwnershipIdentifierName - name of domain ownership identifier.
10662// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
10663// production slot.
10664func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) {
10665	if tracing.IsEnabled() {
10666		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot")
10667		defer func() {
10668			sc := -1
10669			if result.Response.Response != nil {
10670				sc = result.Response.Response.StatusCode
10671			}
10672			tracing.EndSpan(ctx, sc, err)
10673		}()
10674	}
10675	if err := validation.Validate([]validation.Validation{
10676		{TargetValue: resourceGroupName,
10677			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10678				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10679				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10680		return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifierSlot", err.Error())
10681	}
10682
10683	req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot)
10684	if err != nil {
10685		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
10686		return
10687	}
10688
10689	resp, err := client.GetDomainOwnershipIdentifierSlotSender(req)
10690	if err != nil {
10691		result.Response = autorest.Response{Response: resp}
10692		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request")
10693		return
10694	}
10695
10696	result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp)
10697	if err != nil {
10698		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
10699		return
10700	}
10701
10702	return
10703}
10704
10705// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request.
10706func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) {
10707	pathParameters := map[string]interface{}{
10708		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
10709		"name":                          autorest.Encode("path", name),
10710		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
10711		"slot":                          autorest.Encode("path", slot),
10712		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
10713	}
10714
10715	const APIVersion = "2021-01-15"
10716	queryParameters := map[string]interface{}{
10717		"api-version": APIVersion,
10718	}
10719
10720	preparer := autorest.CreatePreparer(
10721		autorest.AsGet(),
10722		autorest.WithBaseURL(client.BaseURI),
10723		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
10724		autorest.WithQueryParameters(queryParameters))
10725	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10726}
10727
10728// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the
10729// http.Response Body if it receives an error.
10730func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
10731	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10732}
10733
10734// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always
10735// closes the http.Response Body.
10736func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
10737	err = autorest.Respond(
10738		resp,
10739		azure.WithErrorUnlessStatusCode(http.StatusOK),
10740		autorest.ByUnmarshallingJSON(&result),
10741		autorest.ByClosing())
10742	result.Response = autorest.Response{Response: resp}
10743	return
10744}
10745
10746// GetFtpAllowed description for Returns whether FTP is allowed on the site or not.
10747// Parameters:
10748// resourceGroupName - name of the resource group to which the resource belongs.
10749// name - name of the app.
10750func (client AppsClient) GetFtpAllowed(ctx context.Context, resourceGroupName string, name string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
10751	if tracing.IsEnabled() {
10752		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFtpAllowed")
10753		defer func() {
10754			sc := -1
10755			if result.Response.Response != nil {
10756				sc = result.Response.Response.StatusCode
10757			}
10758			tracing.EndSpan(ctx, sc, err)
10759		}()
10760	}
10761	if err := validation.Validate([]validation.Validation{
10762		{TargetValue: resourceGroupName,
10763			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10764				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10765				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10766		return result, validation.NewError("web.AppsClient", "GetFtpAllowed", err.Error())
10767	}
10768
10769	req, err := client.GetFtpAllowedPreparer(ctx, resourceGroupName, name)
10770	if err != nil {
10771		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowed", nil, "Failure preparing request")
10772		return
10773	}
10774
10775	resp, err := client.GetFtpAllowedSender(req)
10776	if err != nil {
10777		result.Response = autorest.Response{Response: resp}
10778		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowed", resp, "Failure sending request")
10779		return
10780	}
10781
10782	result, err = client.GetFtpAllowedResponder(resp)
10783	if err != nil {
10784		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowed", resp, "Failure responding to request")
10785		return
10786	}
10787
10788	return
10789}
10790
10791// GetFtpAllowedPreparer prepares the GetFtpAllowed request.
10792func (client AppsClient) GetFtpAllowedPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
10793	pathParameters := map[string]interface{}{
10794		"name":              autorest.Encode("path", name),
10795		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10796		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10797	}
10798
10799	const APIVersion = "2021-01-15"
10800	queryParameters := map[string]interface{}{
10801		"api-version": APIVersion,
10802	}
10803
10804	preparer := autorest.CreatePreparer(
10805		autorest.AsGet(),
10806		autorest.WithBaseURL(client.BaseURI),
10807		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp", pathParameters),
10808		autorest.WithQueryParameters(queryParameters))
10809	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10810}
10811
10812// GetFtpAllowedSender sends the GetFtpAllowed request. The method will close the
10813// http.Response Body if it receives an error.
10814func (client AppsClient) GetFtpAllowedSender(req *http.Request) (*http.Response, error) {
10815	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10816}
10817
10818// GetFtpAllowedResponder handles the response to the GetFtpAllowed request. The method always
10819// closes the http.Response Body.
10820func (client AppsClient) GetFtpAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
10821	err = autorest.Respond(
10822		resp,
10823		azure.WithErrorUnlessStatusCode(http.StatusOK),
10824		autorest.ByUnmarshallingJSON(&result),
10825		autorest.ByClosing())
10826	result.Response = autorest.Response{Response: resp}
10827	return
10828}
10829
10830// GetFtpAllowedSlot description for Returns whether FTP is allowed on the site or not.
10831// Parameters:
10832// resourceGroupName - name of the resource group to which the resource belongs.
10833// name - name of the app.
10834func (client AppsClient) GetFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
10835	if tracing.IsEnabled() {
10836		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFtpAllowedSlot")
10837		defer func() {
10838			sc := -1
10839			if result.Response.Response != nil {
10840				sc = result.Response.Response.StatusCode
10841			}
10842			tracing.EndSpan(ctx, sc, err)
10843		}()
10844	}
10845	if err := validation.Validate([]validation.Validation{
10846		{TargetValue: resourceGroupName,
10847			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10848				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10849				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10850		return result, validation.NewError("web.AppsClient", "GetFtpAllowedSlot", err.Error())
10851	}
10852
10853	req, err := client.GetFtpAllowedSlotPreparer(ctx, resourceGroupName, name, slot)
10854	if err != nil {
10855		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowedSlot", nil, "Failure preparing request")
10856		return
10857	}
10858
10859	resp, err := client.GetFtpAllowedSlotSender(req)
10860	if err != nil {
10861		result.Response = autorest.Response{Response: resp}
10862		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowedSlot", resp, "Failure sending request")
10863		return
10864	}
10865
10866	result, err = client.GetFtpAllowedSlotResponder(resp)
10867	if err != nil {
10868		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowedSlot", resp, "Failure responding to request")
10869		return
10870	}
10871
10872	return
10873}
10874
10875// GetFtpAllowedSlotPreparer prepares the GetFtpAllowedSlot request.
10876func (client AppsClient) GetFtpAllowedSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
10877	pathParameters := map[string]interface{}{
10878		"name":              autorest.Encode("path", name),
10879		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10880		"slot":              autorest.Encode("path", slot),
10881		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10882	}
10883
10884	const APIVersion = "2021-01-15"
10885	queryParameters := map[string]interface{}{
10886		"api-version": APIVersion,
10887	}
10888
10889	preparer := autorest.CreatePreparer(
10890		autorest.AsGet(),
10891		autorest.WithBaseURL(client.BaseURI),
10892		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp", pathParameters),
10893		autorest.WithQueryParameters(queryParameters))
10894	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10895}
10896
10897// GetFtpAllowedSlotSender sends the GetFtpAllowedSlot request. The method will close the
10898// http.Response Body if it receives an error.
10899func (client AppsClient) GetFtpAllowedSlotSender(req *http.Request) (*http.Response, error) {
10900	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10901}
10902
10903// GetFtpAllowedSlotResponder handles the response to the GetFtpAllowedSlot request. The method always
10904// closes the http.Response Body.
10905func (client AppsClient) GetFtpAllowedSlotResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
10906	err = autorest.Respond(
10907		resp,
10908		azure.WithErrorUnlessStatusCode(http.StatusOK),
10909		autorest.ByUnmarshallingJSON(&result),
10910		autorest.ByClosing())
10911	result.Response = autorest.Response{Response: resp}
10912	return
10913}
10914
10915// GetFunction description for Get function information by its ID for web site, or a deployment slot.
10916// Parameters:
10917// resourceGroupName - name of the resource group to which the resource belongs.
10918// name - site name.
10919// functionName - function name.
10920func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) {
10921	if tracing.IsEnabled() {
10922		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction")
10923		defer func() {
10924			sc := -1
10925			if result.Response.Response != nil {
10926				sc = result.Response.Response.StatusCode
10927			}
10928			tracing.EndSpan(ctx, sc, err)
10929		}()
10930	}
10931	if err := validation.Validate([]validation.Validation{
10932		{TargetValue: resourceGroupName,
10933			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10934				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10935				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10936		return result, validation.NewError("web.AppsClient", "GetFunction", err.Error())
10937	}
10938
10939	req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName)
10940	if err != nil {
10941		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request")
10942		return
10943	}
10944
10945	resp, err := client.GetFunctionSender(req)
10946	if err != nil {
10947		result.Response = autorest.Response{Response: resp}
10948		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request")
10949		return
10950	}
10951
10952	result, err = client.GetFunctionResponder(resp)
10953	if err != nil {
10954		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request")
10955		return
10956	}
10957
10958	return
10959}
10960
10961// GetFunctionPreparer prepares the GetFunction request.
10962func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
10963	pathParameters := map[string]interface{}{
10964		"functionName":      autorest.Encode("path", functionName),
10965		"name":              autorest.Encode("path", name),
10966		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10967		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10968	}
10969
10970	const APIVersion = "2021-01-15"
10971	queryParameters := map[string]interface{}{
10972		"api-version": APIVersion,
10973	}
10974
10975	preparer := autorest.CreatePreparer(
10976		autorest.AsGet(),
10977		autorest.WithBaseURL(client.BaseURI),
10978		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
10979		autorest.WithQueryParameters(queryParameters))
10980	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10981}
10982
10983// GetFunctionSender sends the GetFunction request. The method will close the
10984// http.Response Body if it receives an error.
10985func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) {
10986	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10987}
10988
10989// GetFunctionResponder handles the response to the GetFunction request. The method always
10990// closes the http.Response Body.
10991func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) {
10992	err = autorest.Respond(
10993		resp,
10994		azure.WithErrorUnlessStatusCode(http.StatusOK),
10995		autorest.ByUnmarshallingJSON(&result),
10996		autorest.ByClosing())
10997	result.Response = autorest.Response{Response: resp}
10998	return
10999}
11000
11001// GetFunctionsAdminToken description for Fetch a short lived token that can be exchanged for a master key.
11002// Parameters:
11003// resourceGroupName - name of the resource group to which the resource belongs.
11004// name - name of web app.
11005func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) {
11006	if tracing.IsEnabled() {
11007		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken")
11008		defer func() {
11009			sc := -1
11010			if result.Response.Response != nil {
11011				sc = result.Response.Response.StatusCode
11012			}
11013			tracing.EndSpan(ctx, sc, err)
11014		}()
11015	}
11016	if err := validation.Validate([]validation.Validation{
11017		{TargetValue: resourceGroupName,
11018			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11019				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11020				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11021		return result, validation.NewError("web.AppsClient", "GetFunctionsAdminToken", err.Error())
11022	}
11023
11024	req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name)
11025	if err != nil {
11026		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request")
11027		return
11028	}
11029
11030	resp, err := client.GetFunctionsAdminTokenSender(req)
11031	if err != nil {
11032		result.Response = autorest.Response{Response: resp}
11033		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request")
11034		return
11035	}
11036
11037	result, err = client.GetFunctionsAdminTokenResponder(resp)
11038	if err != nil {
11039		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request")
11040		return
11041	}
11042
11043	return
11044}
11045
11046// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request.
11047func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
11048	pathParameters := map[string]interface{}{
11049		"name":              autorest.Encode("path", name),
11050		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11051		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11052	}
11053
11054	const APIVersion = "2021-01-15"
11055	queryParameters := map[string]interface{}{
11056		"api-version": APIVersion,
11057	}
11058
11059	preparer := autorest.CreatePreparer(
11060		autorest.AsGet(),
11061		autorest.WithBaseURL(client.BaseURI),
11062		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters),
11063		autorest.WithQueryParameters(queryParameters))
11064	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11065}
11066
11067// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the
11068// http.Response Body if it receives an error.
11069func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) {
11070	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11071}
11072
11073// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always
11074// closes the http.Response Body.
11075func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) {
11076	err = autorest.Respond(
11077		resp,
11078		azure.WithErrorUnlessStatusCode(http.StatusOK),
11079		autorest.ByUnmarshallingJSON(&result.Value),
11080		autorest.ByClosing())
11081	result.Response = autorest.Response{Response: resp}
11082	return
11083}
11084
11085// GetFunctionsAdminTokenSlot description for Fetch a short lived token that can be exchanged for a master key.
11086// Parameters:
11087// resourceGroupName - name of the resource group to which the resource belongs.
11088// name - name of web app.
11089// slot - name of web app slot. If not specified then will default to production slot.
11090func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) {
11091	if tracing.IsEnabled() {
11092		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot")
11093		defer func() {
11094			sc := -1
11095			if result.Response.Response != nil {
11096				sc = result.Response.Response.StatusCode
11097			}
11098			tracing.EndSpan(ctx, sc, err)
11099		}()
11100	}
11101	if err := validation.Validate([]validation.Validation{
11102		{TargetValue: resourceGroupName,
11103			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11104				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11105				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11106		return result, validation.NewError("web.AppsClient", "GetFunctionsAdminTokenSlot", err.Error())
11107	}
11108
11109	req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot)
11110	if err != nil {
11111		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request")
11112		return
11113	}
11114
11115	resp, err := client.GetFunctionsAdminTokenSlotSender(req)
11116	if err != nil {
11117		result.Response = autorest.Response{Response: resp}
11118		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request")
11119		return
11120	}
11121
11122	result, err = client.GetFunctionsAdminTokenSlotResponder(resp)
11123	if err != nil {
11124		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request")
11125		return
11126	}
11127
11128	return
11129}
11130
11131// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request.
11132func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
11133	pathParameters := map[string]interface{}{
11134		"name":              autorest.Encode("path", name),
11135		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11136		"slot":              autorest.Encode("path", slot),
11137		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11138	}
11139
11140	const APIVersion = "2021-01-15"
11141	queryParameters := map[string]interface{}{
11142		"api-version": APIVersion,
11143	}
11144
11145	preparer := autorest.CreatePreparer(
11146		autorest.AsGet(),
11147		autorest.WithBaseURL(client.BaseURI),
11148		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters),
11149		autorest.WithQueryParameters(queryParameters))
11150	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11151}
11152
11153// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the
11154// http.Response Body if it receives an error.
11155func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) {
11156	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11157}
11158
11159// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always
11160// closes the http.Response Body.
11161func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) {
11162	err = autorest.Respond(
11163		resp,
11164		azure.WithErrorUnlessStatusCode(http.StatusOK),
11165		autorest.ByUnmarshallingJSON(&result.Value),
11166		autorest.ByClosing())
11167	result.Response = autorest.Response{Response: resp}
11168	return
11169}
11170
11171// GetHostNameBinding description for Get the named hostname binding for an app (or deployment slot, if specified).
11172// Parameters:
11173// resourceGroupName - name of the resource group to which the resource belongs.
11174// name - name of the app.
11175// hostName - hostname in the hostname binding.
11176func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) {
11177	if tracing.IsEnabled() {
11178		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding")
11179		defer func() {
11180			sc := -1
11181			if result.Response.Response != nil {
11182				sc = result.Response.Response.StatusCode
11183			}
11184			tracing.EndSpan(ctx, sc, err)
11185		}()
11186	}
11187	if err := validation.Validate([]validation.Validation{
11188		{TargetValue: resourceGroupName,
11189			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11190				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11191				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11192		return result, validation.NewError("web.AppsClient", "GetHostNameBinding", err.Error())
11193	}
11194
11195	req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName)
11196	if err != nil {
11197		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request")
11198		return
11199	}
11200
11201	resp, err := client.GetHostNameBindingSender(req)
11202	if err != nil {
11203		result.Response = autorest.Response{Response: resp}
11204		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request")
11205		return
11206	}
11207
11208	result, err = client.GetHostNameBindingResponder(resp)
11209	if err != nil {
11210		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request")
11211		return
11212	}
11213
11214	return
11215}
11216
11217// GetHostNameBindingPreparer prepares the GetHostNameBinding request.
11218func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
11219	pathParameters := map[string]interface{}{
11220		"hostName":          autorest.Encode("path", hostName),
11221		"name":              autorest.Encode("path", name),
11222		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11223		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11224	}
11225
11226	const APIVersion = "2021-01-15"
11227	queryParameters := map[string]interface{}{
11228		"api-version": APIVersion,
11229	}
11230
11231	preparer := autorest.CreatePreparer(
11232		autorest.AsGet(),
11233		autorest.WithBaseURL(client.BaseURI),
11234		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
11235		autorest.WithQueryParameters(queryParameters))
11236	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11237}
11238
11239// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the
11240// http.Response Body if it receives an error.
11241func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) {
11242	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11243}
11244
11245// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always
11246// closes the http.Response Body.
11247func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) {
11248	err = autorest.Respond(
11249		resp,
11250		azure.WithErrorUnlessStatusCode(http.StatusOK),
11251		autorest.ByUnmarshallingJSON(&result),
11252		autorest.ByClosing())
11253	result.Response = autorest.Response{Response: resp}
11254	return
11255}
11256
11257// GetHostNameBindingSlot description for Get the named hostname binding for an app (or deployment slot, if specified).
11258// Parameters:
11259// resourceGroupName - name of the resource group to which the resource belongs.
11260// name - name of the app.
11261// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production
11262// slot.
11263// hostName - hostname in the hostname binding.
11264func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) {
11265	if tracing.IsEnabled() {
11266		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot")
11267		defer func() {
11268			sc := -1
11269			if result.Response.Response != nil {
11270				sc = result.Response.Response.StatusCode
11271			}
11272			tracing.EndSpan(ctx, sc, err)
11273		}()
11274	}
11275	if err := validation.Validate([]validation.Validation{
11276		{TargetValue: resourceGroupName,
11277			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11278				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11279				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11280		return result, validation.NewError("web.AppsClient", "GetHostNameBindingSlot", err.Error())
11281	}
11282
11283	req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
11284	if err != nil {
11285		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request")
11286		return
11287	}
11288
11289	resp, err := client.GetHostNameBindingSlotSender(req)
11290	if err != nil {
11291		result.Response = autorest.Response{Response: resp}
11292		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request")
11293		return
11294	}
11295
11296	result, err = client.GetHostNameBindingSlotResponder(resp)
11297	if err != nil {
11298		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request")
11299		return
11300	}
11301
11302	return
11303}
11304
11305// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request.
11306func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
11307	pathParameters := map[string]interface{}{
11308		"hostName":          autorest.Encode("path", hostName),
11309		"name":              autorest.Encode("path", name),
11310		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11311		"slot":              autorest.Encode("path", slot),
11312		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11313	}
11314
11315	const APIVersion = "2021-01-15"
11316	queryParameters := map[string]interface{}{
11317		"api-version": APIVersion,
11318	}
11319
11320	preparer := autorest.CreatePreparer(
11321		autorest.AsGet(),
11322		autorest.WithBaseURL(client.BaseURI),
11323		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
11324		autorest.WithQueryParameters(queryParameters))
11325	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11326}
11327
11328// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the
11329// http.Response Body if it receives an error.
11330func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
11331	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11332}
11333
11334// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always
11335// closes the http.Response Body.
11336func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) {
11337	err = autorest.Respond(
11338		resp,
11339		azure.WithErrorUnlessStatusCode(http.StatusOK),
11340		autorest.ByUnmarshallingJSON(&result),
11341		autorest.ByClosing())
11342	result.Response = autorest.Response{Response: resp}
11343	return
11344}
11345
11346// GetHybridConnection description for Retrieves a specific Service Bus Hybrid Connection used by this Web App.
11347// Parameters:
11348// resourceGroupName - name of the resource group to which the resource belongs.
11349// name - the name of the web app.
11350// namespaceName - the namespace for this hybrid connection.
11351// relayName - the relay name for this hybrid connection.
11352func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) {
11353	if tracing.IsEnabled() {
11354		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection")
11355		defer func() {
11356			sc := -1
11357			if result.Response.Response != nil {
11358				sc = result.Response.Response.StatusCode
11359			}
11360			tracing.EndSpan(ctx, sc, err)
11361		}()
11362	}
11363	if err := validation.Validate([]validation.Validation{
11364		{TargetValue: resourceGroupName,
11365			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11366				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11367				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11368		return result, validation.NewError("web.AppsClient", "GetHybridConnection", err.Error())
11369	}
11370
11371	req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
11372	if err != nil {
11373		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request")
11374		return
11375	}
11376
11377	resp, err := client.GetHybridConnectionSender(req)
11378	if err != nil {
11379		result.Response = autorest.Response{Response: resp}
11380		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request")
11381		return
11382	}
11383
11384	result, err = client.GetHybridConnectionResponder(resp)
11385	if err != nil {
11386		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request")
11387		return
11388	}
11389
11390	return
11391}
11392
11393// GetHybridConnectionPreparer prepares the GetHybridConnection request.
11394func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
11395	pathParameters := map[string]interface{}{
11396		"name":              autorest.Encode("path", name),
11397		"namespaceName":     autorest.Encode("path", namespaceName),
11398		"relayName":         autorest.Encode("path", relayName),
11399		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11400		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11401	}
11402
11403	const APIVersion = "2021-01-15"
11404	queryParameters := map[string]interface{}{
11405		"api-version": APIVersion,
11406	}
11407
11408	preparer := autorest.CreatePreparer(
11409		autorest.AsGet(),
11410		autorest.WithBaseURL(client.BaseURI),
11411		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
11412		autorest.WithQueryParameters(queryParameters))
11413	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11414}
11415
11416// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the
11417// http.Response Body if it receives an error.
11418func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) {
11419	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11420}
11421
11422// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always
11423// closes the http.Response Body.
11424func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
11425	err = autorest.Respond(
11426		resp,
11427		azure.WithErrorUnlessStatusCode(http.StatusOK),
11428		autorest.ByUnmarshallingJSON(&result),
11429		autorest.ByClosing())
11430	result.Response = autorest.Response{Response: resp}
11431	return
11432}
11433
11434// GetHybridConnectionSlot description for Retrieves a specific Service Bus Hybrid Connection used by this Web App.
11435// Parameters:
11436// resourceGroupName - name of the resource group to which the resource belongs.
11437// name - the name of the web app.
11438// namespaceName - the namespace for this hybrid connection.
11439// relayName - the relay name for this hybrid connection.
11440// slot - the name of the slot for the web app.
11441func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) {
11442	if tracing.IsEnabled() {
11443		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot")
11444		defer func() {
11445			sc := -1
11446			if result.Response.Response != nil {
11447				sc = result.Response.Response.StatusCode
11448			}
11449			tracing.EndSpan(ctx, sc, err)
11450		}()
11451	}
11452	if err := validation.Validate([]validation.Validation{
11453		{TargetValue: resourceGroupName,
11454			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11455				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11456				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11457		return result, validation.NewError("web.AppsClient", "GetHybridConnectionSlot", err.Error())
11458	}
11459
11460	req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
11461	if err != nil {
11462		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request")
11463		return
11464	}
11465
11466	resp, err := client.GetHybridConnectionSlotSender(req)
11467	if err != nil {
11468		result.Response = autorest.Response{Response: resp}
11469		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request")
11470		return
11471	}
11472
11473	result, err = client.GetHybridConnectionSlotResponder(resp)
11474	if err != nil {
11475		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request")
11476		return
11477	}
11478
11479	return
11480}
11481
11482// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request.
11483func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
11484	pathParameters := map[string]interface{}{
11485		"name":              autorest.Encode("path", name),
11486		"namespaceName":     autorest.Encode("path", namespaceName),
11487		"relayName":         autorest.Encode("path", relayName),
11488		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11489		"slot":              autorest.Encode("path", slot),
11490		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11491	}
11492
11493	const APIVersion = "2021-01-15"
11494	queryParameters := map[string]interface{}{
11495		"api-version": APIVersion,
11496	}
11497
11498	preparer := autorest.CreatePreparer(
11499		autorest.AsGet(),
11500		autorest.WithBaseURL(client.BaseURI),
11501		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
11502		autorest.WithQueryParameters(queryParameters))
11503	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11504}
11505
11506// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the
11507// http.Response Body if it receives an error.
11508func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
11509	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11510}
11511
11512// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always
11513// closes the http.Response Body.
11514func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
11515	err = autorest.Respond(
11516		resp,
11517		azure.WithErrorUnlessStatusCode(http.StatusOK),
11518		autorest.ByUnmarshallingJSON(&result),
11519		autorest.ByClosing())
11520	result.Response = autorest.Response{Response: resp}
11521	return
11522}
11523
11524// GetInstanceFunctionSlot description for Get function information by its ID for web site, or a deployment slot.
11525// Parameters:
11526// resourceGroupName - name of the resource group to which the resource belongs.
11527// name - site name.
11528// functionName - function name.
11529// slot - name of the deployment slot.
11530func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) {
11531	if tracing.IsEnabled() {
11532		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot")
11533		defer func() {
11534			sc := -1
11535			if result.Response.Response != nil {
11536				sc = result.Response.Response.StatusCode
11537			}
11538			tracing.EndSpan(ctx, sc, err)
11539		}()
11540	}
11541	if err := validation.Validate([]validation.Validation{
11542		{TargetValue: resourceGroupName,
11543			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11544				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11545				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11546		return result, validation.NewError("web.AppsClient", "GetInstanceFunctionSlot", err.Error())
11547	}
11548
11549	req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
11550	if err != nil {
11551		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request")
11552		return
11553	}
11554
11555	resp, err := client.GetInstanceFunctionSlotSender(req)
11556	if err != nil {
11557		result.Response = autorest.Response{Response: resp}
11558		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request")
11559		return
11560	}
11561
11562	result, err = client.GetInstanceFunctionSlotResponder(resp)
11563	if err != nil {
11564		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request")
11565		return
11566	}
11567
11568	return
11569}
11570
11571// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request.
11572func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
11573	pathParameters := map[string]interface{}{
11574		"functionName":      autorest.Encode("path", functionName),
11575		"name":              autorest.Encode("path", name),
11576		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11577		"slot":              autorest.Encode("path", slot),
11578		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11579	}
11580
11581	const APIVersion = "2021-01-15"
11582	queryParameters := map[string]interface{}{
11583		"api-version": APIVersion,
11584	}
11585
11586	preparer := autorest.CreatePreparer(
11587		autorest.AsGet(),
11588		autorest.WithBaseURL(client.BaseURI),
11589		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
11590		autorest.WithQueryParameters(queryParameters))
11591	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11592}
11593
11594// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the
11595// http.Response Body if it receives an error.
11596func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) {
11597	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11598}
11599
11600// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always
11601// closes the http.Response Body.
11602func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) {
11603	err = autorest.Respond(
11604		resp,
11605		azure.WithErrorUnlessStatusCode(http.StatusOK),
11606		autorest.ByUnmarshallingJSON(&result),
11607		autorest.ByClosing())
11608	result.Response = autorest.Response{Response: resp}
11609	return
11610}
11611
11612// GetInstanceInfo description for Gets all scale-out instances of an app.
11613// Parameters:
11614// resourceGroupName - name of the resource group to which the resource belongs.
11615// name - name of the app.
11616func (client AppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string) (result SiteInstanceStatus, err error) {
11617	if tracing.IsEnabled() {
11618		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfo")
11619		defer func() {
11620			sc := -1
11621			if result.Response.Response != nil {
11622				sc = result.Response.Response.StatusCode
11623			}
11624			tracing.EndSpan(ctx, sc, err)
11625		}()
11626	}
11627	if err := validation.Validate([]validation.Validation{
11628		{TargetValue: resourceGroupName,
11629			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11630				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11631				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11632		return result, validation.NewError("web.AppsClient", "GetInstanceInfo", err.Error())
11633	}
11634
11635	req, err := client.GetInstanceInfoPreparer(ctx, resourceGroupName, name, instanceID)
11636	if err != nil {
11637		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", nil, "Failure preparing request")
11638		return
11639	}
11640
11641	resp, err := client.GetInstanceInfoSender(req)
11642	if err != nil {
11643		result.Response = autorest.Response{Response: resp}
11644		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure sending request")
11645		return
11646	}
11647
11648	result, err = client.GetInstanceInfoResponder(resp)
11649	if err != nil {
11650		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure responding to request")
11651		return
11652	}
11653
11654	return
11655}
11656
11657// GetInstanceInfoPreparer prepares the GetInstanceInfo request.
11658func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
11659	pathParameters := map[string]interface{}{
11660		"instanceId":        autorest.Encode("path", instanceID),
11661		"name":              autorest.Encode("path", name),
11662		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11663		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11664	}
11665
11666	const APIVersion = "2021-01-15"
11667	queryParameters := map[string]interface{}{
11668		"api-version": APIVersion,
11669	}
11670
11671	preparer := autorest.CreatePreparer(
11672		autorest.AsGet(),
11673		autorest.WithBaseURL(client.BaseURI),
11674		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}", pathParameters),
11675		autorest.WithQueryParameters(queryParameters))
11676	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11677}
11678
11679// GetInstanceInfoSender sends the GetInstanceInfo request. The method will close the
11680// http.Response Body if it receives an error.
11681func (client AppsClient) GetInstanceInfoSender(req *http.Request) (*http.Response, error) {
11682	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11683}
11684
11685// GetInstanceInfoResponder handles the response to the GetInstanceInfo request. The method always
11686// closes the http.Response Body.
11687func (client AppsClient) GetInstanceInfoResponder(resp *http.Response) (result SiteInstanceStatus, err error) {
11688	err = autorest.Respond(
11689		resp,
11690		azure.WithErrorUnlessStatusCode(http.StatusOK),
11691		autorest.ByUnmarshallingJSON(&result),
11692		autorest.ByClosing())
11693	result.Response = autorest.Response{Response: resp}
11694	return
11695}
11696
11697// GetInstanceInfoSlot description for Gets all scale-out instances of an app.
11698// Parameters:
11699// resourceGroupName - name of the resource group to which the resource belongs.
11700// name - name of the app.
11701// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances.
11702func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (result SiteInstanceStatus, err error) {
11703	if tracing.IsEnabled() {
11704		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfoSlot")
11705		defer func() {
11706			sc := -1
11707			if result.Response.Response != nil {
11708				sc = result.Response.Response.StatusCode
11709			}
11710			tracing.EndSpan(ctx, sc, err)
11711		}()
11712	}
11713	if err := validation.Validate([]validation.Validation{
11714		{TargetValue: resourceGroupName,
11715			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11716				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11717				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11718		return result, validation.NewError("web.AppsClient", "GetInstanceInfoSlot", err.Error())
11719	}
11720
11721	req, err := client.GetInstanceInfoSlotPreparer(ctx, resourceGroupName, name, instanceID, slot)
11722	if err != nil {
11723		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", nil, "Failure preparing request")
11724		return
11725	}
11726
11727	resp, err := client.GetInstanceInfoSlotSender(req)
11728	if err != nil {
11729		result.Response = autorest.Response{Response: resp}
11730		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure sending request")
11731		return
11732	}
11733
11734	result, err = client.GetInstanceInfoSlotResponder(resp)
11735	if err != nil {
11736		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure responding to request")
11737		return
11738	}
11739
11740	return
11741}
11742
11743// GetInstanceInfoSlotPreparer prepares the GetInstanceInfoSlot request.
11744func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (*http.Request, error) {
11745	pathParameters := map[string]interface{}{
11746		"instanceId":        autorest.Encode("path", instanceID),
11747		"name":              autorest.Encode("path", name),
11748		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11749		"slot":              autorest.Encode("path", slot),
11750		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11751	}
11752
11753	const APIVersion = "2021-01-15"
11754	queryParameters := map[string]interface{}{
11755		"api-version": APIVersion,
11756	}
11757
11758	preparer := autorest.CreatePreparer(
11759		autorest.AsGet(),
11760		autorest.WithBaseURL(client.BaseURI),
11761		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}", pathParameters),
11762		autorest.WithQueryParameters(queryParameters))
11763	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11764}
11765
11766// GetInstanceInfoSlotSender sends the GetInstanceInfoSlot request. The method will close the
11767// http.Response Body if it receives an error.
11768func (client AppsClient) GetInstanceInfoSlotSender(req *http.Request) (*http.Response, error) {
11769	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11770}
11771
11772// GetInstanceInfoSlotResponder handles the response to the GetInstanceInfoSlot request. The method always
11773// closes the http.Response Body.
11774func (client AppsClient) GetInstanceInfoSlotResponder(resp *http.Response) (result SiteInstanceStatus, err error) {
11775	err = autorest.Respond(
11776		resp,
11777		azure.WithErrorUnlessStatusCode(http.StatusOK),
11778		autorest.ByUnmarshallingJSON(&result),
11779		autorest.ByClosing())
11780	result.Response = autorest.Response{Response: resp}
11781	return
11782}
11783
11784// GetInstanceMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation.
11785// Parameters:
11786// resourceGroupName - name of the resource group to which the resource belongs.
11787// name - name of web app.
11788// instanceID - ID of web app instance.
11789func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) {
11790	if tracing.IsEnabled() {
11791		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog")
11792		defer func() {
11793			sc := -1
11794			if result.Response.Response != nil {
11795				sc = result.Response.Response.StatusCode
11796			}
11797			tracing.EndSpan(ctx, sc, err)
11798		}()
11799	}
11800	if err := validation.Validate([]validation.Validation{
11801		{TargetValue: resourceGroupName,
11802			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11803				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11804				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11805		return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLog", err.Error())
11806	}
11807
11808	req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID)
11809	if err != nil {
11810		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request")
11811		return
11812	}
11813
11814	resp, err := client.GetInstanceMSDeployLogSender(req)
11815	if err != nil {
11816		result.Response = autorest.Response{Response: resp}
11817		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request")
11818		return
11819	}
11820
11821	result, err = client.GetInstanceMSDeployLogResponder(resp)
11822	if err != nil {
11823		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request")
11824		return
11825	}
11826
11827	return
11828}
11829
11830// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request.
11831func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
11832	pathParameters := map[string]interface{}{
11833		"instanceId":        autorest.Encode("path", instanceID),
11834		"name":              autorest.Encode("path", name),
11835		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11836		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11837	}
11838
11839	const APIVersion = "2021-01-15"
11840	queryParameters := map[string]interface{}{
11841		"api-version": APIVersion,
11842	}
11843
11844	preparer := autorest.CreatePreparer(
11845		autorest.AsGet(),
11846		autorest.WithBaseURL(client.BaseURI),
11847		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters),
11848		autorest.WithQueryParameters(queryParameters))
11849	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11850}
11851
11852// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the
11853// http.Response Body if it receives an error.
11854func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) {
11855	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11856}
11857
11858// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always
11859// closes the http.Response Body.
11860func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) {
11861	err = autorest.Respond(
11862		resp,
11863		azure.WithErrorUnlessStatusCode(http.StatusOK),
11864		autorest.ByUnmarshallingJSON(&result),
11865		autorest.ByClosing())
11866	result.Response = autorest.Response{Response: resp}
11867	return
11868}
11869
11870// GetInstanceMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation.
11871// Parameters:
11872// resourceGroupName - name of the resource group to which the resource belongs.
11873// name - name of web app.
11874// slot - name of web app slot. If not specified then will default to production slot.
11875// instanceID - ID of web app instance.
11876func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) {
11877	if tracing.IsEnabled() {
11878		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot")
11879		defer func() {
11880			sc := -1
11881			if result.Response.Response != nil {
11882				sc = result.Response.Response.StatusCode
11883			}
11884			tracing.EndSpan(ctx, sc, err)
11885		}()
11886	}
11887	if err := validation.Validate([]validation.Validation{
11888		{TargetValue: resourceGroupName,
11889			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11890				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11891				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11892		return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLogSlot", err.Error())
11893	}
11894
11895	req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
11896	if err != nil {
11897		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request")
11898		return
11899	}
11900
11901	resp, err := client.GetInstanceMSDeployLogSlotSender(req)
11902	if err != nil {
11903		result.Response = autorest.Response{Response: resp}
11904		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request")
11905		return
11906	}
11907
11908	result, err = client.GetInstanceMSDeployLogSlotResponder(resp)
11909	if err != nil {
11910		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request")
11911		return
11912	}
11913
11914	return
11915}
11916
11917// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request.
11918func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
11919	pathParameters := map[string]interface{}{
11920		"instanceId":        autorest.Encode("path", instanceID),
11921		"name":              autorest.Encode("path", name),
11922		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11923		"slot":              autorest.Encode("path", slot),
11924		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11925	}
11926
11927	const APIVersion = "2021-01-15"
11928	queryParameters := map[string]interface{}{
11929		"api-version": APIVersion,
11930	}
11931
11932	preparer := autorest.CreatePreparer(
11933		autorest.AsGet(),
11934		autorest.WithBaseURL(client.BaseURI),
11935		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters),
11936		autorest.WithQueryParameters(queryParameters))
11937	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11938}
11939
11940// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the
11941// http.Response Body if it receives an error.
11942func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) {
11943	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11944}
11945
11946// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always
11947// closes the http.Response Body.
11948func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) {
11949	err = autorest.Respond(
11950		resp,
11951		azure.WithErrorUnlessStatusCode(http.StatusOK),
11952		autorest.ByUnmarshallingJSON(&result),
11953		autorest.ByClosing())
11954	result.Response = autorest.Response{Response: resp}
11955	return
11956}
11957
11958// GetInstanceMsDeployStatus description for Get the status of the last MSDeploy operation.
11959// Parameters:
11960// resourceGroupName - name of the resource group to which the resource belongs.
11961// name - name of web app.
11962// instanceID - ID of web app instance.
11963func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) {
11964	if tracing.IsEnabled() {
11965		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus")
11966		defer func() {
11967			sc := -1
11968			if result.Response.Response != nil {
11969				sc = result.Response.Response.StatusCode
11970			}
11971			tracing.EndSpan(ctx, sc, err)
11972		}()
11973	}
11974	if err := validation.Validate([]validation.Validation{
11975		{TargetValue: resourceGroupName,
11976			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11977				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11978				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11979		return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatus", err.Error())
11980	}
11981
11982	req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID)
11983	if err != nil {
11984		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request")
11985		return
11986	}
11987
11988	resp, err := client.GetInstanceMsDeployStatusSender(req)
11989	if err != nil {
11990		result.Response = autorest.Response{Response: resp}
11991		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request")
11992		return
11993	}
11994
11995	result, err = client.GetInstanceMsDeployStatusResponder(resp)
11996	if err != nil {
11997		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request")
11998		return
11999	}
12000
12001	return
12002}
12003
12004// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request.
12005func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
12006	pathParameters := map[string]interface{}{
12007		"instanceId":        autorest.Encode("path", instanceID),
12008		"name":              autorest.Encode("path", name),
12009		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12010		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12011	}
12012
12013	const APIVersion = "2021-01-15"
12014	queryParameters := map[string]interface{}{
12015		"api-version": APIVersion,
12016	}
12017
12018	preparer := autorest.CreatePreparer(
12019		autorest.AsGet(),
12020		autorest.WithBaseURL(client.BaseURI),
12021		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
12022		autorest.WithQueryParameters(queryParameters))
12023	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12024}
12025
12026// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the
12027// http.Response Body if it receives an error.
12028func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) {
12029	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12030}
12031
12032// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always
12033// closes the http.Response Body.
12034func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) {
12035	err = autorest.Respond(
12036		resp,
12037		azure.WithErrorUnlessStatusCode(http.StatusOK),
12038		autorest.ByUnmarshallingJSON(&result),
12039		autorest.ByClosing())
12040	result.Response = autorest.Response{Response: resp}
12041	return
12042}
12043
12044// GetInstanceMsDeployStatusSlot description for Get the status of the last MSDeploy operation.
12045// Parameters:
12046// resourceGroupName - name of the resource group to which the resource belongs.
12047// name - name of web app.
12048// slot - name of web app slot. If not specified then will default to production slot.
12049// instanceID - ID of web app instance.
12050func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) {
12051	if tracing.IsEnabled() {
12052		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot")
12053		defer func() {
12054			sc := -1
12055			if result.Response.Response != nil {
12056				sc = result.Response.Response.StatusCode
12057			}
12058			tracing.EndSpan(ctx, sc, err)
12059		}()
12060	}
12061	if err := validation.Validate([]validation.Validation{
12062		{TargetValue: resourceGroupName,
12063			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12064				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12065				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12066		return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error())
12067	}
12068
12069	req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
12070	if err != nil {
12071		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request")
12072		return
12073	}
12074
12075	resp, err := client.GetInstanceMsDeployStatusSlotSender(req)
12076	if err != nil {
12077		result.Response = autorest.Response{Response: resp}
12078		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request")
12079		return
12080	}
12081
12082	result, err = client.GetInstanceMsDeployStatusSlotResponder(resp)
12083	if err != nil {
12084		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request")
12085		return
12086	}
12087
12088	return
12089}
12090
12091// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request.
12092func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
12093	pathParameters := map[string]interface{}{
12094		"instanceId":        autorest.Encode("path", instanceID),
12095		"name":              autorest.Encode("path", name),
12096		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12097		"slot":              autorest.Encode("path", slot),
12098		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12099	}
12100
12101	const APIVersion = "2021-01-15"
12102	queryParameters := map[string]interface{}{
12103		"api-version": APIVersion,
12104	}
12105
12106	preparer := autorest.CreatePreparer(
12107		autorest.AsGet(),
12108		autorest.WithBaseURL(client.BaseURI),
12109		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
12110		autorest.WithQueryParameters(queryParameters))
12111	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12112}
12113
12114// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the
12115// http.Response Body if it receives an error.
12116func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) {
12117	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12118}
12119
12120// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always
12121// closes the http.Response Body.
12122func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
12123	err = autorest.Respond(
12124		resp,
12125		azure.WithErrorUnlessStatusCode(http.StatusOK),
12126		autorest.ByUnmarshallingJSON(&result),
12127		autorest.ByClosing())
12128	result.Response = autorest.Response{Response: resp}
12129	return
12130}
12131
12132// GetInstanceProcess description for Get process information by its ID for a specific scaled-out instance in a web
12133// site.
12134// Parameters:
12135// resourceGroupName - name of the resource group to which the resource belongs.
12136// name - site name.
12137// processID - pID.
12138// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12139// response from "GET api/sites/{siteName}/instances".
12140func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) {
12141	if tracing.IsEnabled() {
12142		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess")
12143		defer func() {
12144			sc := -1
12145			if result.Response.Response != nil {
12146				sc = result.Response.Response.StatusCode
12147			}
12148			tracing.EndSpan(ctx, sc, err)
12149		}()
12150	}
12151	if err := validation.Validate([]validation.Validation{
12152		{TargetValue: resourceGroupName,
12153			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12154				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12155				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12156		return result, validation.NewError("web.AppsClient", "GetInstanceProcess", err.Error())
12157	}
12158
12159	req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID)
12160	if err != nil {
12161		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request")
12162		return
12163	}
12164
12165	resp, err := client.GetInstanceProcessSender(req)
12166	if err != nil {
12167		result.Response = autorest.Response{Response: resp}
12168		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request")
12169		return
12170	}
12171
12172	result, err = client.GetInstanceProcessResponder(resp)
12173	if err != nil {
12174		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request")
12175		return
12176	}
12177
12178	return
12179}
12180
12181// GetInstanceProcessPreparer prepares the GetInstanceProcess request.
12182func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
12183	pathParameters := map[string]interface{}{
12184		"instanceId":        autorest.Encode("path", instanceID),
12185		"name":              autorest.Encode("path", name),
12186		"processId":         autorest.Encode("path", processID),
12187		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12188		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12189	}
12190
12191	const APIVersion = "2021-01-15"
12192	queryParameters := map[string]interface{}{
12193		"api-version": APIVersion,
12194	}
12195
12196	preparer := autorest.CreatePreparer(
12197		autorest.AsGet(),
12198		autorest.WithBaseURL(client.BaseURI),
12199		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters),
12200		autorest.WithQueryParameters(queryParameters))
12201	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12202}
12203
12204// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the
12205// http.Response Body if it receives an error.
12206func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) {
12207	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12208}
12209
12210// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always
12211// closes the http.Response Body.
12212func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) {
12213	err = autorest.Respond(
12214		resp,
12215		azure.WithErrorUnlessStatusCode(http.StatusOK),
12216		autorest.ByUnmarshallingJSON(&result),
12217		autorest.ByClosing())
12218	result.Response = autorest.Response{Response: resp}
12219	return
12220}
12221
12222// GetInstanceProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance
12223// in a web site.
12224// Parameters:
12225// resourceGroupName - name of the resource group to which the resource belongs.
12226// name - site name.
12227// processID - pID.
12228// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12229// response from "GET api/sites/{siteName}/instances".
12230func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) {
12231	if tracing.IsEnabled() {
12232		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump")
12233		defer func() {
12234			sc := -1
12235			if result.Response.Response != nil {
12236				sc = result.Response.Response.StatusCode
12237			}
12238			tracing.EndSpan(ctx, sc, err)
12239		}()
12240	}
12241	if err := validation.Validate([]validation.Validation{
12242		{TargetValue: resourceGroupName,
12243			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12244				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12245				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12246		return result, validation.NewError("web.AppsClient", "GetInstanceProcessDump", err.Error())
12247	}
12248
12249	req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID)
12250	if err != nil {
12251		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request")
12252		return
12253	}
12254
12255	resp, err := client.GetInstanceProcessDumpSender(req)
12256	if err != nil {
12257		result.Response = autorest.Response{Response: resp}
12258		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request")
12259		return
12260	}
12261
12262	result, err = client.GetInstanceProcessDumpResponder(resp)
12263	if err != nil {
12264		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request")
12265		return
12266	}
12267
12268	return
12269}
12270
12271// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request.
12272func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
12273	pathParameters := map[string]interface{}{
12274		"instanceId":        autorest.Encode("path", instanceID),
12275		"name":              autorest.Encode("path", name),
12276		"processId":         autorest.Encode("path", processID),
12277		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12278		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12279	}
12280
12281	const APIVersion = "2021-01-15"
12282	queryParameters := map[string]interface{}{
12283		"api-version": APIVersion,
12284	}
12285
12286	preparer := autorest.CreatePreparer(
12287		autorest.AsGet(),
12288		autorest.WithBaseURL(client.BaseURI),
12289		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters),
12290		autorest.WithQueryParameters(queryParameters))
12291	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12292}
12293
12294// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the
12295// http.Response Body if it receives an error.
12296func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) {
12297	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12298}
12299
12300// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always
12301// closes the http.Response Body.
12302func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) {
12303	result.Value = &resp.Body
12304	err = autorest.Respond(
12305		resp,
12306		azure.WithErrorUnlessStatusCode(http.StatusOK))
12307	result.Response = autorest.Response{Response: resp}
12308	return
12309}
12310
12311// GetInstanceProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out
12312// instance in a web site.
12313// Parameters:
12314// resourceGroupName - name of the resource group to which the resource belongs.
12315// name - site name.
12316// processID - pID.
12317// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
12318// production slot.
12319// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12320// response from "GET api/sites/{siteName}/instances".
12321func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) {
12322	if tracing.IsEnabled() {
12323		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot")
12324		defer func() {
12325			sc := -1
12326			if result.Response.Response != nil {
12327				sc = result.Response.Response.StatusCode
12328			}
12329			tracing.EndSpan(ctx, sc, err)
12330		}()
12331	}
12332	if err := validation.Validate([]validation.Validation{
12333		{TargetValue: resourceGroupName,
12334			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12335				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12336				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12337		return result, validation.NewError("web.AppsClient", "GetInstanceProcessDumpSlot", err.Error())
12338	}
12339
12340	req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
12341	if err != nil {
12342		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request")
12343		return
12344	}
12345
12346	resp, err := client.GetInstanceProcessDumpSlotSender(req)
12347	if err != nil {
12348		result.Response = autorest.Response{Response: resp}
12349		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request")
12350		return
12351	}
12352
12353	result, err = client.GetInstanceProcessDumpSlotResponder(resp)
12354	if err != nil {
12355		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request")
12356		return
12357	}
12358
12359	return
12360}
12361
12362// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request.
12363func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
12364	pathParameters := map[string]interface{}{
12365		"instanceId":        autorest.Encode("path", instanceID),
12366		"name":              autorest.Encode("path", name),
12367		"processId":         autorest.Encode("path", processID),
12368		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12369		"slot":              autorest.Encode("path", slot),
12370		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12371	}
12372
12373	const APIVersion = "2021-01-15"
12374	queryParameters := map[string]interface{}{
12375		"api-version": APIVersion,
12376	}
12377
12378	preparer := autorest.CreatePreparer(
12379		autorest.AsGet(),
12380		autorest.WithBaseURL(client.BaseURI),
12381		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters),
12382		autorest.WithQueryParameters(queryParameters))
12383	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12384}
12385
12386// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the
12387// http.Response Body if it receives an error.
12388func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) {
12389	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12390}
12391
12392// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always
12393// closes the http.Response Body.
12394func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) {
12395	result.Value = &resp.Body
12396	err = autorest.Respond(
12397		resp,
12398		azure.WithErrorUnlessStatusCode(http.StatusOK))
12399	result.Response = autorest.Response{Response: resp}
12400	return
12401}
12402
12403// GetInstanceProcessModule description for Get process information by its ID for a specific scaled-out instance in a
12404// web site.
12405// Parameters:
12406// resourceGroupName - name of the resource group to which the resource belongs.
12407// name - site name.
12408// processID - pID.
12409// baseAddress - module base address.
12410// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12411// response from "GET api/sites/{siteName}/instances".
12412func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) {
12413	if tracing.IsEnabled() {
12414		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule")
12415		defer func() {
12416			sc := -1
12417			if result.Response.Response != nil {
12418				sc = result.Response.Response.StatusCode
12419			}
12420			tracing.EndSpan(ctx, sc, err)
12421		}()
12422	}
12423	if err := validation.Validate([]validation.Validation{
12424		{TargetValue: resourceGroupName,
12425			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12426				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12427				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12428		return result, validation.NewError("web.AppsClient", "GetInstanceProcessModule", err.Error())
12429	}
12430
12431	req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID)
12432	if err != nil {
12433		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request")
12434		return
12435	}
12436
12437	resp, err := client.GetInstanceProcessModuleSender(req)
12438	if err != nil {
12439		result.Response = autorest.Response{Response: resp}
12440		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request")
12441		return
12442	}
12443
12444	result, err = client.GetInstanceProcessModuleResponder(resp)
12445	if err != nil {
12446		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request")
12447		return
12448	}
12449
12450	return
12451}
12452
12453// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request.
12454func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) {
12455	pathParameters := map[string]interface{}{
12456		"baseAddress":       autorest.Encode("path", baseAddress),
12457		"instanceId":        autorest.Encode("path", instanceID),
12458		"name":              autorest.Encode("path", name),
12459		"processId":         autorest.Encode("path", processID),
12460		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12461		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12462	}
12463
12464	const APIVersion = "2021-01-15"
12465	queryParameters := map[string]interface{}{
12466		"api-version": APIVersion,
12467	}
12468
12469	preparer := autorest.CreatePreparer(
12470		autorest.AsGet(),
12471		autorest.WithBaseURL(client.BaseURI),
12472		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters),
12473		autorest.WithQueryParameters(queryParameters))
12474	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12475}
12476
12477// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the
12478// http.Response Body if it receives an error.
12479func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) {
12480	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12481}
12482
12483// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always
12484// closes the http.Response Body.
12485func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
12486	err = autorest.Respond(
12487		resp,
12488		azure.WithErrorUnlessStatusCode(http.StatusOK),
12489		autorest.ByUnmarshallingJSON(&result),
12490		autorest.ByClosing())
12491	result.Response = autorest.Response{Response: resp}
12492	return
12493}
12494
12495// GetInstanceProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in
12496// a web site.
12497// Parameters:
12498// resourceGroupName - name of the resource group to which the resource belongs.
12499// name - site name.
12500// processID - pID.
12501// baseAddress - module base address.
12502// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
12503// production slot.
12504// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12505// response from "GET api/sites/{siteName}/instances".
12506func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) {
12507	if tracing.IsEnabled() {
12508		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot")
12509		defer func() {
12510			sc := -1
12511			if result.Response.Response != nil {
12512				sc = result.Response.Response.StatusCode
12513			}
12514			tracing.EndSpan(ctx, sc, err)
12515		}()
12516	}
12517	if err := validation.Validate([]validation.Validation{
12518		{TargetValue: resourceGroupName,
12519			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12520				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12521				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12522		return result, validation.NewError("web.AppsClient", "GetInstanceProcessModuleSlot", err.Error())
12523	}
12524
12525	req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID)
12526	if err != nil {
12527		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request")
12528		return
12529	}
12530
12531	resp, err := client.GetInstanceProcessModuleSlotSender(req)
12532	if err != nil {
12533		result.Response = autorest.Response{Response: resp}
12534		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request")
12535		return
12536	}
12537
12538	result, err = client.GetInstanceProcessModuleSlotResponder(resp)
12539	if err != nil {
12540		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request")
12541		return
12542	}
12543
12544	return
12545}
12546
12547// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request.
12548func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) {
12549	pathParameters := map[string]interface{}{
12550		"baseAddress":       autorest.Encode("path", baseAddress),
12551		"instanceId":        autorest.Encode("path", instanceID),
12552		"name":              autorest.Encode("path", name),
12553		"processId":         autorest.Encode("path", processID),
12554		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12555		"slot":              autorest.Encode("path", slot),
12556		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12557	}
12558
12559	const APIVersion = "2021-01-15"
12560	queryParameters := map[string]interface{}{
12561		"api-version": APIVersion,
12562	}
12563
12564	preparer := autorest.CreatePreparer(
12565		autorest.AsGet(),
12566		autorest.WithBaseURL(client.BaseURI),
12567		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters),
12568		autorest.WithQueryParameters(queryParameters))
12569	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12570}
12571
12572// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the
12573// http.Response Body if it receives an error.
12574func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) {
12575	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12576}
12577
12578// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always
12579// closes the http.Response Body.
12580func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
12581	err = autorest.Respond(
12582		resp,
12583		azure.WithErrorUnlessStatusCode(http.StatusOK),
12584		autorest.ByUnmarshallingJSON(&result),
12585		autorest.ByClosing())
12586	result.Response = autorest.Response{Response: resp}
12587	return
12588}
12589
12590// GetInstanceProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web
12591// site.
12592// Parameters:
12593// resourceGroupName - name of the resource group to which the resource belongs.
12594// name - site name.
12595// processID - pID.
12596// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
12597// production slot.
12598// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12599// response from "GET api/sites/{siteName}/instances".
12600func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) {
12601	if tracing.IsEnabled() {
12602		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot")
12603		defer func() {
12604			sc := -1
12605			if result.Response.Response != nil {
12606				sc = result.Response.Response.StatusCode
12607			}
12608			tracing.EndSpan(ctx, sc, err)
12609		}()
12610	}
12611	if err := validation.Validate([]validation.Validation{
12612		{TargetValue: resourceGroupName,
12613			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12614				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12615				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12616		return result, validation.NewError("web.AppsClient", "GetInstanceProcessSlot", err.Error())
12617	}
12618
12619	req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
12620	if err != nil {
12621		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request")
12622		return
12623	}
12624
12625	resp, err := client.GetInstanceProcessSlotSender(req)
12626	if err != nil {
12627		result.Response = autorest.Response{Response: resp}
12628		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request")
12629		return
12630	}
12631
12632	result, err = client.GetInstanceProcessSlotResponder(resp)
12633	if err != nil {
12634		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request")
12635		return
12636	}
12637
12638	return
12639}
12640
12641// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request.
12642func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
12643	pathParameters := map[string]interface{}{
12644		"instanceId":        autorest.Encode("path", instanceID),
12645		"name":              autorest.Encode("path", name),
12646		"processId":         autorest.Encode("path", processID),
12647		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12648		"slot":              autorest.Encode("path", slot),
12649		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12650	}
12651
12652	const APIVersion = "2021-01-15"
12653	queryParameters := map[string]interface{}{
12654		"api-version": APIVersion,
12655	}
12656
12657	preparer := autorest.CreatePreparer(
12658		autorest.AsGet(),
12659		autorest.WithBaseURL(client.BaseURI),
12660		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters),
12661		autorest.WithQueryParameters(queryParameters))
12662	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12663}
12664
12665// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the
12666// http.Response Body if it receives an error.
12667func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) {
12668	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12669}
12670
12671// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always
12672// closes the http.Response Body.
12673func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) {
12674	err = autorest.Respond(
12675		resp,
12676		azure.WithErrorUnlessStatusCode(http.StatusOK),
12677		autorest.ByUnmarshallingJSON(&result),
12678		autorest.ByClosing())
12679	result.Response = autorest.Response{Response: resp}
12680	return
12681}
12682
12683// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or
12684// not MySql in app is enabled
12685// Parameters:
12686// resourceGroupName - name of the resource group to which the resource belongs.
12687// name - name of web app.
12688func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) {
12689	if tracing.IsEnabled() {
12690		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus")
12691		defer func() {
12692			sc := -1
12693			if result.Response.Response != nil {
12694				sc = result.Response.Response.StatusCode
12695			}
12696			tracing.EndSpan(ctx, sc, err)
12697		}()
12698	}
12699	if err := validation.Validate([]validation.Validation{
12700		{TargetValue: resourceGroupName,
12701			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12702				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12703				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12704		return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error())
12705	}
12706
12707	req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name)
12708	if err != nil {
12709		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request")
12710		return
12711	}
12712
12713	resp, err := client.GetMigrateMySQLStatusSender(req)
12714	if err != nil {
12715		result.Response = autorest.Response{Response: resp}
12716		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request")
12717		return
12718	}
12719
12720	result, err = client.GetMigrateMySQLStatusResponder(resp)
12721	if err != nil {
12722		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request")
12723		return
12724	}
12725
12726	return
12727}
12728
12729// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request.
12730func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
12731	pathParameters := map[string]interface{}{
12732		"name":              autorest.Encode("path", name),
12733		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12734		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12735	}
12736
12737	const APIVersion = "2021-01-15"
12738	queryParameters := map[string]interface{}{
12739		"api-version": APIVersion,
12740	}
12741
12742	preparer := autorest.CreatePreparer(
12743		autorest.AsGet(),
12744		autorest.WithBaseURL(client.BaseURI),
12745		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters),
12746		autorest.WithQueryParameters(queryParameters))
12747	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12748}
12749
12750// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the
12751// http.Response Body if it receives an error.
12752func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) {
12753	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12754}
12755
12756// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always
12757// closes the http.Response Body.
12758func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) {
12759	err = autorest.Respond(
12760		resp,
12761		azure.WithErrorUnlessStatusCode(http.StatusOK),
12762		autorest.ByUnmarshallingJSON(&result),
12763		autorest.ByClosing())
12764	result.Response = autorest.Response{Response: resp}
12765	return
12766}
12767
12768// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and
12769// whether or not MySql in app is enabled
12770// Parameters:
12771// resourceGroupName - name of the resource group to which the resource belongs.
12772// name - name of web app.
12773// slot - name of the deployment slot.
12774func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) {
12775	if tracing.IsEnabled() {
12776		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot")
12777		defer func() {
12778			sc := -1
12779			if result.Response.Response != nil {
12780				sc = result.Response.Response.StatusCode
12781			}
12782			tracing.EndSpan(ctx, sc, err)
12783		}()
12784	}
12785	if err := validation.Validate([]validation.Validation{
12786		{TargetValue: resourceGroupName,
12787			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12788				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12789				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12790		return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error())
12791	}
12792
12793	req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot)
12794	if err != nil {
12795		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request")
12796		return
12797	}
12798
12799	resp, err := client.GetMigrateMySQLStatusSlotSender(req)
12800	if err != nil {
12801		result.Response = autorest.Response{Response: resp}
12802		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request")
12803		return
12804	}
12805
12806	result, err = client.GetMigrateMySQLStatusSlotResponder(resp)
12807	if err != nil {
12808		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request")
12809		return
12810	}
12811
12812	return
12813}
12814
12815// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request.
12816func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
12817	pathParameters := map[string]interface{}{
12818		"name":              autorest.Encode("path", name),
12819		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12820		"slot":              autorest.Encode("path", slot),
12821		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12822	}
12823
12824	const APIVersion = "2021-01-15"
12825	queryParameters := map[string]interface{}{
12826		"api-version": APIVersion,
12827	}
12828
12829	preparer := autorest.CreatePreparer(
12830		autorest.AsGet(),
12831		autorest.WithBaseURL(client.BaseURI),
12832		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters),
12833		autorest.WithQueryParameters(queryParameters))
12834	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12835}
12836
12837// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the
12838// http.Response Body if it receives an error.
12839func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) {
12840	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12841}
12842
12843// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always
12844// closes the http.Response Body.
12845func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) {
12846	err = autorest.Respond(
12847		resp,
12848		azure.WithErrorUnlessStatusCode(http.StatusOK),
12849		autorest.ByUnmarshallingJSON(&result),
12850		autorest.ByClosing())
12851	result.Response = autorest.Response{Response: resp}
12852	return
12853}
12854
12855// GetMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation.
12856// Parameters:
12857// resourceGroupName - name of the resource group to which the resource belongs.
12858// name - name of web app.
12859func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) {
12860	if tracing.IsEnabled() {
12861		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog")
12862		defer func() {
12863			sc := -1
12864			if result.Response.Response != nil {
12865				sc = result.Response.Response.StatusCode
12866			}
12867			tracing.EndSpan(ctx, sc, err)
12868		}()
12869	}
12870	if err := validation.Validate([]validation.Validation{
12871		{TargetValue: resourceGroupName,
12872			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12873				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12874				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12875		return result, validation.NewError("web.AppsClient", "GetMSDeployLog", err.Error())
12876	}
12877
12878	req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name)
12879	if err != nil {
12880		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request")
12881		return
12882	}
12883
12884	resp, err := client.GetMSDeployLogSender(req)
12885	if err != nil {
12886		result.Response = autorest.Response{Response: resp}
12887		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request")
12888		return
12889	}
12890
12891	result, err = client.GetMSDeployLogResponder(resp)
12892	if err != nil {
12893		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request")
12894		return
12895	}
12896
12897	return
12898}
12899
12900// GetMSDeployLogPreparer prepares the GetMSDeployLog request.
12901func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
12902	pathParameters := map[string]interface{}{
12903		"name":              autorest.Encode("path", name),
12904		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12905		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12906	}
12907
12908	const APIVersion = "2021-01-15"
12909	queryParameters := map[string]interface{}{
12910		"api-version": APIVersion,
12911	}
12912
12913	preparer := autorest.CreatePreparer(
12914		autorest.AsGet(),
12915		autorest.WithBaseURL(client.BaseURI),
12916		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters),
12917		autorest.WithQueryParameters(queryParameters))
12918	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12919}
12920
12921// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the
12922// http.Response Body if it receives an error.
12923func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) {
12924	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12925}
12926
12927// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always
12928// closes the http.Response Body.
12929func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) {
12930	err = autorest.Respond(
12931		resp,
12932		azure.WithErrorUnlessStatusCode(http.StatusOK),
12933		autorest.ByUnmarshallingJSON(&result),
12934		autorest.ByClosing())
12935	result.Response = autorest.Response{Response: resp}
12936	return
12937}
12938
12939// GetMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation.
12940// Parameters:
12941// resourceGroupName - name of the resource group to which the resource belongs.
12942// name - name of web app.
12943// slot - name of web app slot. If not specified then will default to production slot.
12944func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) {
12945	if tracing.IsEnabled() {
12946		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot")
12947		defer func() {
12948			sc := -1
12949			if result.Response.Response != nil {
12950				sc = result.Response.Response.StatusCode
12951			}
12952			tracing.EndSpan(ctx, sc, err)
12953		}()
12954	}
12955	if err := validation.Validate([]validation.Validation{
12956		{TargetValue: resourceGroupName,
12957			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12958				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12959				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12960		return result, validation.NewError("web.AppsClient", "GetMSDeployLogSlot", err.Error())
12961	}
12962
12963	req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot)
12964	if err != nil {
12965		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request")
12966		return
12967	}
12968
12969	resp, err := client.GetMSDeployLogSlotSender(req)
12970	if err != nil {
12971		result.Response = autorest.Response{Response: resp}
12972		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request")
12973		return
12974	}
12975
12976	result, err = client.GetMSDeployLogSlotResponder(resp)
12977	if err != nil {
12978		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request")
12979		return
12980	}
12981
12982	return
12983}
12984
12985// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request.
12986func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
12987	pathParameters := map[string]interface{}{
12988		"name":              autorest.Encode("path", name),
12989		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12990		"slot":              autorest.Encode("path", slot),
12991		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12992	}
12993
12994	const APIVersion = "2021-01-15"
12995	queryParameters := map[string]interface{}{
12996		"api-version": APIVersion,
12997	}
12998
12999	preparer := autorest.CreatePreparer(
13000		autorest.AsGet(),
13001		autorest.WithBaseURL(client.BaseURI),
13002		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters),
13003		autorest.WithQueryParameters(queryParameters))
13004	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13005}
13006
13007// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the
13008// http.Response Body if it receives an error.
13009func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) {
13010	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13011}
13012
13013// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always
13014// closes the http.Response Body.
13015func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) {
13016	err = autorest.Respond(
13017		resp,
13018		azure.WithErrorUnlessStatusCode(http.StatusOK),
13019		autorest.ByUnmarshallingJSON(&result),
13020		autorest.ByClosing())
13021	result.Response = autorest.Response{Response: resp}
13022	return
13023}
13024
13025// GetMSDeployStatus description for Get the status of the last MSDeploy operation.
13026// Parameters:
13027// resourceGroupName - name of the resource group to which the resource belongs.
13028// name - name of web app.
13029func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) {
13030	if tracing.IsEnabled() {
13031		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus")
13032		defer func() {
13033			sc := -1
13034			if result.Response.Response != nil {
13035				sc = result.Response.Response.StatusCode
13036			}
13037			tracing.EndSpan(ctx, sc, err)
13038		}()
13039	}
13040	if err := validation.Validate([]validation.Validation{
13041		{TargetValue: resourceGroupName,
13042			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13043				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13044				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13045		return result, validation.NewError("web.AppsClient", "GetMSDeployStatus", err.Error())
13046	}
13047
13048	req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name)
13049	if err != nil {
13050		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request")
13051		return
13052	}
13053
13054	resp, err := client.GetMSDeployStatusSender(req)
13055	if err != nil {
13056		result.Response = autorest.Response{Response: resp}
13057		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request")
13058		return
13059	}
13060
13061	result, err = client.GetMSDeployStatusResponder(resp)
13062	if err != nil {
13063		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request")
13064		return
13065	}
13066
13067	return
13068}
13069
13070// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request.
13071func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
13072	pathParameters := map[string]interface{}{
13073		"name":              autorest.Encode("path", name),
13074		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13075		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13076	}
13077
13078	const APIVersion = "2021-01-15"
13079	queryParameters := map[string]interface{}{
13080		"api-version": APIVersion,
13081	}
13082
13083	preparer := autorest.CreatePreparer(
13084		autorest.AsGet(),
13085		autorest.WithBaseURL(client.BaseURI),
13086		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters),
13087		autorest.WithQueryParameters(queryParameters))
13088	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13089}
13090
13091// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the
13092// http.Response Body if it receives an error.
13093func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) {
13094	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13095}
13096
13097// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always
13098// closes the http.Response Body.
13099func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) {
13100	err = autorest.Respond(
13101		resp,
13102		azure.WithErrorUnlessStatusCode(http.StatusOK),
13103		autorest.ByUnmarshallingJSON(&result),
13104		autorest.ByClosing())
13105	result.Response = autorest.Response{Response: resp}
13106	return
13107}
13108
13109// GetMSDeployStatusSlot description for Get the status of the last MSDeploy operation.
13110// Parameters:
13111// resourceGroupName - name of the resource group to which the resource belongs.
13112// name - name of web app.
13113// slot - name of web app slot. If not specified then will default to production slot.
13114func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) {
13115	if tracing.IsEnabled() {
13116		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot")
13117		defer func() {
13118			sc := -1
13119			if result.Response.Response != nil {
13120				sc = result.Response.Response.StatusCode
13121			}
13122			tracing.EndSpan(ctx, sc, err)
13123		}()
13124	}
13125	if err := validation.Validate([]validation.Validation{
13126		{TargetValue: resourceGroupName,
13127			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13128				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13129				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13130		return result, validation.NewError("web.AppsClient", "GetMSDeployStatusSlot", err.Error())
13131	}
13132
13133	req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot)
13134	if err != nil {
13135		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request")
13136		return
13137	}
13138
13139	resp, err := client.GetMSDeployStatusSlotSender(req)
13140	if err != nil {
13141		result.Response = autorest.Response{Response: resp}
13142		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request")
13143		return
13144	}
13145
13146	result, err = client.GetMSDeployStatusSlotResponder(resp)
13147	if err != nil {
13148		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request")
13149		return
13150	}
13151
13152	return
13153}
13154
13155// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request.
13156func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
13157	pathParameters := map[string]interface{}{
13158		"name":              autorest.Encode("path", name),
13159		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13160		"slot":              autorest.Encode("path", slot),
13161		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13162	}
13163
13164	const APIVersion = "2021-01-15"
13165	queryParameters := map[string]interface{}{
13166		"api-version": APIVersion,
13167	}
13168
13169	preparer := autorest.CreatePreparer(
13170		autorest.AsGet(),
13171		autorest.WithBaseURL(client.BaseURI),
13172		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters),
13173		autorest.WithQueryParameters(queryParameters))
13174	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13175}
13176
13177// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the
13178// http.Response Body if it receives an error.
13179func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) {
13180	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13181}
13182
13183// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always
13184// closes the http.Response Body.
13185func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
13186	err = autorest.Respond(
13187		resp,
13188		azure.WithErrorUnlessStatusCode(http.StatusOK),
13189		autorest.ByUnmarshallingJSON(&result),
13190		autorest.ByClosing())
13191	result.Response = autorest.Response{Response: resp}
13192	return
13193}
13194
13195// GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot,
13196// if specified).
13197// Parameters:
13198// resourceGroupName - name of the resource group to which the resource belongs.
13199// name - name of the app.
13200// operationID - GUID of the operation.
13201func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13202	if tracing.IsEnabled() {
13203		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation")
13204		defer func() {
13205			sc := -1
13206			if result.Response.Response != nil {
13207				sc = result.Response.Response.StatusCode
13208			}
13209			tracing.EndSpan(ctx, sc, err)
13210		}()
13211	}
13212	if err := validation.Validate([]validation.Validation{
13213		{TargetValue: resourceGroupName,
13214			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13215				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13216				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13217		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperation", err.Error())
13218	}
13219
13220	req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID)
13221	if err != nil {
13222		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request")
13223		return
13224	}
13225
13226	resp, err := client.GetNetworkTraceOperationSender(req)
13227	if err != nil {
13228		result.Response = autorest.Response{Response: resp}
13229		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request")
13230		return
13231	}
13232
13233	result, err = client.GetNetworkTraceOperationResponder(resp)
13234	if err != nil {
13235		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request")
13236		return
13237	}
13238
13239	return
13240}
13241
13242// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request.
13243func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13244	pathParameters := map[string]interface{}{
13245		"name":              autorest.Encode("path", name),
13246		"operationId":       autorest.Encode("path", operationID),
13247		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13248		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13249	}
13250
13251	const APIVersion = "2021-01-15"
13252	queryParameters := map[string]interface{}{
13253		"api-version": APIVersion,
13254	}
13255
13256	preparer := autorest.CreatePreparer(
13257		autorest.AsGet(),
13258		autorest.WithBaseURL(client.BaseURI),
13259		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters),
13260		autorest.WithQueryParameters(queryParameters))
13261	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13262}
13263
13264// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the
13265// http.Response Body if it receives an error.
13266func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) {
13267	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13268}
13269
13270// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always
13271// closes the http.Response Body.
13272func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13273	err = autorest.Respond(
13274		resp,
13275		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13276		autorest.ByUnmarshallingJSON(&result.Value),
13277		autorest.ByClosing())
13278	result.Response = autorest.Response{Response: resp}
13279	return
13280}
13281
13282// GetNetworkTraceOperationSlot description for Gets a named operation for a network trace capturing (or deployment
13283// slot, if specified).
13284// Parameters:
13285// resourceGroupName - name of the resource group to which the resource belongs.
13286// name - name of the app.
13287// operationID - GUID of the operation.
13288// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13289// production slot.
13290func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13291	if tracing.IsEnabled() {
13292		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot")
13293		defer func() {
13294			sc := -1
13295			if result.Response.Response != nil {
13296				sc = result.Response.Response.StatusCode
13297			}
13298			tracing.EndSpan(ctx, sc, err)
13299		}()
13300	}
13301	if err := validation.Validate([]validation.Validation{
13302		{TargetValue: resourceGroupName,
13303			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13304				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13305				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13306		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlot", err.Error())
13307	}
13308
13309	req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot)
13310	if err != nil {
13311		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request")
13312		return
13313	}
13314
13315	resp, err := client.GetNetworkTraceOperationSlotSender(req)
13316	if err != nil {
13317		result.Response = autorest.Response{Response: resp}
13318		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request")
13319		return
13320	}
13321
13322	result, err = client.GetNetworkTraceOperationSlotResponder(resp)
13323	if err != nil {
13324		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request")
13325		return
13326	}
13327
13328	return
13329}
13330
13331// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request.
13332func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13333	pathParameters := map[string]interface{}{
13334		"name":              autorest.Encode("path", name),
13335		"operationId":       autorest.Encode("path", operationID),
13336		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13337		"slot":              autorest.Encode("path", slot),
13338		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13339	}
13340
13341	const APIVersion = "2021-01-15"
13342	queryParameters := map[string]interface{}{
13343		"api-version": APIVersion,
13344	}
13345
13346	preparer := autorest.CreatePreparer(
13347		autorest.AsGet(),
13348		autorest.WithBaseURL(client.BaseURI),
13349		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters),
13350		autorest.WithQueryParameters(queryParameters))
13351	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13352}
13353
13354// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the
13355// http.Response Body if it receives an error.
13356func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) {
13357	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13358}
13359
13360// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always
13361// closes the http.Response Body.
13362func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13363	err = autorest.Respond(
13364		resp,
13365		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13366		autorest.ByUnmarshallingJSON(&result.Value),
13367		autorest.ByClosing())
13368	result.Response = autorest.Response{Response: resp}
13369	return
13370}
13371
13372// GetNetworkTraceOperationSlotV2 description for Gets a named operation for a network trace capturing (or deployment
13373// slot, if specified).
13374// Parameters:
13375// resourceGroupName - name of the resource group to which the resource belongs.
13376// name - name of the app.
13377// operationID - GUID of the operation.
13378// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13379// production slot.
13380func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13381	if tracing.IsEnabled() {
13382		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2")
13383		defer func() {
13384			sc := -1
13385			if result.Response.Response != nil {
13386				sc = result.Response.Response.StatusCode
13387			}
13388			tracing.EndSpan(ctx, sc, err)
13389		}()
13390	}
13391	if err := validation.Validate([]validation.Validation{
13392		{TargetValue: resourceGroupName,
13393			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13394				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13395				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13396		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlotV2", err.Error())
13397	}
13398
13399	req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot)
13400	if err != nil {
13401		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request")
13402		return
13403	}
13404
13405	resp, err := client.GetNetworkTraceOperationSlotV2Sender(req)
13406	if err != nil {
13407		result.Response = autorest.Response{Response: resp}
13408		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request")
13409		return
13410	}
13411
13412	result, err = client.GetNetworkTraceOperationSlotV2Responder(resp)
13413	if err != nil {
13414		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request")
13415		return
13416	}
13417
13418	return
13419}
13420
13421// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request.
13422func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13423	pathParameters := map[string]interface{}{
13424		"name":              autorest.Encode("path", name),
13425		"operationId":       autorest.Encode("path", operationID),
13426		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13427		"slot":              autorest.Encode("path", slot),
13428		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13429	}
13430
13431	const APIVersion = "2021-01-15"
13432	queryParameters := map[string]interface{}{
13433		"api-version": APIVersion,
13434	}
13435
13436	preparer := autorest.CreatePreparer(
13437		autorest.AsGet(),
13438		autorest.WithBaseURL(client.BaseURI),
13439		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters),
13440		autorest.WithQueryParameters(queryParameters))
13441	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13442}
13443
13444// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the
13445// http.Response Body if it receives an error.
13446func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) {
13447	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13448}
13449
13450// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always
13451// closes the http.Response Body.
13452func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13453	err = autorest.Respond(
13454		resp,
13455		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13456		autorest.ByUnmarshallingJSON(&result.Value),
13457		autorest.ByClosing())
13458	result.Response = autorest.Response{Response: resp}
13459	return
13460}
13461
13462// GetNetworkTraceOperationV2 description for Gets a named operation for a network trace capturing (or deployment slot,
13463// if specified).
13464// Parameters:
13465// resourceGroupName - name of the resource group to which the resource belongs.
13466// name - name of the app.
13467// operationID - GUID of the operation.
13468func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13469	if tracing.IsEnabled() {
13470		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2")
13471		defer func() {
13472			sc := -1
13473			if result.Response.Response != nil {
13474				sc = result.Response.Response.StatusCode
13475			}
13476			tracing.EndSpan(ctx, sc, err)
13477		}()
13478	}
13479	if err := validation.Validate([]validation.Validation{
13480		{TargetValue: resourceGroupName,
13481			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13482				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13483				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13484		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationV2", err.Error())
13485	}
13486
13487	req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID)
13488	if err != nil {
13489		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request")
13490		return
13491	}
13492
13493	resp, err := client.GetNetworkTraceOperationV2Sender(req)
13494	if err != nil {
13495		result.Response = autorest.Response{Response: resp}
13496		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request")
13497		return
13498	}
13499
13500	result, err = client.GetNetworkTraceOperationV2Responder(resp)
13501	if err != nil {
13502		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request")
13503		return
13504	}
13505
13506	return
13507}
13508
13509// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request.
13510func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13511	pathParameters := map[string]interface{}{
13512		"name":              autorest.Encode("path", name),
13513		"operationId":       autorest.Encode("path", operationID),
13514		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13515		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13516	}
13517
13518	const APIVersion = "2021-01-15"
13519	queryParameters := map[string]interface{}{
13520		"api-version": APIVersion,
13521	}
13522
13523	preparer := autorest.CreatePreparer(
13524		autorest.AsGet(),
13525		autorest.WithBaseURL(client.BaseURI),
13526		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters),
13527		autorest.WithQueryParameters(queryParameters))
13528	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13529}
13530
13531// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the
13532// http.Response Body if it receives an error.
13533func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) {
13534	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13535}
13536
13537// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always
13538// closes the http.Response Body.
13539func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13540	err = autorest.Respond(
13541		resp,
13542		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13543		autorest.ByUnmarshallingJSON(&result.Value),
13544		autorest.ByClosing())
13545	result.Response = autorest.Response{Response: resp}
13546	return
13547}
13548
13549// GetNetworkTraces description for Gets a named operation for a network trace capturing (or deployment slot, if
13550// specified).
13551// Parameters:
13552// resourceGroupName - name of the resource group to which the resource belongs.
13553// name - name of the app.
13554// operationID - GUID of the operation.
13555func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13556	if tracing.IsEnabled() {
13557		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces")
13558		defer func() {
13559			sc := -1
13560			if result.Response.Response != nil {
13561				sc = result.Response.Response.StatusCode
13562			}
13563			tracing.EndSpan(ctx, sc, err)
13564		}()
13565	}
13566	if err := validation.Validate([]validation.Validation{
13567		{TargetValue: resourceGroupName,
13568			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13569				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13570				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13571		return result, validation.NewError("web.AppsClient", "GetNetworkTraces", err.Error())
13572	}
13573
13574	req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID)
13575	if err != nil {
13576		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request")
13577		return
13578	}
13579
13580	resp, err := client.GetNetworkTracesSender(req)
13581	if err != nil {
13582		result.Response = autorest.Response{Response: resp}
13583		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request")
13584		return
13585	}
13586
13587	result, err = client.GetNetworkTracesResponder(resp)
13588	if err != nil {
13589		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request")
13590		return
13591	}
13592
13593	return
13594}
13595
13596// GetNetworkTracesPreparer prepares the GetNetworkTraces request.
13597func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13598	pathParameters := map[string]interface{}{
13599		"name":              autorest.Encode("path", name),
13600		"operationId":       autorest.Encode("path", operationID),
13601		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13602		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13603	}
13604
13605	const APIVersion = "2021-01-15"
13606	queryParameters := map[string]interface{}{
13607		"api-version": APIVersion,
13608	}
13609
13610	preparer := autorest.CreatePreparer(
13611		autorest.AsGet(),
13612		autorest.WithBaseURL(client.BaseURI),
13613		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters),
13614		autorest.WithQueryParameters(queryParameters))
13615	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13616}
13617
13618// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the
13619// http.Response Body if it receives an error.
13620func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) {
13621	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13622}
13623
13624// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always
13625// closes the http.Response Body.
13626func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13627	err = autorest.Respond(
13628		resp,
13629		azure.WithErrorUnlessStatusCode(http.StatusOK),
13630		autorest.ByUnmarshallingJSON(&result.Value),
13631		autorest.ByClosing())
13632	result.Response = autorest.Response{Response: resp}
13633	return
13634}
13635
13636// GetNetworkTracesSlot description for Gets a named operation for a network trace capturing (or deployment slot, if
13637// specified).
13638// Parameters:
13639// resourceGroupName - name of the resource group to which the resource belongs.
13640// name - name of the app.
13641// operationID - GUID of the operation.
13642// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13643// production slot.
13644func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13645	if tracing.IsEnabled() {
13646		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot")
13647		defer func() {
13648			sc := -1
13649			if result.Response.Response != nil {
13650				sc = result.Response.Response.StatusCode
13651			}
13652			tracing.EndSpan(ctx, sc, err)
13653		}()
13654	}
13655	if err := validation.Validate([]validation.Validation{
13656		{TargetValue: resourceGroupName,
13657			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13658				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13659				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13660		return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlot", err.Error())
13661	}
13662
13663	req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot)
13664	if err != nil {
13665		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request")
13666		return
13667	}
13668
13669	resp, err := client.GetNetworkTracesSlotSender(req)
13670	if err != nil {
13671		result.Response = autorest.Response{Response: resp}
13672		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request")
13673		return
13674	}
13675
13676	result, err = client.GetNetworkTracesSlotResponder(resp)
13677	if err != nil {
13678		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request")
13679		return
13680	}
13681
13682	return
13683}
13684
13685// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request.
13686func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13687	pathParameters := map[string]interface{}{
13688		"name":              autorest.Encode("path", name),
13689		"operationId":       autorest.Encode("path", operationID),
13690		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13691		"slot":              autorest.Encode("path", slot),
13692		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13693	}
13694
13695	const APIVersion = "2021-01-15"
13696	queryParameters := map[string]interface{}{
13697		"api-version": APIVersion,
13698	}
13699
13700	preparer := autorest.CreatePreparer(
13701		autorest.AsGet(),
13702		autorest.WithBaseURL(client.BaseURI),
13703		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters),
13704		autorest.WithQueryParameters(queryParameters))
13705	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13706}
13707
13708// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the
13709// http.Response Body if it receives an error.
13710func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) {
13711	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13712}
13713
13714// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always
13715// closes the http.Response Body.
13716func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13717	err = autorest.Respond(
13718		resp,
13719		azure.WithErrorUnlessStatusCode(http.StatusOK),
13720		autorest.ByUnmarshallingJSON(&result.Value),
13721		autorest.ByClosing())
13722	result.Response = autorest.Response{Response: resp}
13723	return
13724}
13725
13726// GetNetworkTracesSlotV2 description for Gets a named operation for a network trace capturing (or deployment slot, if
13727// specified).
13728// Parameters:
13729// resourceGroupName - name of the resource group to which the resource belongs.
13730// name - name of the app.
13731// operationID - GUID of the operation.
13732// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13733// production slot.
13734func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13735	if tracing.IsEnabled() {
13736		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2")
13737		defer func() {
13738			sc := -1
13739			if result.Response.Response != nil {
13740				sc = result.Response.Response.StatusCode
13741			}
13742			tracing.EndSpan(ctx, sc, err)
13743		}()
13744	}
13745	if err := validation.Validate([]validation.Validation{
13746		{TargetValue: resourceGroupName,
13747			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13748				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13749				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13750		return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlotV2", err.Error())
13751	}
13752
13753	req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot)
13754	if err != nil {
13755		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request")
13756		return
13757	}
13758
13759	resp, err := client.GetNetworkTracesSlotV2Sender(req)
13760	if err != nil {
13761		result.Response = autorest.Response{Response: resp}
13762		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request")
13763		return
13764	}
13765
13766	result, err = client.GetNetworkTracesSlotV2Responder(resp)
13767	if err != nil {
13768		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request")
13769		return
13770	}
13771
13772	return
13773}
13774
13775// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request.
13776func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13777	pathParameters := map[string]interface{}{
13778		"name":              autorest.Encode("path", name),
13779		"operationId":       autorest.Encode("path", operationID),
13780		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13781		"slot":              autorest.Encode("path", slot),
13782		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13783	}
13784
13785	const APIVersion = "2021-01-15"
13786	queryParameters := map[string]interface{}{
13787		"api-version": APIVersion,
13788	}
13789
13790	preparer := autorest.CreatePreparer(
13791		autorest.AsGet(),
13792		autorest.WithBaseURL(client.BaseURI),
13793		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters),
13794		autorest.WithQueryParameters(queryParameters))
13795	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13796}
13797
13798// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the
13799// http.Response Body if it receives an error.
13800func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) {
13801	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13802}
13803
13804// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always
13805// closes the http.Response Body.
13806func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13807	err = autorest.Respond(
13808		resp,
13809		azure.WithErrorUnlessStatusCode(http.StatusOK),
13810		autorest.ByUnmarshallingJSON(&result.Value),
13811		autorest.ByClosing())
13812	result.Response = autorest.Response{Response: resp}
13813	return
13814}
13815
13816// GetNetworkTracesV2 description for Gets a named operation for a network trace capturing (or deployment slot, if
13817// specified).
13818// Parameters:
13819// resourceGroupName - name of the resource group to which the resource belongs.
13820// name - name of the app.
13821// operationID - GUID of the operation.
13822func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13823	if tracing.IsEnabled() {
13824		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2")
13825		defer func() {
13826			sc := -1
13827			if result.Response.Response != nil {
13828				sc = result.Response.Response.StatusCode
13829			}
13830			tracing.EndSpan(ctx, sc, err)
13831		}()
13832	}
13833	if err := validation.Validate([]validation.Validation{
13834		{TargetValue: resourceGroupName,
13835			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13836				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13837				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13838		return result, validation.NewError("web.AppsClient", "GetNetworkTracesV2", err.Error())
13839	}
13840
13841	req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID)
13842	if err != nil {
13843		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request")
13844		return
13845	}
13846
13847	resp, err := client.GetNetworkTracesV2Sender(req)
13848	if err != nil {
13849		result.Response = autorest.Response{Response: resp}
13850		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request")
13851		return
13852	}
13853
13854	result, err = client.GetNetworkTracesV2Responder(resp)
13855	if err != nil {
13856		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request")
13857		return
13858	}
13859
13860	return
13861}
13862
13863// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request.
13864func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13865	pathParameters := map[string]interface{}{
13866		"name":              autorest.Encode("path", name),
13867		"operationId":       autorest.Encode("path", operationID),
13868		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13869		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13870	}
13871
13872	const APIVersion = "2021-01-15"
13873	queryParameters := map[string]interface{}{
13874		"api-version": APIVersion,
13875	}
13876
13877	preparer := autorest.CreatePreparer(
13878		autorest.AsGet(),
13879		autorest.WithBaseURL(client.BaseURI),
13880		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters),
13881		autorest.WithQueryParameters(queryParameters))
13882	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13883}
13884
13885// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the
13886// http.Response Body if it receives an error.
13887func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) {
13888	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13889}
13890
13891// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always
13892// closes the http.Response Body.
13893func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13894	err = autorest.Respond(
13895		resp,
13896		azure.WithErrorUnlessStatusCode(http.StatusOK),
13897		autorest.ByUnmarshallingJSON(&result.Value),
13898		autorest.ByClosing())
13899	result.Response = autorest.Response{Response: resp}
13900	return
13901}
13902
13903// GetPremierAddOn description for Gets a named add-on of an app.
13904// Parameters:
13905// resourceGroupName - name of the resource group to which the resource belongs.
13906// name - name of the app.
13907// premierAddOnName - add-on name.
13908func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) {
13909	if tracing.IsEnabled() {
13910		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn")
13911		defer func() {
13912			sc := -1
13913			if result.Response.Response != nil {
13914				sc = result.Response.Response.StatusCode
13915			}
13916			tracing.EndSpan(ctx, sc, err)
13917		}()
13918	}
13919	if err := validation.Validate([]validation.Validation{
13920		{TargetValue: resourceGroupName,
13921			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13922				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13923				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13924		return result, validation.NewError("web.AppsClient", "GetPremierAddOn", err.Error())
13925	}
13926
13927	req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName)
13928	if err != nil {
13929		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request")
13930		return
13931	}
13932
13933	resp, err := client.GetPremierAddOnSender(req)
13934	if err != nil {
13935		result.Response = autorest.Response{Response: resp}
13936		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request")
13937		return
13938	}
13939
13940	result, err = client.GetPremierAddOnResponder(resp)
13941	if err != nil {
13942		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request")
13943		return
13944	}
13945
13946	return
13947}
13948
13949// GetPremierAddOnPreparer prepares the GetPremierAddOn request.
13950func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) {
13951	pathParameters := map[string]interface{}{
13952		"name":              autorest.Encode("path", name),
13953		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
13954		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13955		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13956	}
13957
13958	const APIVersion = "2021-01-15"
13959	queryParameters := map[string]interface{}{
13960		"api-version": APIVersion,
13961	}
13962
13963	preparer := autorest.CreatePreparer(
13964		autorest.AsGet(),
13965		autorest.WithBaseURL(client.BaseURI),
13966		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
13967		autorest.WithQueryParameters(queryParameters))
13968	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13969}
13970
13971// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the
13972// http.Response Body if it receives an error.
13973func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) {
13974	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13975}
13976
13977// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always
13978// closes the http.Response Body.
13979func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
13980	err = autorest.Respond(
13981		resp,
13982		azure.WithErrorUnlessStatusCode(http.StatusOK),
13983		autorest.ByUnmarshallingJSON(&result),
13984		autorest.ByClosing())
13985	result.Response = autorest.Response{Response: resp}
13986	return
13987}
13988
13989// GetPremierAddOnSlot description for Gets a named add-on of an app.
13990// Parameters:
13991// resourceGroupName - name of the resource group to which the resource belongs.
13992// name - name of the app.
13993// premierAddOnName - add-on name.
13994// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the
13995// production slot.
13996func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) {
13997	if tracing.IsEnabled() {
13998		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot")
13999		defer func() {
14000			sc := -1
14001			if result.Response.Response != nil {
14002				sc = result.Response.Response.StatusCode
14003			}
14004			tracing.EndSpan(ctx, sc, err)
14005		}()
14006	}
14007	if err := validation.Validate([]validation.Validation{
14008		{TargetValue: resourceGroupName,
14009			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14010				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14011				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14012		return result, validation.NewError("web.AppsClient", "GetPremierAddOnSlot", err.Error())
14013	}
14014
14015	req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot)
14016	if err != nil {
14017		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request")
14018		return
14019	}
14020
14021	resp, err := client.GetPremierAddOnSlotSender(req)
14022	if err != nil {
14023		result.Response = autorest.Response{Response: resp}
14024		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request")
14025		return
14026	}
14027
14028	result, err = client.GetPremierAddOnSlotResponder(resp)
14029	if err != nil {
14030		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request")
14031		return
14032	}
14033
14034	return
14035}
14036
14037// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request.
14038func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) {
14039	pathParameters := map[string]interface{}{
14040		"name":              autorest.Encode("path", name),
14041		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
14042		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14043		"slot":              autorest.Encode("path", slot),
14044		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14045	}
14046
14047	const APIVersion = "2021-01-15"
14048	queryParameters := map[string]interface{}{
14049		"api-version": APIVersion,
14050	}
14051
14052	preparer := autorest.CreatePreparer(
14053		autorest.AsGet(),
14054		autorest.WithBaseURL(client.BaseURI),
14055		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
14056		autorest.WithQueryParameters(queryParameters))
14057	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14058}
14059
14060// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the
14061// http.Response Body if it receives an error.
14062func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
14063	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14064}
14065
14066// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always
14067// closes the http.Response Body.
14068func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
14069	err = autorest.Respond(
14070		resp,
14071		azure.WithErrorUnlessStatusCode(http.StatusOK),
14072		autorest.ByUnmarshallingJSON(&result),
14073		autorest.ByClosing())
14074	result.Response = autorest.Response{Response: resp}
14075	return
14076}
14077
14078// GetPrivateAccess description for Gets data around private site access enablement and authorized Virtual Networks
14079// that can access the site.
14080// Parameters:
14081// resourceGroupName - name of the resource group to which the resource belongs.
14082// name - the name of the web app.
14083func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) {
14084	if tracing.IsEnabled() {
14085		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess")
14086		defer func() {
14087			sc := -1
14088			if result.Response.Response != nil {
14089				sc = result.Response.Response.StatusCode
14090			}
14091			tracing.EndSpan(ctx, sc, err)
14092		}()
14093	}
14094	if err := validation.Validate([]validation.Validation{
14095		{TargetValue: resourceGroupName,
14096			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14097				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14098				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14099		return result, validation.NewError("web.AppsClient", "GetPrivateAccess", err.Error())
14100	}
14101
14102	req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name)
14103	if err != nil {
14104		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request")
14105		return
14106	}
14107
14108	resp, err := client.GetPrivateAccessSender(req)
14109	if err != nil {
14110		result.Response = autorest.Response{Response: resp}
14111		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request")
14112		return
14113	}
14114
14115	result, err = client.GetPrivateAccessResponder(resp)
14116	if err != nil {
14117		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request")
14118		return
14119	}
14120
14121	return
14122}
14123
14124// GetPrivateAccessPreparer prepares the GetPrivateAccess request.
14125func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14126	pathParameters := map[string]interface{}{
14127		"name":              autorest.Encode("path", name),
14128		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14129		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14130	}
14131
14132	const APIVersion = "2021-01-15"
14133	queryParameters := map[string]interface{}{
14134		"api-version": APIVersion,
14135	}
14136
14137	preparer := autorest.CreatePreparer(
14138		autorest.AsGet(),
14139		autorest.WithBaseURL(client.BaseURI),
14140		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters),
14141		autorest.WithQueryParameters(queryParameters))
14142	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14143}
14144
14145// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the
14146// http.Response Body if it receives an error.
14147func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) {
14148	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14149}
14150
14151// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always
14152// closes the http.Response Body.
14153func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) {
14154	err = autorest.Respond(
14155		resp,
14156		azure.WithErrorUnlessStatusCode(http.StatusOK),
14157		autorest.ByUnmarshallingJSON(&result),
14158		autorest.ByClosing())
14159	result.Response = autorest.Response{Response: resp}
14160	return
14161}
14162
14163// GetPrivateAccessSlot description for Gets data around private site access enablement and authorized Virtual Networks
14164// that can access the site.
14165// Parameters:
14166// resourceGroupName - name of the resource group to which the resource belongs.
14167// name - the name of the web app.
14168// slot - the name of the slot for the web app.
14169func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) {
14170	if tracing.IsEnabled() {
14171		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot")
14172		defer func() {
14173			sc := -1
14174			if result.Response.Response != nil {
14175				sc = result.Response.Response.StatusCode
14176			}
14177			tracing.EndSpan(ctx, sc, err)
14178		}()
14179	}
14180	if err := validation.Validate([]validation.Validation{
14181		{TargetValue: resourceGroupName,
14182			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14183				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14184				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14185		return result, validation.NewError("web.AppsClient", "GetPrivateAccessSlot", err.Error())
14186	}
14187
14188	req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot)
14189	if err != nil {
14190		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request")
14191		return
14192	}
14193
14194	resp, err := client.GetPrivateAccessSlotSender(req)
14195	if err != nil {
14196		result.Response = autorest.Response{Response: resp}
14197		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request")
14198		return
14199	}
14200
14201	result, err = client.GetPrivateAccessSlotResponder(resp)
14202	if err != nil {
14203		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request")
14204		return
14205	}
14206
14207	return
14208}
14209
14210// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request.
14211func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14212	pathParameters := map[string]interface{}{
14213		"name":              autorest.Encode("path", name),
14214		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14215		"slot":              autorest.Encode("path", slot),
14216		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14217	}
14218
14219	const APIVersion = "2021-01-15"
14220	queryParameters := map[string]interface{}{
14221		"api-version": APIVersion,
14222	}
14223
14224	preparer := autorest.CreatePreparer(
14225		autorest.AsGet(),
14226		autorest.WithBaseURL(client.BaseURI),
14227		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters),
14228		autorest.WithQueryParameters(queryParameters))
14229	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14230}
14231
14232// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the
14233// http.Response Body if it receives an error.
14234func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) {
14235	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14236}
14237
14238// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always
14239// closes the http.Response Body.
14240func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) {
14241	err = autorest.Respond(
14242		resp,
14243		azure.WithErrorUnlessStatusCode(http.StatusOK),
14244		autorest.ByUnmarshallingJSON(&result),
14245		autorest.ByClosing())
14246	result.Response = autorest.Response{Response: resp}
14247	return
14248}
14249
14250// GetPrivateEndpointConnection description for Gets a private endpoint connection
14251// Parameters:
14252// resourceGroupName - name of the resource group to which the resource belongs.
14253// name - name of the site.
14254// privateEndpointConnectionName - name of the private endpoint connection.
14255func (client AppsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result RemotePrivateEndpointConnectionARMResource, err error) {
14256	if tracing.IsEnabled() {
14257		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnection")
14258		defer func() {
14259			sc := -1
14260			if result.Response.Response != nil {
14261				sc = result.Response.Response.StatusCode
14262			}
14263			tracing.EndSpan(ctx, sc, err)
14264		}()
14265	}
14266	if err := validation.Validate([]validation.Validation{
14267		{TargetValue: resourceGroupName,
14268			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14269				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14270				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14271		return result, validation.NewError("web.AppsClient", "GetPrivateEndpointConnection", err.Error())
14272	}
14273
14274	req, err := client.GetPrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName)
14275	if err != nil {
14276		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnection", nil, "Failure preparing request")
14277		return
14278	}
14279
14280	resp, err := client.GetPrivateEndpointConnectionSender(req)
14281	if err != nil {
14282		result.Response = autorest.Response{Response: resp}
14283		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnection", resp, "Failure sending request")
14284		return
14285	}
14286
14287	result, err = client.GetPrivateEndpointConnectionResponder(resp)
14288	if err != nil {
14289		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnection", resp, "Failure responding to request")
14290		return
14291	}
14292
14293	return
14294}
14295
14296// GetPrivateEndpointConnectionPreparer prepares the GetPrivateEndpointConnection request.
14297func (client AppsClient) GetPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) {
14298	pathParameters := map[string]interface{}{
14299		"name":                          autorest.Encode("path", name),
14300		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
14301		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
14302		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
14303	}
14304
14305	const APIVersion = "2021-01-15"
14306	queryParameters := map[string]interface{}{
14307		"api-version": APIVersion,
14308	}
14309
14310	preparer := autorest.CreatePreparer(
14311		autorest.AsGet(),
14312		autorest.WithBaseURL(client.BaseURI),
14313		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
14314		autorest.WithQueryParameters(queryParameters))
14315	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14316}
14317
14318// GetPrivateEndpointConnectionSender sends the GetPrivateEndpointConnection request. The method will close the
14319// http.Response Body if it receives an error.
14320func (client AppsClient) GetPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) {
14321	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14322}
14323
14324// GetPrivateEndpointConnectionResponder handles the response to the GetPrivateEndpointConnection request. The method always
14325// closes the http.Response Body.
14326func (client AppsClient) GetPrivateEndpointConnectionResponder(resp *http.Response) (result RemotePrivateEndpointConnectionARMResource, err error) {
14327	err = autorest.Respond(
14328		resp,
14329		azure.WithErrorUnlessStatusCode(http.StatusOK),
14330		autorest.ByUnmarshallingJSON(&result),
14331		autorest.ByClosing())
14332	result.Response = autorest.Response{Response: resp}
14333	return
14334}
14335
14336// GetPrivateEndpointConnectionList description for Gets the list of private endpoint connections associated with a
14337// site
14338// Parameters:
14339// resourceGroupName - name of the resource group to which the resource belongs.
14340// name - name of the site.
14341func (client AppsClient) GetPrivateEndpointConnectionList(ctx context.Context, resourceGroupName string, name string) (result PrivateEndpointConnectionCollectionPage, err error) {
14342	if tracing.IsEnabled() {
14343		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnectionList")
14344		defer func() {
14345			sc := -1
14346			if result.pecc.Response.Response != nil {
14347				sc = result.pecc.Response.Response.StatusCode
14348			}
14349			tracing.EndSpan(ctx, sc, err)
14350		}()
14351	}
14352	if err := validation.Validate([]validation.Validation{
14353		{TargetValue: resourceGroupName,
14354			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14355				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14356				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14357		return result, validation.NewError("web.AppsClient", "GetPrivateEndpointConnectionList", err.Error())
14358	}
14359
14360	result.fn = client.getPrivateEndpointConnectionListNextResults
14361	req, err := client.GetPrivateEndpointConnectionListPreparer(ctx, resourceGroupName, name)
14362	if err != nil {
14363		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionList", nil, "Failure preparing request")
14364		return
14365	}
14366
14367	resp, err := client.GetPrivateEndpointConnectionListSender(req)
14368	if err != nil {
14369		result.pecc.Response = autorest.Response{Response: resp}
14370		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionList", resp, "Failure sending request")
14371		return
14372	}
14373
14374	result.pecc, err = client.GetPrivateEndpointConnectionListResponder(resp)
14375	if err != nil {
14376		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionList", resp, "Failure responding to request")
14377		return
14378	}
14379	if result.pecc.hasNextLink() && result.pecc.IsEmpty() {
14380		err = result.NextWithContext(ctx)
14381		return
14382	}
14383
14384	return
14385}
14386
14387// GetPrivateEndpointConnectionListPreparer prepares the GetPrivateEndpointConnectionList request.
14388func (client AppsClient) GetPrivateEndpointConnectionListPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14389	pathParameters := map[string]interface{}{
14390		"name":              autorest.Encode("path", name),
14391		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14392		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14393	}
14394
14395	const APIVersion = "2021-01-15"
14396	queryParameters := map[string]interface{}{
14397		"api-version": APIVersion,
14398	}
14399
14400	preparer := autorest.CreatePreparer(
14401		autorest.AsGet(),
14402		autorest.WithBaseURL(client.BaseURI),
14403		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections", pathParameters),
14404		autorest.WithQueryParameters(queryParameters))
14405	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14406}
14407
14408// GetPrivateEndpointConnectionListSender sends the GetPrivateEndpointConnectionList request. The method will close the
14409// http.Response Body if it receives an error.
14410func (client AppsClient) GetPrivateEndpointConnectionListSender(req *http.Request) (*http.Response, error) {
14411	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14412}
14413
14414// GetPrivateEndpointConnectionListResponder handles the response to the GetPrivateEndpointConnectionList request. The method always
14415// closes the http.Response Body.
14416func (client AppsClient) GetPrivateEndpointConnectionListResponder(resp *http.Response) (result PrivateEndpointConnectionCollection, err error) {
14417	err = autorest.Respond(
14418		resp,
14419		azure.WithErrorUnlessStatusCode(http.StatusOK),
14420		autorest.ByUnmarshallingJSON(&result),
14421		autorest.ByClosing())
14422	result.Response = autorest.Response{Response: resp}
14423	return
14424}
14425
14426// getPrivateEndpointConnectionListNextResults retrieves the next set of results, if any.
14427func (client AppsClient) getPrivateEndpointConnectionListNextResults(ctx context.Context, lastResults PrivateEndpointConnectionCollection) (result PrivateEndpointConnectionCollection, err error) {
14428	req, err := lastResults.privateEndpointConnectionCollectionPreparer(ctx)
14429	if err != nil {
14430		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getPrivateEndpointConnectionListNextResults", nil, "Failure preparing next results request")
14431	}
14432	if req == nil {
14433		return
14434	}
14435	resp, err := client.GetPrivateEndpointConnectionListSender(req)
14436	if err != nil {
14437		result.Response = autorest.Response{Response: resp}
14438		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getPrivateEndpointConnectionListNextResults", resp, "Failure sending next results request")
14439	}
14440	result, err = client.GetPrivateEndpointConnectionListResponder(resp)
14441	if err != nil {
14442		err = autorest.NewErrorWithError(err, "web.AppsClient", "getPrivateEndpointConnectionListNextResults", resp, "Failure responding to next results request")
14443	}
14444	return
14445}
14446
14447// GetPrivateEndpointConnectionListComplete enumerates all values, automatically crossing page boundaries as required.
14448func (client AppsClient) GetPrivateEndpointConnectionListComplete(ctx context.Context, resourceGroupName string, name string) (result PrivateEndpointConnectionCollectionIterator, err error) {
14449	if tracing.IsEnabled() {
14450		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnectionList")
14451		defer func() {
14452			sc := -1
14453			if result.Response().Response.Response != nil {
14454				sc = result.page.Response().Response.Response.StatusCode
14455			}
14456			tracing.EndSpan(ctx, sc, err)
14457		}()
14458	}
14459	result.page, err = client.GetPrivateEndpointConnectionList(ctx, resourceGroupName, name)
14460	return
14461}
14462
14463// GetPrivateEndpointConnectionListSlot description for Gets the list of private endpoint connections associated with a
14464// site
14465// Parameters:
14466// resourceGroupName - name of the resource group to which the resource belongs.
14467// name - name of the site.
14468// slot - name of the site deployment slot.
14469func (client AppsClient) GetPrivateEndpointConnectionListSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateEndpointConnectionCollectionPage, err error) {
14470	if tracing.IsEnabled() {
14471		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnectionListSlot")
14472		defer func() {
14473			sc := -1
14474			if result.pecc.Response.Response != nil {
14475				sc = result.pecc.Response.Response.StatusCode
14476			}
14477			tracing.EndSpan(ctx, sc, err)
14478		}()
14479	}
14480	if err := validation.Validate([]validation.Validation{
14481		{TargetValue: resourceGroupName,
14482			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14483				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14484				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14485		return result, validation.NewError("web.AppsClient", "GetPrivateEndpointConnectionListSlot", err.Error())
14486	}
14487
14488	result.fn = client.getPrivateEndpointConnectionListSlotNextResults
14489	req, err := client.GetPrivateEndpointConnectionListSlotPreparer(ctx, resourceGroupName, name, slot)
14490	if err != nil {
14491		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionListSlot", nil, "Failure preparing request")
14492		return
14493	}
14494
14495	resp, err := client.GetPrivateEndpointConnectionListSlotSender(req)
14496	if err != nil {
14497		result.pecc.Response = autorest.Response{Response: resp}
14498		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionListSlot", resp, "Failure sending request")
14499		return
14500	}
14501
14502	result.pecc, err = client.GetPrivateEndpointConnectionListSlotResponder(resp)
14503	if err != nil {
14504		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionListSlot", resp, "Failure responding to request")
14505		return
14506	}
14507	if result.pecc.hasNextLink() && result.pecc.IsEmpty() {
14508		err = result.NextWithContext(ctx)
14509		return
14510	}
14511
14512	return
14513}
14514
14515// GetPrivateEndpointConnectionListSlotPreparer prepares the GetPrivateEndpointConnectionListSlot request.
14516func (client AppsClient) GetPrivateEndpointConnectionListSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14517	pathParameters := map[string]interface{}{
14518		"name":              autorest.Encode("path", name),
14519		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14520		"slot":              autorest.Encode("path", slot),
14521		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14522	}
14523
14524	const APIVersion = "2021-01-15"
14525	queryParameters := map[string]interface{}{
14526		"api-version": APIVersion,
14527	}
14528
14529	preparer := autorest.CreatePreparer(
14530		autorest.AsGet(),
14531		autorest.WithBaseURL(client.BaseURI),
14532		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections", pathParameters),
14533		autorest.WithQueryParameters(queryParameters))
14534	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14535}
14536
14537// GetPrivateEndpointConnectionListSlotSender sends the GetPrivateEndpointConnectionListSlot request. The method will close the
14538// http.Response Body if it receives an error.
14539func (client AppsClient) GetPrivateEndpointConnectionListSlotSender(req *http.Request) (*http.Response, error) {
14540	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14541}
14542
14543// GetPrivateEndpointConnectionListSlotResponder handles the response to the GetPrivateEndpointConnectionListSlot request. The method always
14544// closes the http.Response Body.
14545func (client AppsClient) GetPrivateEndpointConnectionListSlotResponder(resp *http.Response) (result PrivateEndpointConnectionCollection, err error) {
14546	err = autorest.Respond(
14547		resp,
14548		azure.WithErrorUnlessStatusCode(http.StatusOK),
14549		autorest.ByUnmarshallingJSON(&result),
14550		autorest.ByClosing())
14551	result.Response = autorest.Response{Response: resp}
14552	return
14553}
14554
14555// getPrivateEndpointConnectionListSlotNextResults retrieves the next set of results, if any.
14556func (client AppsClient) getPrivateEndpointConnectionListSlotNextResults(ctx context.Context, lastResults PrivateEndpointConnectionCollection) (result PrivateEndpointConnectionCollection, err error) {
14557	req, err := lastResults.privateEndpointConnectionCollectionPreparer(ctx)
14558	if err != nil {
14559		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getPrivateEndpointConnectionListSlotNextResults", nil, "Failure preparing next results request")
14560	}
14561	if req == nil {
14562		return
14563	}
14564	resp, err := client.GetPrivateEndpointConnectionListSlotSender(req)
14565	if err != nil {
14566		result.Response = autorest.Response{Response: resp}
14567		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getPrivateEndpointConnectionListSlotNextResults", resp, "Failure sending next results request")
14568	}
14569	result, err = client.GetPrivateEndpointConnectionListSlotResponder(resp)
14570	if err != nil {
14571		err = autorest.NewErrorWithError(err, "web.AppsClient", "getPrivateEndpointConnectionListSlotNextResults", resp, "Failure responding to next results request")
14572	}
14573	return
14574}
14575
14576// GetPrivateEndpointConnectionListSlotComplete enumerates all values, automatically crossing page boundaries as required.
14577func (client AppsClient) GetPrivateEndpointConnectionListSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateEndpointConnectionCollectionIterator, err error) {
14578	if tracing.IsEnabled() {
14579		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnectionListSlot")
14580		defer func() {
14581			sc := -1
14582			if result.Response().Response.Response != nil {
14583				sc = result.page.Response().Response.Response.StatusCode
14584			}
14585			tracing.EndSpan(ctx, sc, err)
14586		}()
14587	}
14588	result.page, err = client.GetPrivateEndpointConnectionListSlot(ctx, resourceGroupName, name, slot)
14589	return
14590}
14591
14592// GetPrivateEndpointConnectionSlot description for Gets a private endpoint connection
14593// Parameters:
14594// resourceGroupName - name of the resource group to which the resource belongs.
14595// name - name of the site.
14596// privateEndpointConnectionName - name of the private endpoint connection.
14597// slot - name of the site deployment slot.
14598func (client AppsClient) GetPrivateEndpointConnectionSlot(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string) (result RemotePrivateEndpointConnectionARMResource, err error) {
14599	if tracing.IsEnabled() {
14600		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnectionSlot")
14601		defer func() {
14602			sc := -1
14603			if result.Response.Response != nil {
14604				sc = result.Response.Response.StatusCode
14605			}
14606			tracing.EndSpan(ctx, sc, err)
14607		}()
14608	}
14609	if err := validation.Validate([]validation.Validation{
14610		{TargetValue: resourceGroupName,
14611			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14612				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14613				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14614		return result, validation.NewError("web.AppsClient", "GetPrivateEndpointConnectionSlot", err.Error())
14615	}
14616
14617	req, err := client.GetPrivateEndpointConnectionSlotPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName, slot)
14618	if err != nil {
14619		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionSlot", nil, "Failure preparing request")
14620		return
14621	}
14622
14623	resp, err := client.GetPrivateEndpointConnectionSlotSender(req)
14624	if err != nil {
14625		result.Response = autorest.Response{Response: resp}
14626		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionSlot", resp, "Failure sending request")
14627		return
14628	}
14629
14630	result, err = client.GetPrivateEndpointConnectionSlotResponder(resp)
14631	if err != nil {
14632		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnectionSlot", resp, "Failure responding to request")
14633		return
14634	}
14635
14636	return
14637}
14638
14639// GetPrivateEndpointConnectionSlotPreparer prepares the GetPrivateEndpointConnectionSlot request.
14640func (client AppsClient) GetPrivateEndpointConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, slot string) (*http.Request, error) {
14641	pathParameters := map[string]interface{}{
14642		"name":                          autorest.Encode("path", name),
14643		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
14644		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
14645		"slot":                          autorest.Encode("path", slot),
14646		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
14647	}
14648
14649	const APIVersion = "2021-01-15"
14650	queryParameters := map[string]interface{}{
14651		"api-version": APIVersion,
14652	}
14653
14654	preparer := autorest.CreatePreparer(
14655		autorest.AsGet(),
14656		autorest.WithBaseURL(client.BaseURI),
14657		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
14658		autorest.WithQueryParameters(queryParameters))
14659	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14660}
14661
14662// GetPrivateEndpointConnectionSlotSender sends the GetPrivateEndpointConnectionSlot request. The method will close the
14663// http.Response Body if it receives an error.
14664func (client AppsClient) GetPrivateEndpointConnectionSlotSender(req *http.Request) (*http.Response, error) {
14665	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14666}
14667
14668// GetPrivateEndpointConnectionSlotResponder handles the response to the GetPrivateEndpointConnectionSlot request. The method always
14669// closes the http.Response Body.
14670func (client AppsClient) GetPrivateEndpointConnectionSlotResponder(resp *http.Response) (result RemotePrivateEndpointConnectionARMResource, err error) {
14671	err = autorest.Respond(
14672		resp,
14673		azure.WithErrorUnlessStatusCode(http.StatusOK),
14674		autorest.ByUnmarshallingJSON(&result),
14675		autorest.ByClosing())
14676	result.Response = autorest.Response{Response: resp}
14677	return
14678}
14679
14680// GetPrivateLinkResources description for Gets the private link resources
14681// Parameters:
14682// resourceGroupName - name of the resource group to which the resource belongs.
14683// name - name of the site.
14684func (client AppsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string) (result PrivateLinkResourcesWrapper, err error) {
14685	if tracing.IsEnabled() {
14686		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateLinkResources")
14687		defer func() {
14688			sc := -1
14689			if result.Response.Response != nil {
14690				sc = result.Response.Response.StatusCode
14691			}
14692			tracing.EndSpan(ctx, sc, err)
14693		}()
14694	}
14695	if err := validation.Validate([]validation.Validation{
14696		{TargetValue: resourceGroupName,
14697			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14698				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14699				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14700		return result, validation.NewError("web.AppsClient", "GetPrivateLinkResources", err.Error())
14701	}
14702
14703	req, err := client.GetPrivateLinkResourcesPreparer(ctx, resourceGroupName, name)
14704	if err != nil {
14705		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResources", nil, "Failure preparing request")
14706		return
14707	}
14708
14709	resp, err := client.GetPrivateLinkResourcesSender(req)
14710	if err != nil {
14711		result.Response = autorest.Response{Response: resp}
14712		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResources", resp, "Failure sending request")
14713		return
14714	}
14715
14716	result, err = client.GetPrivateLinkResourcesResponder(resp)
14717	if err != nil {
14718		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResources", resp, "Failure responding to request")
14719		return
14720	}
14721
14722	return
14723}
14724
14725// GetPrivateLinkResourcesPreparer prepares the GetPrivateLinkResources request.
14726func (client AppsClient) GetPrivateLinkResourcesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14727	pathParameters := map[string]interface{}{
14728		"name":              autorest.Encode("path", name),
14729		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14730		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14731	}
14732
14733	const APIVersion = "2021-01-15"
14734	queryParameters := map[string]interface{}{
14735		"api-version": APIVersion,
14736	}
14737
14738	preparer := autorest.CreatePreparer(
14739		autorest.AsGet(),
14740		autorest.WithBaseURL(client.BaseURI),
14741		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources", pathParameters),
14742		autorest.WithQueryParameters(queryParameters))
14743	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14744}
14745
14746// GetPrivateLinkResourcesSender sends the GetPrivateLinkResources request. The method will close the
14747// http.Response Body if it receives an error.
14748func (client AppsClient) GetPrivateLinkResourcesSender(req *http.Request) (*http.Response, error) {
14749	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14750}
14751
14752// GetPrivateLinkResourcesResponder handles the response to the GetPrivateLinkResources request. The method always
14753// closes the http.Response Body.
14754func (client AppsClient) GetPrivateLinkResourcesResponder(resp *http.Response) (result PrivateLinkResourcesWrapper, err error) {
14755	err = autorest.Respond(
14756		resp,
14757		azure.WithErrorUnlessStatusCode(http.StatusOK),
14758		autorest.ByUnmarshallingJSON(&result),
14759		autorest.ByClosing())
14760	result.Response = autorest.Response{Response: resp}
14761	return
14762}
14763
14764// GetPrivateLinkResourcesSlot description for Gets the private link resources
14765// Parameters:
14766// resourceGroupName - name of the resource group to which the resource belongs.
14767// name - name of the site.
14768func (client AppsClient) GetPrivateLinkResourcesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateLinkResourcesWrapper, err error) {
14769	if tracing.IsEnabled() {
14770		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateLinkResourcesSlot")
14771		defer func() {
14772			sc := -1
14773			if result.Response.Response != nil {
14774				sc = result.Response.Response.StatusCode
14775			}
14776			tracing.EndSpan(ctx, sc, err)
14777		}()
14778	}
14779	if err := validation.Validate([]validation.Validation{
14780		{TargetValue: resourceGroupName,
14781			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14782				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14783				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14784		return result, validation.NewError("web.AppsClient", "GetPrivateLinkResourcesSlot", err.Error())
14785	}
14786
14787	req, err := client.GetPrivateLinkResourcesSlotPreparer(ctx, resourceGroupName, name, slot)
14788	if err != nil {
14789		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResourcesSlot", nil, "Failure preparing request")
14790		return
14791	}
14792
14793	resp, err := client.GetPrivateLinkResourcesSlotSender(req)
14794	if err != nil {
14795		result.Response = autorest.Response{Response: resp}
14796		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResourcesSlot", resp, "Failure sending request")
14797		return
14798	}
14799
14800	result, err = client.GetPrivateLinkResourcesSlotResponder(resp)
14801	if err != nil {
14802		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResourcesSlot", resp, "Failure responding to request")
14803		return
14804	}
14805
14806	return
14807}
14808
14809// GetPrivateLinkResourcesSlotPreparer prepares the GetPrivateLinkResourcesSlot request.
14810func (client AppsClient) GetPrivateLinkResourcesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14811	pathParameters := map[string]interface{}{
14812		"name":              autorest.Encode("path", name),
14813		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14814		"slot":              autorest.Encode("path", slot),
14815		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14816	}
14817
14818	const APIVersion = "2021-01-15"
14819	queryParameters := map[string]interface{}{
14820		"api-version": APIVersion,
14821	}
14822
14823	preparer := autorest.CreatePreparer(
14824		autorest.AsGet(),
14825		autorest.WithBaseURL(client.BaseURI),
14826		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources", pathParameters),
14827		autorest.WithQueryParameters(queryParameters))
14828	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14829}
14830
14831// GetPrivateLinkResourcesSlotSender sends the GetPrivateLinkResourcesSlot request. The method will close the
14832// http.Response Body if it receives an error.
14833func (client AppsClient) GetPrivateLinkResourcesSlotSender(req *http.Request) (*http.Response, error) {
14834	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14835}
14836
14837// GetPrivateLinkResourcesSlotResponder handles the response to the GetPrivateLinkResourcesSlot request. The method always
14838// closes the http.Response Body.
14839func (client AppsClient) GetPrivateLinkResourcesSlotResponder(resp *http.Response) (result PrivateLinkResourcesWrapper, err error) {
14840	err = autorest.Respond(
14841		resp,
14842		azure.WithErrorUnlessStatusCode(http.StatusOK),
14843		autorest.ByUnmarshallingJSON(&result),
14844		autorest.ByClosing())
14845	result.Response = autorest.Response{Response: resp}
14846	return
14847}
14848
14849// GetProcess description for Get process information by its ID for a specific scaled-out instance in a web site.
14850// Parameters:
14851// resourceGroupName - name of the resource group to which the resource belongs.
14852// name - site name.
14853// processID - pID.
14854func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) {
14855	if tracing.IsEnabled() {
14856		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess")
14857		defer func() {
14858			sc := -1
14859			if result.Response.Response != nil {
14860				sc = result.Response.Response.StatusCode
14861			}
14862			tracing.EndSpan(ctx, sc, err)
14863		}()
14864	}
14865	if err := validation.Validate([]validation.Validation{
14866		{TargetValue: resourceGroupName,
14867			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14868				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14869				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14870		return result, validation.NewError("web.AppsClient", "GetProcess", err.Error())
14871	}
14872
14873	req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID)
14874	if err != nil {
14875		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request")
14876		return
14877	}
14878
14879	resp, err := client.GetProcessSender(req)
14880	if err != nil {
14881		result.Response = autorest.Response{Response: resp}
14882		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request")
14883		return
14884	}
14885
14886	result, err = client.GetProcessResponder(resp)
14887	if err != nil {
14888		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request")
14889		return
14890	}
14891
14892	return
14893}
14894
14895// GetProcessPreparer prepares the GetProcess request.
14896func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
14897	pathParameters := map[string]interface{}{
14898		"name":              autorest.Encode("path", name),
14899		"processId":         autorest.Encode("path", processID),
14900		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14901		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14902	}
14903
14904	const APIVersion = "2021-01-15"
14905	queryParameters := map[string]interface{}{
14906		"api-version": APIVersion,
14907	}
14908
14909	preparer := autorest.CreatePreparer(
14910		autorest.AsGet(),
14911		autorest.WithBaseURL(client.BaseURI),
14912		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters),
14913		autorest.WithQueryParameters(queryParameters))
14914	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14915}
14916
14917// GetProcessSender sends the GetProcess request. The method will close the
14918// http.Response Body if it receives an error.
14919func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) {
14920	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14921}
14922
14923// GetProcessResponder handles the response to the GetProcess request. The method always
14924// closes the http.Response Body.
14925func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) {
14926	err = autorest.Respond(
14927		resp,
14928		azure.WithErrorUnlessStatusCode(http.StatusOK),
14929		autorest.ByUnmarshallingJSON(&result),
14930		autorest.ByClosing())
14931	result.Response = autorest.Response{Response: resp}
14932	return
14933}
14934
14935// GetProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web
14936// site.
14937// Parameters:
14938// resourceGroupName - name of the resource group to which the resource belongs.
14939// name - site name.
14940// processID - pID.
14941func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) {
14942	if tracing.IsEnabled() {
14943		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump")
14944		defer func() {
14945			sc := -1
14946			if result.Response.Response != nil {
14947				sc = result.Response.Response.StatusCode
14948			}
14949			tracing.EndSpan(ctx, sc, err)
14950		}()
14951	}
14952	if err := validation.Validate([]validation.Validation{
14953		{TargetValue: resourceGroupName,
14954			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14955				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14956				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14957		return result, validation.NewError("web.AppsClient", "GetProcessDump", err.Error())
14958	}
14959
14960	req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID)
14961	if err != nil {
14962		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request")
14963		return
14964	}
14965
14966	resp, err := client.GetProcessDumpSender(req)
14967	if err != nil {
14968		result.Response = autorest.Response{Response: resp}
14969		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request")
14970		return
14971	}
14972
14973	result, err = client.GetProcessDumpResponder(resp)
14974	if err != nil {
14975		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request")
14976		return
14977	}
14978
14979	return
14980}
14981
14982// GetProcessDumpPreparer prepares the GetProcessDump request.
14983func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
14984	pathParameters := map[string]interface{}{
14985		"name":              autorest.Encode("path", name),
14986		"processId":         autorest.Encode("path", processID),
14987		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14988		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14989	}
14990
14991	const APIVersion = "2021-01-15"
14992	queryParameters := map[string]interface{}{
14993		"api-version": APIVersion,
14994	}
14995
14996	preparer := autorest.CreatePreparer(
14997		autorest.AsGet(),
14998		autorest.WithBaseURL(client.BaseURI),
14999		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters),
15000		autorest.WithQueryParameters(queryParameters))
15001	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15002}
15003
15004// GetProcessDumpSender sends the GetProcessDump request. The method will close the
15005// http.Response Body if it receives an error.
15006func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) {
15007	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15008}
15009
15010// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always
15011// closes the http.Response Body.
15012func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) {
15013	result.Value = &resp.Body
15014	err = autorest.Respond(
15015		resp,
15016		azure.WithErrorUnlessStatusCode(http.StatusOK))
15017	result.Response = autorest.Response{Response: resp}
15018	return
15019}
15020
15021// GetProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out instance in a
15022// web site.
15023// Parameters:
15024// resourceGroupName - name of the resource group to which the resource belongs.
15025// name - site name.
15026// processID - pID.
15027// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
15028// production slot.
15029func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) {
15030	if tracing.IsEnabled() {
15031		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot")
15032		defer func() {
15033			sc := -1
15034			if result.Response.Response != nil {
15035				sc = result.Response.Response.StatusCode
15036			}
15037			tracing.EndSpan(ctx, sc, err)
15038		}()
15039	}
15040	if err := validation.Validate([]validation.Validation{
15041		{TargetValue: resourceGroupName,
15042			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15043				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15044				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15045		return result, validation.NewError("web.AppsClient", "GetProcessDumpSlot", err.Error())
15046	}
15047
15048	req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot)
15049	if err != nil {
15050		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request")
15051		return
15052	}
15053
15054	resp, err := client.GetProcessDumpSlotSender(req)
15055	if err != nil {
15056		result.Response = autorest.Response{Response: resp}
15057		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request")
15058		return
15059	}
15060
15061	result, err = client.GetProcessDumpSlotResponder(resp)
15062	if err != nil {
15063		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request")
15064		return
15065	}
15066
15067	return
15068}
15069
15070// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request.
15071func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
15072	pathParameters := map[string]interface{}{
15073		"name":              autorest.Encode("path", name),
15074		"processId":         autorest.Encode("path", processID),
15075		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15076		"slot":              autorest.Encode("path", slot),
15077		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15078	}
15079
15080	const APIVersion = "2021-01-15"
15081	queryParameters := map[string]interface{}{
15082		"api-version": APIVersion,
15083	}
15084
15085	preparer := autorest.CreatePreparer(
15086		autorest.AsGet(),
15087		autorest.WithBaseURL(client.BaseURI),
15088		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters),
15089		autorest.WithQueryParameters(queryParameters))
15090	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15091}
15092
15093// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the
15094// http.Response Body if it receives an error.
15095func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) {
15096	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15097}
15098
15099// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always
15100// closes the http.Response Body.
15101func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) {
15102	result.Value = &resp.Body
15103	err = autorest.Respond(
15104		resp,
15105		azure.WithErrorUnlessStatusCode(http.StatusOK))
15106	result.Response = autorest.Response{Response: resp}
15107	return
15108}
15109
15110// GetProcessModule description for Get process information by its ID for a specific scaled-out instance in a web site.
15111// Parameters:
15112// resourceGroupName - name of the resource group to which the resource belongs.
15113// name - site name.
15114// processID - pID.
15115// baseAddress - module base address.
15116func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) {
15117	if tracing.IsEnabled() {
15118		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule")
15119		defer func() {
15120			sc := -1
15121			if result.Response.Response != nil {
15122				sc = result.Response.Response.StatusCode
15123			}
15124			tracing.EndSpan(ctx, sc, err)
15125		}()
15126	}
15127	if err := validation.Validate([]validation.Validation{
15128		{TargetValue: resourceGroupName,
15129			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15130				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15131				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15132		return result, validation.NewError("web.AppsClient", "GetProcessModule", err.Error())
15133	}
15134
15135	req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress)
15136	if err != nil {
15137		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request")
15138		return
15139	}
15140
15141	resp, err := client.GetProcessModuleSender(req)
15142	if err != nil {
15143		result.Response = autorest.Response{Response: resp}
15144		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request")
15145		return
15146	}
15147
15148	result, err = client.GetProcessModuleResponder(resp)
15149	if err != nil {
15150		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request")
15151		return
15152	}
15153
15154	return
15155}
15156
15157// GetProcessModulePreparer prepares the GetProcessModule request.
15158func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) {
15159	pathParameters := map[string]interface{}{
15160		"baseAddress":       autorest.Encode("path", baseAddress),
15161		"name":              autorest.Encode("path", name),
15162		"processId":         autorest.Encode("path", processID),
15163		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15164		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15165	}
15166
15167	const APIVersion = "2021-01-15"
15168	queryParameters := map[string]interface{}{
15169		"api-version": APIVersion,
15170	}
15171
15172	preparer := autorest.CreatePreparer(
15173		autorest.AsGet(),
15174		autorest.WithBaseURL(client.BaseURI),
15175		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters),
15176		autorest.WithQueryParameters(queryParameters))
15177	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15178}
15179
15180// GetProcessModuleSender sends the GetProcessModule request. The method will close the
15181// http.Response Body if it receives an error.
15182func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) {
15183	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15184}
15185
15186// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always
15187// closes the http.Response Body.
15188func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
15189	err = autorest.Respond(
15190		resp,
15191		azure.WithErrorUnlessStatusCode(http.StatusOK),
15192		autorest.ByUnmarshallingJSON(&result),
15193		autorest.ByClosing())
15194	result.Response = autorest.Response{Response: resp}
15195	return
15196}
15197
15198// GetProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in a web
15199// site.
15200// Parameters:
15201// resourceGroupName - name of the resource group to which the resource belongs.
15202// name - site name.
15203// processID - pID.
15204// baseAddress - module base address.
15205// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
15206// production slot.
15207func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) {
15208	if tracing.IsEnabled() {
15209		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot")
15210		defer func() {
15211			sc := -1
15212			if result.Response.Response != nil {
15213				sc = result.Response.Response.StatusCode
15214			}
15215			tracing.EndSpan(ctx, sc, err)
15216		}()
15217	}
15218	if err := validation.Validate([]validation.Validation{
15219		{TargetValue: resourceGroupName,
15220			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15221				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15222				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15223		return result, validation.NewError("web.AppsClient", "GetProcessModuleSlot", err.Error())
15224	}
15225
15226	req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot)
15227	if err != nil {
15228		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request")
15229		return
15230	}
15231
15232	resp, err := client.GetProcessModuleSlotSender(req)
15233	if err != nil {
15234		result.Response = autorest.Response{Response: resp}
15235		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request")
15236		return
15237	}
15238
15239	result, err = client.GetProcessModuleSlotResponder(resp)
15240	if err != nil {
15241		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request")
15242		return
15243	}
15244
15245	return
15246}
15247
15248// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request.
15249func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) {
15250	pathParameters := map[string]interface{}{
15251		"baseAddress":       autorest.Encode("path", baseAddress),
15252		"name":              autorest.Encode("path", name),
15253		"processId":         autorest.Encode("path", processID),
15254		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15255		"slot":              autorest.Encode("path", slot),
15256		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15257	}
15258
15259	const APIVersion = "2021-01-15"
15260	queryParameters := map[string]interface{}{
15261		"api-version": APIVersion,
15262	}
15263
15264	preparer := autorest.CreatePreparer(
15265		autorest.AsGet(),
15266		autorest.WithBaseURL(client.BaseURI),
15267		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters),
15268		autorest.WithQueryParameters(queryParameters))
15269	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15270}
15271
15272// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the
15273// http.Response Body if it receives an error.
15274func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) {
15275	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15276}
15277
15278// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always
15279// closes the http.Response Body.
15280func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
15281	err = autorest.Respond(
15282		resp,
15283		azure.WithErrorUnlessStatusCode(http.StatusOK),
15284		autorest.ByUnmarshallingJSON(&result),
15285		autorest.ByClosing())
15286	result.Response = autorest.Response{Response: resp}
15287	return
15288}
15289
15290// GetProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web site.
15291// Parameters:
15292// resourceGroupName - name of the resource group to which the resource belongs.
15293// name - site name.
15294// processID - pID.
15295// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
15296// production slot.
15297func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) {
15298	if tracing.IsEnabled() {
15299		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot")
15300		defer func() {
15301			sc := -1
15302			if result.Response.Response != nil {
15303				sc = result.Response.Response.StatusCode
15304			}
15305			tracing.EndSpan(ctx, sc, err)
15306		}()
15307	}
15308	if err := validation.Validate([]validation.Validation{
15309		{TargetValue: resourceGroupName,
15310			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15311				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15312				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15313		return result, validation.NewError("web.AppsClient", "GetProcessSlot", err.Error())
15314	}
15315
15316	req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot)
15317	if err != nil {
15318		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request")
15319		return
15320	}
15321
15322	resp, err := client.GetProcessSlotSender(req)
15323	if err != nil {
15324		result.Response = autorest.Response{Response: resp}
15325		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request")
15326		return
15327	}
15328
15329	result, err = client.GetProcessSlotResponder(resp)
15330	if err != nil {
15331		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request")
15332		return
15333	}
15334
15335	return
15336}
15337
15338// GetProcessSlotPreparer prepares the GetProcessSlot request.
15339func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
15340	pathParameters := map[string]interface{}{
15341		"name":              autorest.Encode("path", name),
15342		"processId":         autorest.Encode("path", processID),
15343		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15344		"slot":              autorest.Encode("path", slot),
15345		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15346	}
15347
15348	const APIVersion = "2021-01-15"
15349	queryParameters := map[string]interface{}{
15350		"api-version": APIVersion,
15351	}
15352
15353	preparer := autorest.CreatePreparer(
15354		autorest.AsGet(),
15355		autorest.WithBaseURL(client.BaseURI),
15356		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters),
15357		autorest.WithQueryParameters(queryParameters))
15358	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15359}
15360
15361// GetProcessSlotSender sends the GetProcessSlot request. The method will close the
15362// http.Response Body if it receives an error.
15363func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) {
15364	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15365}
15366
15367// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always
15368// closes the http.Response Body.
15369func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) {
15370	err = autorest.Respond(
15371		resp,
15372		azure.WithErrorUnlessStatusCode(http.StatusOK),
15373		autorest.ByUnmarshallingJSON(&result),
15374		autorest.ByClosing())
15375	result.Response = autorest.Response{Response: resp}
15376	return
15377}
15378
15379// GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified).
15380// Parameters:
15381// resourceGroupName - name of the resource group to which the resource belongs.
15382// name - name of the app.
15383// publicCertificateName - public certificate name.
15384func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) {
15385	if tracing.IsEnabled() {
15386		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate")
15387		defer func() {
15388			sc := -1
15389			if result.Response.Response != nil {
15390				sc = result.Response.Response.StatusCode
15391			}
15392			tracing.EndSpan(ctx, sc, err)
15393		}()
15394	}
15395	if err := validation.Validate([]validation.Validation{
15396		{TargetValue: resourceGroupName,
15397			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15398				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15399				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15400		return result, validation.NewError("web.AppsClient", "GetPublicCertificate", err.Error())
15401	}
15402
15403	req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName)
15404	if err != nil {
15405		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request")
15406		return
15407	}
15408
15409	resp, err := client.GetPublicCertificateSender(req)
15410	if err != nil {
15411		result.Response = autorest.Response{Response: resp}
15412		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request")
15413		return
15414	}
15415
15416	result, err = client.GetPublicCertificateResponder(resp)
15417	if err != nil {
15418		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request")
15419		return
15420	}
15421
15422	return
15423}
15424
15425// GetPublicCertificatePreparer prepares the GetPublicCertificate request.
15426func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) {
15427	pathParameters := map[string]interface{}{
15428		"name":                  autorest.Encode("path", name),
15429		"publicCertificateName": autorest.Encode("path", publicCertificateName),
15430		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
15431		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
15432	}
15433
15434	const APIVersion = "2021-01-15"
15435	queryParameters := map[string]interface{}{
15436		"api-version": APIVersion,
15437	}
15438
15439	preparer := autorest.CreatePreparer(
15440		autorest.AsGet(),
15441		autorest.WithBaseURL(client.BaseURI),
15442		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
15443		autorest.WithQueryParameters(queryParameters))
15444	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15445}
15446
15447// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the
15448// http.Response Body if it receives an error.
15449func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) {
15450	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15451}
15452
15453// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always
15454// closes the http.Response Body.
15455func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) {
15456	err = autorest.Respond(
15457		resp,
15458		azure.WithErrorUnlessStatusCode(http.StatusOK),
15459		autorest.ByUnmarshallingJSON(&result),
15460		autorest.ByClosing())
15461	result.Response = autorest.Response{Response: resp}
15462	return
15463}
15464
15465// GetPublicCertificateSlot description for Get the named public certificate for an app (or deployment slot, if
15466// specified).
15467// Parameters:
15468// resourceGroupName - name of the resource group to which the resource belongs.
15469// name - name of the app.
15470// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production
15471// slot.
15472// publicCertificateName - public certificate name.
15473func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) {
15474	if tracing.IsEnabled() {
15475		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot")
15476		defer func() {
15477			sc := -1
15478			if result.Response.Response != nil {
15479				sc = result.Response.Response.StatusCode
15480			}
15481			tracing.EndSpan(ctx, sc, err)
15482		}()
15483	}
15484	if err := validation.Validate([]validation.Validation{
15485		{TargetValue: resourceGroupName,
15486			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15487				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15488				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15489		return result, validation.NewError("web.AppsClient", "GetPublicCertificateSlot", err.Error())
15490	}
15491
15492	req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName)
15493	if err != nil {
15494		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request")
15495		return
15496	}
15497
15498	resp, err := client.GetPublicCertificateSlotSender(req)
15499	if err != nil {
15500		result.Response = autorest.Response{Response: resp}
15501		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request")
15502		return
15503	}
15504
15505	result, err = client.GetPublicCertificateSlotResponder(resp)
15506	if err != nil {
15507		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request")
15508		return
15509	}
15510
15511	return
15512}
15513
15514// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request.
15515func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) {
15516	pathParameters := map[string]interface{}{
15517		"name":                  autorest.Encode("path", name),
15518		"publicCertificateName": autorest.Encode("path", publicCertificateName),
15519		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
15520		"slot":                  autorest.Encode("path", slot),
15521		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
15522	}
15523
15524	const APIVersion = "2021-01-15"
15525	queryParameters := map[string]interface{}{
15526		"api-version": APIVersion,
15527	}
15528
15529	preparer := autorest.CreatePreparer(
15530		autorest.AsGet(),
15531		autorest.WithBaseURL(client.BaseURI),
15532		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
15533		autorest.WithQueryParameters(queryParameters))
15534	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15535}
15536
15537// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the
15538// http.Response Body if it receives an error.
15539func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
15540	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15541}
15542
15543// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always
15544// closes the http.Response Body.
15545func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) {
15546	err = autorest.Respond(
15547		resp,
15548		azure.WithErrorUnlessStatusCode(http.StatusOK),
15549		autorest.ByUnmarshallingJSON(&result),
15550		autorest.ByClosing())
15551	result.Response = autorest.Response{Response: resp}
15552	return
15553}
15554
15555// GetRelayServiceConnection description for Gets a hybrid connection configuration by its name.
15556// Parameters:
15557// resourceGroupName - name of the resource group to which the resource belongs.
15558// name - name of the app.
15559// entityName - name of the hybrid connection.
15560func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) {
15561	if tracing.IsEnabled() {
15562		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection")
15563		defer func() {
15564			sc := -1
15565			if result.Response.Response != nil {
15566				sc = result.Response.Response.StatusCode
15567			}
15568			tracing.EndSpan(ctx, sc, err)
15569		}()
15570	}
15571	if err := validation.Validate([]validation.Validation{
15572		{TargetValue: resourceGroupName,
15573			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15574				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15575				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15576		return result, validation.NewError("web.AppsClient", "GetRelayServiceConnection", err.Error())
15577	}
15578
15579	req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName)
15580	if err != nil {
15581		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request")
15582		return
15583	}
15584
15585	resp, err := client.GetRelayServiceConnectionSender(req)
15586	if err != nil {
15587		result.Response = autorest.Response{Response: resp}
15588		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request")
15589		return
15590	}
15591
15592	result, err = client.GetRelayServiceConnectionResponder(resp)
15593	if err != nil {
15594		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request")
15595		return
15596	}
15597
15598	return
15599}
15600
15601// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request.
15602func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) {
15603	pathParameters := map[string]interface{}{
15604		"entityName":        autorest.Encode("path", entityName),
15605		"name":              autorest.Encode("path", name),
15606		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15607		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15608	}
15609
15610	const APIVersion = "2021-01-15"
15611	queryParameters := map[string]interface{}{
15612		"api-version": APIVersion,
15613	}
15614
15615	preparer := autorest.CreatePreparer(
15616		autorest.AsGet(),
15617		autorest.WithBaseURL(client.BaseURI),
15618		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
15619		autorest.WithQueryParameters(queryParameters))
15620	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15621}
15622
15623// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the
15624// http.Response Body if it receives an error.
15625func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
15626	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15627}
15628
15629// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always
15630// closes the http.Response Body.
15631func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
15632	err = autorest.Respond(
15633		resp,
15634		azure.WithErrorUnlessStatusCode(http.StatusOK),
15635		autorest.ByUnmarshallingJSON(&result),
15636		autorest.ByClosing())
15637	result.Response = autorest.Response{Response: resp}
15638	return
15639}
15640
15641// GetRelayServiceConnectionSlot description for Gets a hybrid connection configuration by its name.
15642// Parameters:
15643// resourceGroupName - name of the resource group to which the resource belongs.
15644// name - name of the app.
15645// entityName - name of the hybrid connection.
15646// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the
15647// production slot.
15648func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) {
15649	if tracing.IsEnabled() {
15650		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot")
15651		defer func() {
15652			sc := -1
15653			if result.Response.Response != nil {
15654				sc = result.Response.Response.StatusCode
15655			}
15656			tracing.EndSpan(ctx, sc, err)
15657		}()
15658	}
15659	if err := validation.Validate([]validation.Validation{
15660		{TargetValue: resourceGroupName,
15661			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15662				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15663				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15664		return result, validation.NewError("web.AppsClient", "GetRelayServiceConnectionSlot", err.Error())
15665	}
15666
15667	req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot)
15668	if err != nil {
15669		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request")
15670		return
15671	}
15672
15673	resp, err := client.GetRelayServiceConnectionSlotSender(req)
15674	if err != nil {
15675		result.Response = autorest.Response{Response: resp}
15676		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request")
15677		return
15678	}
15679
15680	result, err = client.GetRelayServiceConnectionSlotResponder(resp)
15681	if err != nil {
15682		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request")
15683		return
15684	}
15685
15686	return
15687}
15688
15689// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request.
15690func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) {
15691	pathParameters := map[string]interface{}{
15692		"entityName":        autorest.Encode("path", entityName),
15693		"name":              autorest.Encode("path", name),
15694		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15695		"slot":              autorest.Encode("path", slot),
15696		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15697	}
15698
15699	const APIVersion = "2021-01-15"
15700	queryParameters := map[string]interface{}{
15701		"api-version": APIVersion,
15702	}
15703
15704	preparer := autorest.CreatePreparer(
15705		autorest.AsGet(),
15706		autorest.WithBaseURL(client.BaseURI),
15707		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
15708		autorest.WithQueryParameters(queryParameters))
15709	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15710}
15711
15712// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the
15713// http.Response Body if it receives an error.
15714func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
15715	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15716}
15717
15718// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always
15719// closes the http.Response Body.
15720func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
15721	err = autorest.Respond(
15722		resp,
15723		azure.WithErrorUnlessStatusCode(http.StatusOK),
15724		autorest.ByUnmarshallingJSON(&result),
15725		autorest.ByClosing())
15726	result.Response = autorest.Response{Response: resp}
15727	return
15728}
15729
15730// GetScmAllowed description for Returns whether Scm basic auth is allowed on the site or not.
15731// Parameters:
15732// resourceGroupName - name of the resource group to which the resource belongs.
15733// name - name of the app.
15734func (client AppsClient) GetScmAllowed(ctx context.Context, resourceGroupName string, name string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
15735	if tracing.IsEnabled() {
15736		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetScmAllowed")
15737		defer func() {
15738			sc := -1
15739			if result.Response.Response != nil {
15740				sc = result.Response.Response.StatusCode
15741			}
15742			tracing.EndSpan(ctx, sc, err)
15743		}()
15744	}
15745	if err := validation.Validate([]validation.Validation{
15746		{TargetValue: resourceGroupName,
15747			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15748				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15749				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15750		return result, validation.NewError("web.AppsClient", "GetScmAllowed", err.Error())
15751	}
15752
15753	req, err := client.GetScmAllowedPreparer(ctx, resourceGroupName, name)
15754	if err != nil {
15755		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowed", nil, "Failure preparing request")
15756		return
15757	}
15758
15759	resp, err := client.GetScmAllowedSender(req)
15760	if err != nil {
15761		result.Response = autorest.Response{Response: resp}
15762		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowed", resp, "Failure sending request")
15763		return
15764	}
15765
15766	result, err = client.GetScmAllowedResponder(resp)
15767	if err != nil {
15768		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowed", resp, "Failure responding to request")
15769		return
15770	}
15771
15772	return
15773}
15774
15775// GetScmAllowedPreparer prepares the GetScmAllowed request.
15776func (client AppsClient) GetScmAllowedPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
15777	pathParameters := map[string]interface{}{
15778		"name":              autorest.Encode("path", name),
15779		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15780		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15781	}
15782
15783	const APIVersion = "2021-01-15"
15784	queryParameters := map[string]interface{}{
15785		"api-version": APIVersion,
15786	}
15787
15788	preparer := autorest.CreatePreparer(
15789		autorest.AsGet(),
15790		autorest.WithBaseURL(client.BaseURI),
15791		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm", pathParameters),
15792		autorest.WithQueryParameters(queryParameters))
15793	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15794}
15795
15796// GetScmAllowedSender sends the GetScmAllowed request. The method will close the
15797// http.Response Body if it receives an error.
15798func (client AppsClient) GetScmAllowedSender(req *http.Request) (*http.Response, error) {
15799	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15800}
15801
15802// GetScmAllowedResponder handles the response to the GetScmAllowed request. The method always
15803// closes the http.Response Body.
15804func (client AppsClient) GetScmAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
15805	err = autorest.Respond(
15806		resp,
15807		azure.WithErrorUnlessStatusCode(http.StatusOK),
15808		autorest.ByUnmarshallingJSON(&result),
15809		autorest.ByClosing())
15810	result.Response = autorest.Response{Response: resp}
15811	return
15812}
15813
15814// GetScmAllowedSlot description for Returns whether Scm basic auth is allowed on the site or not.
15815// Parameters:
15816// resourceGroupName - name of the resource group to which the resource belongs.
15817// name - name of the app.
15818func (client AppsClient) GetScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
15819	if tracing.IsEnabled() {
15820		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetScmAllowedSlot")
15821		defer func() {
15822			sc := -1
15823			if result.Response.Response != nil {
15824				sc = result.Response.Response.StatusCode
15825			}
15826			tracing.EndSpan(ctx, sc, err)
15827		}()
15828	}
15829	if err := validation.Validate([]validation.Validation{
15830		{TargetValue: resourceGroupName,
15831			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15832				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15833				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15834		return result, validation.NewError("web.AppsClient", "GetScmAllowedSlot", err.Error())
15835	}
15836
15837	req, err := client.GetScmAllowedSlotPreparer(ctx, resourceGroupName, name, slot)
15838	if err != nil {
15839		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowedSlot", nil, "Failure preparing request")
15840		return
15841	}
15842
15843	resp, err := client.GetScmAllowedSlotSender(req)
15844	if err != nil {
15845		result.Response = autorest.Response{Response: resp}
15846		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowedSlot", resp, "Failure sending request")
15847		return
15848	}
15849
15850	result, err = client.GetScmAllowedSlotResponder(resp)
15851	if err != nil {
15852		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowedSlot", resp, "Failure responding to request")
15853		return
15854	}
15855
15856	return
15857}
15858
15859// GetScmAllowedSlotPreparer prepares the GetScmAllowedSlot request.
15860func (client AppsClient) GetScmAllowedSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
15861	pathParameters := map[string]interface{}{
15862		"name":              autorest.Encode("path", name),
15863		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15864		"slot":              autorest.Encode("path", slot),
15865		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15866	}
15867
15868	const APIVersion = "2021-01-15"
15869	queryParameters := map[string]interface{}{
15870		"api-version": APIVersion,
15871	}
15872
15873	preparer := autorest.CreatePreparer(
15874		autorest.AsGet(),
15875		autorest.WithBaseURL(client.BaseURI),
15876		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm", pathParameters),
15877		autorest.WithQueryParameters(queryParameters))
15878	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15879}
15880
15881// GetScmAllowedSlotSender sends the GetScmAllowedSlot request. The method will close the
15882// http.Response Body if it receives an error.
15883func (client AppsClient) GetScmAllowedSlotSender(req *http.Request) (*http.Response, error) {
15884	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15885}
15886
15887// GetScmAllowedSlotResponder handles the response to the GetScmAllowedSlot request. The method always
15888// closes the http.Response Body.
15889func (client AppsClient) GetScmAllowedSlotResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
15890	err = autorest.Respond(
15891		resp,
15892		azure.WithErrorUnlessStatusCode(http.StatusOK),
15893		autorest.ByUnmarshallingJSON(&result),
15894		autorest.ByClosing())
15895	result.Response = autorest.Response{Response: resp}
15896	return
15897}
15898
15899// GetSiteConnectionStringKeyVaultReference description for Gets the config reference and status of an app
15900// Parameters:
15901// resourceGroupName - name of the resource group to which the resource belongs.
15902// name - name of the app.
15903func (client AppsClient) GetSiteConnectionStringKeyVaultReference(ctx context.Context, resourceGroupName string, name string, connectionStringKey string) (result APIKVReference, err error) {
15904	if tracing.IsEnabled() {
15905		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReference")
15906		defer func() {
15907			sc := -1
15908			if result.Response.Response != nil {
15909				sc = result.Response.Response.StatusCode
15910			}
15911			tracing.EndSpan(ctx, sc, err)
15912		}()
15913	}
15914	if err := validation.Validate([]validation.Validation{
15915		{TargetValue: resourceGroupName,
15916			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15917				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15918				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15919		return result, validation.NewError("web.AppsClient", "GetSiteConnectionStringKeyVaultReference", err.Error())
15920	}
15921
15922	req, err := client.GetSiteConnectionStringKeyVaultReferencePreparer(ctx, resourceGroupName, name, connectionStringKey)
15923	if err != nil {
15924		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReference", nil, "Failure preparing request")
15925		return
15926	}
15927
15928	resp, err := client.GetSiteConnectionStringKeyVaultReferenceSender(req)
15929	if err != nil {
15930		result.Response = autorest.Response{Response: resp}
15931		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReference", resp, "Failure sending request")
15932		return
15933	}
15934
15935	result, err = client.GetSiteConnectionStringKeyVaultReferenceResponder(resp)
15936	if err != nil {
15937		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReference", resp, "Failure responding to request")
15938		return
15939	}
15940
15941	return
15942}
15943
15944// GetSiteConnectionStringKeyVaultReferencePreparer prepares the GetSiteConnectionStringKeyVaultReference request.
15945func (client AppsClient) GetSiteConnectionStringKeyVaultReferencePreparer(ctx context.Context, resourceGroupName string, name string, connectionStringKey string) (*http.Request, error) {
15946	pathParameters := map[string]interface{}{
15947		"connectionStringKey": autorest.Encode("path", connectionStringKey),
15948		"name":                autorest.Encode("path", name),
15949		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
15950		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
15951	}
15952
15953	const APIVersion = "2021-01-15"
15954	queryParameters := map[string]interface{}{
15955		"api-version": APIVersion,
15956	}
15957
15958	preparer := autorest.CreatePreparer(
15959		autorest.AsGet(),
15960		autorest.WithBaseURL(client.BaseURI),
15961		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}", pathParameters),
15962		autorest.WithQueryParameters(queryParameters))
15963	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15964}
15965
15966// GetSiteConnectionStringKeyVaultReferenceSender sends the GetSiteConnectionStringKeyVaultReference request. The method will close the
15967// http.Response Body if it receives an error.
15968func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSender(req *http.Request) (*http.Response, error) {
15969	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15970}
15971
15972// GetSiteConnectionStringKeyVaultReferenceResponder handles the response to the GetSiteConnectionStringKeyVaultReference request. The method always
15973// closes the http.Response Body.
15974func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceResponder(resp *http.Response) (result APIKVReference, err error) {
15975	err = autorest.Respond(
15976		resp,
15977		azure.WithErrorUnlessStatusCode(http.StatusOK),
15978		autorest.ByUnmarshallingJSON(&result),
15979		autorest.ByClosing())
15980	result.Response = autorest.Response{Response: resp}
15981	return
15982}
15983
15984// GetSiteConnectionStringKeyVaultReferences description for Gets the config reference app settings and status of an
15985// app
15986// Parameters:
15987// resourceGroupName - name of the resource group to which the resource belongs.
15988// name - name of the app.
15989func (client AppsClient) GetSiteConnectionStringKeyVaultReferences(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionPage, err error) {
15990	if tracing.IsEnabled() {
15991		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferences")
15992		defer func() {
15993			sc := -1
15994			if result.arc.Response.Response != nil {
15995				sc = result.arc.Response.Response.StatusCode
15996			}
15997			tracing.EndSpan(ctx, sc, err)
15998		}()
15999	}
16000	if err := validation.Validate([]validation.Validation{
16001		{TargetValue: resourceGroupName,
16002			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16003				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16004				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16005		return result, validation.NewError("web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", err.Error())
16006	}
16007
16008	result.fn = client.getSiteConnectionStringKeyVaultReferencesNextResults
16009	req, err := client.GetSiteConnectionStringKeyVaultReferencesPreparer(ctx, resourceGroupName, name)
16010	if err != nil {
16011		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", nil, "Failure preparing request")
16012		return
16013	}
16014
16015	resp, err := client.GetSiteConnectionStringKeyVaultReferencesSender(req)
16016	if err != nil {
16017		result.arc.Response = autorest.Response{Response: resp}
16018		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", resp, "Failure sending request")
16019		return
16020	}
16021
16022	result.arc, err = client.GetSiteConnectionStringKeyVaultReferencesResponder(resp)
16023	if err != nil {
16024		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferences", resp, "Failure responding to request")
16025		return
16026	}
16027	if result.arc.hasNextLink() && result.arc.IsEmpty() {
16028		err = result.NextWithContext(ctx)
16029		return
16030	}
16031
16032	return
16033}
16034
16035// GetSiteConnectionStringKeyVaultReferencesPreparer prepares the GetSiteConnectionStringKeyVaultReferences request.
16036func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16037	pathParameters := map[string]interface{}{
16038		"name":              autorest.Encode("path", name),
16039		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16040		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16041	}
16042
16043	const APIVersion = "2021-01-15"
16044	queryParameters := map[string]interface{}{
16045		"api-version": APIVersion,
16046	}
16047
16048	preparer := autorest.CreatePreparer(
16049		autorest.AsGet(),
16050		autorest.WithBaseURL(client.BaseURI),
16051		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings", pathParameters),
16052		autorest.WithQueryParameters(queryParameters))
16053	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16054}
16055
16056// GetSiteConnectionStringKeyVaultReferencesSender sends the GetSiteConnectionStringKeyVaultReferences request. The method will close the
16057// http.Response Body if it receives an error.
16058func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSender(req *http.Request) (*http.Response, error) {
16059	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16060}
16061
16062// GetSiteConnectionStringKeyVaultReferencesResponder handles the response to the GetSiteConnectionStringKeyVaultReferences request. The method always
16063// closes the http.Response Body.
16064func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesResponder(resp *http.Response) (result APIKVReferenceCollection, err error) {
16065	err = autorest.Respond(
16066		resp,
16067		azure.WithErrorUnlessStatusCode(http.StatusOK),
16068		autorest.ByUnmarshallingJSON(&result),
16069		autorest.ByClosing())
16070	result.Response = autorest.Response{Response: resp}
16071	return
16072}
16073
16074// getSiteConnectionStringKeyVaultReferencesNextResults retrieves the next set of results, if any.
16075func (client AppsClient) getSiteConnectionStringKeyVaultReferencesNextResults(ctx context.Context, lastResults APIKVReferenceCollection) (result APIKVReferenceCollection, err error) {
16076	req, err := lastResults.aPIKVReferenceCollectionPreparer(ctx)
16077	if err != nil {
16078		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", nil, "Failure preparing next results request")
16079	}
16080	if req == nil {
16081		return
16082	}
16083	resp, err := client.GetSiteConnectionStringKeyVaultReferencesSender(req)
16084	if err != nil {
16085		result.Response = autorest.Response{Response: resp}
16086		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", resp, "Failure sending next results request")
16087	}
16088	result, err = client.GetSiteConnectionStringKeyVaultReferencesResponder(resp)
16089	if err != nil {
16090		err = autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesNextResults", resp, "Failure responding to next results request")
16091	}
16092	return
16093}
16094
16095// GetSiteConnectionStringKeyVaultReferencesComplete enumerates all values, automatically crossing page boundaries as required.
16096func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesComplete(ctx context.Context, resourceGroupName string, name string) (result APIKVReferenceCollectionIterator, err error) {
16097	if tracing.IsEnabled() {
16098		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferences")
16099		defer func() {
16100			sc := -1
16101			if result.Response().Response.Response != nil {
16102				sc = result.page.Response().Response.Response.StatusCode
16103			}
16104			tracing.EndSpan(ctx, sc, err)
16105		}()
16106	}
16107	result.page, err = client.GetSiteConnectionStringKeyVaultReferences(ctx, resourceGroupName, name)
16108	return
16109}
16110
16111// GetSiteConnectionStringKeyVaultReferenceSlot description for Gets the config reference and status of an app
16112// Parameters:
16113// resourceGroupName - name of the resource group to which the resource belongs.
16114// name - name of the app.
16115func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSlot(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string) (result APIKVReference, err error) {
16116	if tracing.IsEnabled() {
16117		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferenceSlot")
16118		defer func() {
16119			sc := -1
16120			if result.Response.Response != nil {
16121				sc = result.Response.Response.StatusCode
16122			}
16123			tracing.EndSpan(ctx, sc, err)
16124		}()
16125	}
16126	if err := validation.Validate([]validation.Validation{
16127		{TargetValue: resourceGroupName,
16128			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16129				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16130				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16131		return result, validation.NewError("web.AppsClient", "GetSiteConnectionStringKeyVaultReferenceSlot", err.Error())
16132	}
16133
16134	req, err := client.GetSiteConnectionStringKeyVaultReferenceSlotPreparer(ctx, resourceGroupName, name, connectionStringKey, slot)
16135	if err != nil {
16136		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferenceSlot", nil, "Failure preparing request")
16137		return
16138	}
16139
16140	resp, err := client.GetSiteConnectionStringKeyVaultReferenceSlotSender(req)
16141	if err != nil {
16142		result.Response = autorest.Response{Response: resp}
16143		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferenceSlot", resp, "Failure sending request")
16144		return
16145	}
16146
16147	result, err = client.GetSiteConnectionStringKeyVaultReferenceSlotResponder(resp)
16148	if err != nil {
16149		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferenceSlot", resp, "Failure responding to request")
16150		return
16151	}
16152
16153	return
16154}
16155
16156// GetSiteConnectionStringKeyVaultReferenceSlotPreparer prepares the GetSiteConnectionStringKeyVaultReferenceSlot request.
16157func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionStringKey string, slot string) (*http.Request, error) {
16158	pathParameters := map[string]interface{}{
16159		"connectionStringKey": autorest.Encode("path", connectionStringKey),
16160		"name":                autorest.Encode("path", name),
16161		"resourceGroupName":   autorest.Encode("path", resourceGroupName),
16162		"slot":                autorest.Encode("path", slot),
16163		"subscriptionId":      autorest.Encode("path", client.SubscriptionID),
16164	}
16165
16166	const APIVersion = "2021-01-15"
16167	queryParameters := map[string]interface{}{
16168		"api-version": APIVersion,
16169	}
16170
16171	preparer := autorest.CreatePreparer(
16172		autorest.AsGet(),
16173		autorest.WithBaseURL(client.BaseURI),
16174		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}", pathParameters),
16175		autorest.WithQueryParameters(queryParameters))
16176	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16177}
16178
16179// GetSiteConnectionStringKeyVaultReferenceSlotSender sends the GetSiteConnectionStringKeyVaultReferenceSlot request. The method will close the
16180// http.Response Body if it receives an error.
16181func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSlotSender(req *http.Request) (*http.Response, error) {
16182	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16183}
16184
16185// GetSiteConnectionStringKeyVaultReferenceSlotResponder handles the response to the GetSiteConnectionStringKeyVaultReferenceSlot request. The method always
16186// closes the http.Response Body.
16187func (client AppsClient) GetSiteConnectionStringKeyVaultReferenceSlotResponder(resp *http.Response) (result APIKVReference, err error) {
16188	err = autorest.Respond(
16189		resp,
16190		azure.WithErrorUnlessStatusCode(http.StatusOK),
16191		autorest.ByUnmarshallingJSON(&result),
16192		autorest.ByClosing())
16193	result.Response = autorest.Response{Response: resp}
16194	return
16195}
16196
16197// GetSiteConnectionStringKeyVaultReferencesSlot description for Gets the config reference app settings and status of
16198// an app
16199// Parameters:
16200// resourceGroupName - name of the resource group to which the resource belongs.
16201// name - name of the app.
16202func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result APIKVReferenceCollectionPage, err error) {
16203	if tracing.IsEnabled() {
16204		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferencesSlot")
16205		defer func() {
16206			sc := -1
16207			if result.arc.Response.Response != nil {
16208				sc = result.arc.Response.Response.StatusCode
16209			}
16210			tracing.EndSpan(ctx, sc, err)
16211		}()
16212	}
16213	if err := validation.Validate([]validation.Validation{
16214		{TargetValue: resourceGroupName,
16215			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16216				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16217				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16218		return result, validation.NewError("web.AppsClient", "GetSiteConnectionStringKeyVaultReferencesSlot", err.Error())
16219	}
16220
16221	result.fn = client.getSiteConnectionStringKeyVaultReferencesSlotNextResults
16222	req, err := client.GetSiteConnectionStringKeyVaultReferencesSlotPreparer(ctx, resourceGroupName, name, slot)
16223	if err != nil {
16224		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferencesSlot", nil, "Failure preparing request")
16225		return
16226	}
16227
16228	resp, err := client.GetSiteConnectionStringKeyVaultReferencesSlotSender(req)
16229	if err != nil {
16230		result.arc.Response = autorest.Response{Response: resp}
16231		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferencesSlot", resp, "Failure sending request")
16232		return
16233	}
16234
16235	result.arc, err = client.GetSiteConnectionStringKeyVaultReferencesSlotResponder(resp)
16236	if err != nil {
16237		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteConnectionStringKeyVaultReferencesSlot", resp, "Failure responding to request")
16238		return
16239	}
16240	if result.arc.hasNextLink() && result.arc.IsEmpty() {
16241		err = result.NextWithContext(ctx)
16242		return
16243	}
16244
16245	return
16246}
16247
16248// GetSiteConnectionStringKeyVaultReferencesSlotPreparer prepares the GetSiteConnectionStringKeyVaultReferencesSlot request.
16249func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16250	pathParameters := map[string]interface{}{
16251		"name":              autorest.Encode("path", name),
16252		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16253		"slot":              autorest.Encode("path", slot),
16254		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16255	}
16256
16257	const APIVersion = "2021-01-15"
16258	queryParameters := map[string]interface{}{
16259		"api-version": APIVersion,
16260	}
16261
16262	preparer := autorest.CreatePreparer(
16263		autorest.AsGet(),
16264		autorest.WithBaseURL(client.BaseURI),
16265		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings", pathParameters),
16266		autorest.WithQueryParameters(queryParameters))
16267	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16268}
16269
16270// GetSiteConnectionStringKeyVaultReferencesSlotSender sends the GetSiteConnectionStringKeyVaultReferencesSlot request. The method will close the
16271// http.Response Body if it receives an error.
16272func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSlotSender(req *http.Request) (*http.Response, error) {
16273	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16274}
16275
16276// GetSiteConnectionStringKeyVaultReferencesSlotResponder handles the response to the GetSiteConnectionStringKeyVaultReferencesSlot request. The method always
16277// closes the http.Response Body.
16278func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSlotResponder(resp *http.Response) (result APIKVReferenceCollection, err error) {
16279	err = autorest.Respond(
16280		resp,
16281		azure.WithErrorUnlessStatusCode(http.StatusOK),
16282		autorest.ByUnmarshallingJSON(&result),
16283		autorest.ByClosing())
16284	result.Response = autorest.Response{Response: resp}
16285	return
16286}
16287
16288// getSiteConnectionStringKeyVaultReferencesSlotNextResults retrieves the next set of results, if any.
16289func (client AppsClient) getSiteConnectionStringKeyVaultReferencesSlotNextResults(ctx context.Context, lastResults APIKVReferenceCollection) (result APIKVReferenceCollection, err error) {
16290	req, err := lastResults.aPIKVReferenceCollectionPreparer(ctx)
16291	if err != nil {
16292		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesSlotNextResults", nil, "Failure preparing next results request")
16293	}
16294	if req == nil {
16295		return
16296	}
16297	resp, err := client.GetSiteConnectionStringKeyVaultReferencesSlotSender(req)
16298	if err != nil {
16299		result.Response = autorest.Response{Response: resp}
16300		return result, autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesSlotNextResults", resp, "Failure sending next results request")
16301	}
16302	result, err = client.GetSiteConnectionStringKeyVaultReferencesSlotResponder(resp)
16303	if err != nil {
16304		err = autorest.NewErrorWithError(err, "web.AppsClient", "getSiteConnectionStringKeyVaultReferencesSlotNextResults", resp, "Failure responding to next results request")
16305	}
16306	return
16307}
16308
16309// GetSiteConnectionStringKeyVaultReferencesSlotComplete enumerates all values, automatically crossing page boundaries as required.
16310func (client AppsClient) GetSiteConnectionStringKeyVaultReferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result APIKVReferenceCollectionIterator, err error) {
16311	if tracing.IsEnabled() {
16312		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteConnectionStringKeyVaultReferencesSlot")
16313		defer func() {
16314			sc := -1
16315			if result.Response().Response.Response != nil {
16316				sc = result.page.Response().Response.Response.StatusCode
16317			}
16318			tracing.EndSpan(ctx, sc, err)
16319		}()
16320	}
16321	result.page, err = client.GetSiteConnectionStringKeyVaultReferencesSlot(ctx, resourceGroupName, name, slot)
16322	return
16323}
16324
16325// GetSiteExtension description for Get site extension information by its ID for a web site, or a deployment slot.
16326// Parameters:
16327// resourceGroupName - name of the resource group to which the resource belongs.
16328// name - site name.
16329// siteExtensionID - site extension name.
16330func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) {
16331	if tracing.IsEnabled() {
16332		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension")
16333		defer func() {
16334			sc := -1
16335			if result.Response.Response != nil {
16336				sc = result.Response.Response.StatusCode
16337			}
16338			tracing.EndSpan(ctx, sc, err)
16339		}()
16340	}
16341	if err := validation.Validate([]validation.Validation{
16342		{TargetValue: resourceGroupName,
16343			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16344				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16345				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16346		return result, validation.NewError("web.AppsClient", "GetSiteExtension", err.Error())
16347	}
16348
16349	req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
16350	if err != nil {
16351		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request")
16352		return
16353	}
16354
16355	resp, err := client.GetSiteExtensionSender(req)
16356	if err != nil {
16357		result.Response = autorest.Response{Response: resp}
16358		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request")
16359		return
16360	}
16361
16362	result, err = client.GetSiteExtensionResponder(resp)
16363	if err != nil {
16364		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request")
16365		return
16366	}
16367
16368	return
16369}
16370
16371// GetSiteExtensionPreparer prepares the GetSiteExtension request.
16372func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
16373	pathParameters := map[string]interface{}{
16374		"name":              autorest.Encode("path", name),
16375		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16376		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
16377		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16378	}
16379
16380	const APIVersion = "2021-01-15"
16381	queryParameters := map[string]interface{}{
16382		"api-version": APIVersion,
16383	}
16384
16385	preparer := autorest.CreatePreparer(
16386		autorest.AsGet(),
16387		autorest.WithBaseURL(client.BaseURI),
16388		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
16389		autorest.WithQueryParameters(queryParameters))
16390	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16391}
16392
16393// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the
16394// http.Response Body if it receives an error.
16395func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) {
16396	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16397}
16398
16399// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always
16400// closes the http.Response Body.
16401func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
16402	err = autorest.Respond(
16403		resp,
16404		azure.WithErrorUnlessStatusCode(http.StatusOK),
16405		autorest.ByUnmarshallingJSON(&result),
16406		autorest.ByClosing())
16407	result.Response = autorest.Response{Response: resp}
16408	return
16409}
16410
16411// GetSiteExtensionSlot description for Get site extension information by its ID for a web site, or a deployment slot.
16412// Parameters:
16413// resourceGroupName - name of the resource group to which the resource belongs.
16414// name - site name.
16415// siteExtensionID - site extension name.
16416// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
16417func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) {
16418	if tracing.IsEnabled() {
16419		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot")
16420		defer func() {
16421			sc := -1
16422			if result.Response.Response != nil {
16423				sc = result.Response.Response.StatusCode
16424			}
16425			tracing.EndSpan(ctx, sc, err)
16426		}()
16427	}
16428	if err := validation.Validate([]validation.Validation{
16429		{TargetValue: resourceGroupName,
16430			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16431				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16432				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16433		return result, validation.NewError("web.AppsClient", "GetSiteExtensionSlot", err.Error())
16434	}
16435
16436	req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
16437	if err != nil {
16438		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request")
16439		return
16440	}
16441
16442	resp, err := client.GetSiteExtensionSlotSender(req)
16443	if err != nil {
16444		result.Response = autorest.Response{Response: resp}
16445		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request")
16446		return
16447	}
16448
16449	result, err = client.GetSiteExtensionSlotResponder(resp)
16450	if err != nil {
16451		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request")
16452		return
16453	}
16454
16455	return
16456}
16457
16458// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request.
16459func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
16460	pathParameters := map[string]interface{}{
16461		"name":              autorest.Encode("path", name),
16462		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16463		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
16464		"slot":              autorest.Encode("path", slot),
16465		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16466	}
16467
16468	const APIVersion = "2021-01-15"
16469	queryParameters := map[string]interface{}{
16470		"api-version": APIVersion,
16471	}
16472
16473	preparer := autorest.CreatePreparer(
16474		autorest.AsGet(),
16475		autorest.WithBaseURL(client.BaseURI),
16476		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
16477		autorest.WithQueryParameters(queryParameters))
16478	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16479}
16480
16481// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the
16482// http.Response Body if it receives an error.
16483func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) {
16484	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16485}
16486
16487// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always
16488// closes the http.Response Body.
16489func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
16490	err = autorest.Respond(
16491		resp,
16492		azure.WithErrorUnlessStatusCode(http.StatusOK),
16493		autorest.ByUnmarshallingJSON(&result),
16494		autorest.ByClosing())
16495	result.Response = autorest.Response{Response: resp}
16496	return
16497}
16498
16499// GetSitePhpErrorLogFlag description for Gets web app's event logs.
16500// Parameters:
16501// resourceGroupName - name of the resource group to which the resource belongs.
16502// name - name of web app.
16503func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) {
16504	if tracing.IsEnabled() {
16505		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag")
16506		defer func() {
16507			sc := -1
16508			if result.Response.Response != nil {
16509				sc = result.Response.Response.StatusCode
16510			}
16511			tracing.EndSpan(ctx, sc, err)
16512		}()
16513	}
16514	if err := validation.Validate([]validation.Validation{
16515		{TargetValue: resourceGroupName,
16516			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16517				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16518				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16519		return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlag", err.Error())
16520	}
16521
16522	req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name)
16523	if err != nil {
16524		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request")
16525		return
16526	}
16527
16528	resp, err := client.GetSitePhpErrorLogFlagSender(req)
16529	if err != nil {
16530		result.Response = autorest.Response{Response: resp}
16531		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request")
16532		return
16533	}
16534
16535	result, err = client.GetSitePhpErrorLogFlagResponder(resp)
16536	if err != nil {
16537		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request")
16538		return
16539	}
16540
16541	return
16542}
16543
16544// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request.
16545func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16546	pathParameters := map[string]interface{}{
16547		"name":              autorest.Encode("path", name),
16548		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16549		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16550	}
16551
16552	const APIVersion = "2021-01-15"
16553	queryParameters := map[string]interface{}{
16554		"api-version": APIVersion,
16555	}
16556
16557	preparer := autorest.CreatePreparer(
16558		autorest.AsGet(),
16559		autorest.WithBaseURL(client.BaseURI),
16560		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters),
16561		autorest.WithQueryParameters(queryParameters))
16562	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16563}
16564
16565// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the
16566// http.Response Body if it receives an error.
16567func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) {
16568	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16569}
16570
16571// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always
16572// closes the http.Response Body.
16573func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) {
16574	err = autorest.Respond(
16575		resp,
16576		azure.WithErrorUnlessStatusCode(http.StatusOK),
16577		autorest.ByUnmarshallingJSON(&result),
16578		autorest.ByClosing())
16579	result.Response = autorest.Response{Response: resp}
16580	return
16581}
16582
16583// GetSitePhpErrorLogFlagSlot description for Gets web app's event logs.
16584// Parameters:
16585// resourceGroupName - name of the resource group to which the resource belongs.
16586// name - name of web app.
16587// slot - name of web app slot. If not specified then will default to production slot.
16588func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) {
16589	if tracing.IsEnabled() {
16590		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot")
16591		defer func() {
16592			sc := -1
16593			if result.Response.Response != nil {
16594				sc = result.Response.Response.StatusCode
16595			}
16596			tracing.EndSpan(ctx, sc, err)
16597		}()
16598	}
16599	if err := validation.Validate([]validation.Validation{
16600		{TargetValue: resourceGroupName,
16601			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16602				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16603				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16604		return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlagSlot", err.Error())
16605	}
16606
16607	req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot)
16608	if err != nil {
16609		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request")
16610		return
16611	}
16612
16613	resp, err := client.GetSitePhpErrorLogFlagSlotSender(req)
16614	if err != nil {
16615		result.Response = autorest.Response{Response: resp}
16616		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request")
16617		return
16618	}
16619
16620	result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp)
16621	if err != nil {
16622		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request")
16623		return
16624	}
16625
16626	return
16627}
16628
16629// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request.
16630func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16631	pathParameters := map[string]interface{}{
16632		"name":              autorest.Encode("path", name),
16633		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16634		"slot":              autorest.Encode("path", slot),
16635		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16636	}
16637
16638	const APIVersion = "2021-01-15"
16639	queryParameters := map[string]interface{}{
16640		"api-version": APIVersion,
16641	}
16642
16643	preparer := autorest.CreatePreparer(
16644		autorest.AsGet(),
16645		autorest.WithBaseURL(client.BaseURI),
16646		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters),
16647		autorest.WithQueryParameters(queryParameters))
16648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16649}
16650
16651// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the
16652// http.Response Body if it receives an error.
16653func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) {
16654	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16655}
16656
16657// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always
16658// closes the http.Response Body.
16659func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) {
16660	err = autorest.Respond(
16661		resp,
16662		azure.WithErrorUnlessStatusCode(http.StatusOK),
16663		autorest.ByUnmarshallingJSON(&result),
16664		autorest.ByClosing())
16665	result.Response = autorest.Response{Response: resp}
16666	return
16667}
16668
16669// GetSlot description for Gets the details of a web, mobile, or API app.
16670// Parameters:
16671// resourceGroupName - name of the resource group to which the resource belongs.
16672// name - name of the app.
16673// slot - name of the deployment slot. By default, this API returns the production slot.
16674func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) {
16675	if tracing.IsEnabled() {
16676		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot")
16677		defer func() {
16678			sc := -1
16679			if result.Response.Response != nil {
16680				sc = result.Response.Response.StatusCode
16681			}
16682			tracing.EndSpan(ctx, sc, err)
16683		}()
16684	}
16685	if err := validation.Validate([]validation.Validation{
16686		{TargetValue: resourceGroupName,
16687			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16688				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16689				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16690		return result, validation.NewError("web.AppsClient", "GetSlot", err.Error())
16691	}
16692
16693	req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot)
16694	if err != nil {
16695		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request")
16696		return
16697	}
16698
16699	resp, err := client.GetSlotSender(req)
16700	if err != nil {
16701		result.Response = autorest.Response{Response: resp}
16702		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request")
16703		return
16704	}
16705
16706	result, err = client.GetSlotResponder(resp)
16707	if err != nil {
16708		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request")
16709		return
16710	}
16711
16712	return
16713}
16714
16715// GetSlotPreparer prepares the GetSlot request.
16716func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16717	pathParameters := map[string]interface{}{
16718		"name":              autorest.Encode("path", name),
16719		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16720		"slot":              autorest.Encode("path", slot),
16721		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16722	}
16723
16724	const APIVersion = "2021-01-15"
16725	queryParameters := map[string]interface{}{
16726		"api-version": APIVersion,
16727	}
16728
16729	preparer := autorest.CreatePreparer(
16730		autorest.AsGet(),
16731		autorest.WithBaseURL(client.BaseURI),
16732		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
16733		autorest.WithQueryParameters(queryParameters))
16734	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16735}
16736
16737// GetSlotSender sends the GetSlot request. The method will close the
16738// http.Response Body if it receives an error.
16739func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) {
16740	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16741}
16742
16743// GetSlotResponder handles the response to the GetSlot request. The method always
16744// closes the http.Response Body.
16745func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) {
16746	err = autorest.Respond(
16747		resp,
16748		azure.WithErrorUnlessStatusCode(http.StatusOK),
16749		autorest.ByUnmarshallingJSON(&result),
16750		autorest.ByClosing())
16751	result.Response = autorest.Response{Response: resp}
16752	return
16753}
16754
16755// GetSourceControl description for Gets the source control configuration of an app.
16756// Parameters:
16757// resourceGroupName - name of the resource group to which the resource belongs.
16758// name - name of the app.
16759func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) {
16760	if tracing.IsEnabled() {
16761		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl")
16762		defer func() {
16763			sc := -1
16764			if result.Response.Response != nil {
16765				sc = result.Response.Response.StatusCode
16766			}
16767			tracing.EndSpan(ctx, sc, err)
16768		}()
16769	}
16770	if err := validation.Validate([]validation.Validation{
16771		{TargetValue: resourceGroupName,
16772			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16773				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16774				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16775		return result, validation.NewError("web.AppsClient", "GetSourceControl", err.Error())
16776	}
16777
16778	req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name)
16779	if err != nil {
16780		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request")
16781		return
16782	}
16783
16784	resp, err := client.GetSourceControlSender(req)
16785	if err != nil {
16786		result.Response = autorest.Response{Response: resp}
16787		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request")
16788		return
16789	}
16790
16791	result, err = client.GetSourceControlResponder(resp)
16792	if err != nil {
16793		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request")
16794		return
16795	}
16796
16797	return
16798}
16799
16800// GetSourceControlPreparer prepares the GetSourceControl request.
16801func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16802	pathParameters := map[string]interface{}{
16803		"name":              autorest.Encode("path", name),
16804		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16805		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16806	}
16807
16808	const APIVersion = "2021-01-15"
16809	queryParameters := map[string]interface{}{
16810		"api-version": APIVersion,
16811	}
16812
16813	preparer := autorest.CreatePreparer(
16814		autorest.AsGet(),
16815		autorest.WithBaseURL(client.BaseURI),
16816		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
16817		autorest.WithQueryParameters(queryParameters))
16818	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16819}
16820
16821// GetSourceControlSender sends the GetSourceControl request. The method will close the
16822// http.Response Body if it receives an error.
16823func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) {
16824	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16825}
16826
16827// GetSourceControlResponder handles the response to the GetSourceControl request. The method always
16828// closes the http.Response Body.
16829func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
16830	err = autorest.Respond(
16831		resp,
16832		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
16833		autorest.ByUnmarshallingJSON(&result),
16834		autorest.ByClosing())
16835	result.Response = autorest.Response{Response: resp}
16836	return
16837}
16838
16839// GetSourceControlSlot description for Gets the source control configuration of an app.
16840// Parameters:
16841// resourceGroupName - name of the resource group to which the resource belongs.
16842// name - name of the app.
16843// slot - name of the deployment slot. If a slot is not specified, the API will get the source control
16844// configuration for the production slot.
16845func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) {
16846	if tracing.IsEnabled() {
16847		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot")
16848		defer func() {
16849			sc := -1
16850			if result.Response.Response != nil {
16851				sc = result.Response.Response.StatusCode
16852			}
16853			tracing.EndSpan(ctx, sc, err)
16854		}()
16855	}
16856	if err := validation.Validate([]validation.Validation{
16857		{TargetValue: resourceGroupName,
16858			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16859				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16860				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16861		return result, validation.NewError("web.AppsClient", "GetSourceControlSlot", err.Error())
16862	}
16863
16864	req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot)
16865	if err != nil {
16866		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request")
16867		return
16868	}
16869
16870	resp, err := client.GetSourceControlSlotSender(req)
16871	if err != nil {
16872		result.Response = autorest.Response{Response: resp}
16873		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request")
16874		return
16875	}
16876
16877	result, err = client.GetSourceControlSlotResponder(resp)
16878	if err != nil {
16879		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request")
16880		return
16881	}
16882
16883	return
16884}
16885
16886// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request.
16887func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16888	pathParameters := map[string]interface{}{
16889		"name":              autorest.Encode("path", name),
16890		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16891		"slot":              autorest.Encode("path", slot),
16892		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16893	}
16894
16895	const APIVersion = "2021-01-15"
16896	queryParameters := map[string]interface{}{
16897		"api-version": APIVersion,
16898	}
16899
16900	preparer := autorest.CreatePreparer(
16901		autorest.AsGet(),
16902		autorest.WithBaseURL(client.BaseURI),
16903		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
16904		autorest.WithQueryParameters(queryParameters))
16905	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16906}
16907
16908// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the
16909// http.Response Body if it receives an error.
16910func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) {
16911	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16912}
16913
16914// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always
16915// closes the http.Response Body.
16916func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
16917	err = autorest.Respond(
16918		resp,
16919		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
16920		autorest.ByUnmarshallingJSON(&result),
16921		autorest.ByClosing())
16922	result.Response = autorest.Response{Response: resp}
16923	return
16924}
16925
16926// GetSwiftVirtualNetworkConnection description for Gets a Swift Virtual Network connection.
16927// Parameters:
16928// resourceGroupName - name of the resource group to which the resource belongs.
16929// name - name of the app.
16930func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) {
16931	if tracing.IsEnabled() {
16932		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection")
16933		defer func() {
16934			sc := -1
16935			if result.Response.Response != nil {
16936				sc = result.Response.Response.StatusCode
16937			}
16938			tracing.EndSpan(ctx, sc, err)
16939		}()
16940	}
16941	if err := validation.Validate([]validation.Validation{
16942		{TargetValue: resourceGroupName,
16943			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16944				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16945				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16946		return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnection", err.Error())
16947	}
16948
16949	req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name)
16950	if err != nil {
16951		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request")
16952		return
16953	}
16954
16955	resp, err := client.GetSwiftVirtualNetworkConnectionSender(req)
16956	if err != nil {
16957		result.Response = autorest.Response{Response: resp}
16958		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request")
16959		return
16960	}
16961
16962	result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp)
16963	if err != nil {
16964		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request")
16965		return
16966	}
16967
16968	return
16969}
16970
16971// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request.
16972func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16973	pathParameters := map[string]interface{}{
16974		"name":              autorest.Encode("path", name),
16975		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16976		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16977	}
16978
16979	const APIVersion = "2021-01-15"
16980	queryParameters := map[string]interface{}{
16981		"api-version": APIVersion,
16982	}
16983
16984	preparer := autorest.CreatePreparer(
16985		autorest.AsGet(),
16986		autorest.WithBaseURL(client.BaseURI),
16987		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
16988		autorest.WithQueryParameters(queryParameters))
16989	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16990}
16991
16992// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the
16993// http.Response Body if it receives an error.
16994func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
16995	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16996}
16997
16998// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always
16999// closes the http.Response Body.
17000func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
17001	err = autorest.Respond(
17002		resp,
17003		azure.WithErrorUnlessStatusCode(http.StatusOK),
17004		autorest.ByUnmarshallingJSON(&result),
17005		autorest.ByClosing())
17006	result.Response = autorest.Response{Response: resp}
17007	return
17008}
17009
17010// GetSwiftVirtualNetworkConnectionSlot description for Gets a Swift Virtual Network connection.
17011// Parameters:
17012// resourceGroupName - name of the resource group to which the resource belongs.
17013// name - name of the app.
17014// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the
17015// production slot's Virtual Network.
17016func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) {
17017	if tracing.IsEnabled() {
17018		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot")
17019		defer func() {
17020			sc := -1
17021			if result.Response.Response != nil {
17022				sc = result.Response.Response.StatusCode
17023			}
17024			tracing.EndSpan(ctx, sc, err)
17025		}()
17026	}
17027	if err := validation.Validate([]validation.Validation{
17028		{TargetValue: resourceGroupName,
17029			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17030				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17031				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17032		return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", err.Error())
17033	}
17034
17035	req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot)
17036	if err != nil {
17037		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
17038		return
17039	}
17040
17041	resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req)
17042	if err != nil {
17043		result.Response = autorest.Response{Response: resp}
17044		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
17045		return
17046	}
17047
17048	result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp)
17049	if err != nil {
17050		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
17051		return
17052	}
17053
17054	return
17055}
17056
17057// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request.
17058func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17059	pathParameters := map[string]interface{}{
17060		"name":              autorest.Encode("path", name),
17061		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17062		"slot":              autorest.Encode("path", slot),
17063		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17064	}
17065
17066	const APIVersion = "2021-01-15"
17067	queryParameters := map[string]interface{}{
17068		"api-version": APIVersion,
17069	}
17070
17071	preparer := autorest.CreatePreparer(
17072		autorest.AsGet(),
17073		autorest.WithBaseURL(client.BaseURI),
17074		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
17075		autorest.WithQueryParameters(queryParameters))
17076	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17077}
17078
17079// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the
17080// http.Response Body if it receives an error.
17081func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
17082	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17083}
17084
17085// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always
17086// closes the http.Response Body.
17087func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
17088	err = autorest.Respond(
17089		resp,
17090		azure.WithErrorUnlessStatusCode(http.StatusOK),
17091		autorest.ByUnmarshallingJSON(&result),
17092		autorest.ByClosing())
17093	result.Response = autorest.Response{Response: resp}
17094	return
17095}
17096
17097// GetTriggeredWebJob description for Gets a triggered web job by its ID for an app, or a deployment slot.
17098// Parameters:
17099// resourceGroupName - name of the resource group to which the resource belongs.
17100// name - site name.
17101// webJobName - name of Web Job.
17102func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) {
17103	if tracing.IsEnabled() {
17104		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob")
17105		defer func() {
17106			sc := -1
17107			if result.Response.Response != nil {
17108				sc = result.Response.Response.StatusCode
17109			}
17110			tracing.EndSpan(ctx, sc, err)
17111		}()
17112	}
17113	if err := validation.Validate([]validation.Validation{
17114		{TargetValue: resourceGroupName,
17115			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17116				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17117				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17118		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJob", err.Error())
17119	}
17120
17121	req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
17122	if err != nil {
17123		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request")
17124		return
17125	}
17126
17127	resp, err := client.GetTriggeredWebJobSender(req)
17128	if err != nil {
17129		result.Response = autorest.Response{Response: resp}
17130		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request")
17131		return
17132	}
17133
17134	result, err = client.GetTriggeredWebJobResponder(resp)
17135	if err != nil {
17136		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request")
17137		return
17138	}
17139
17140	return
17141}
17142
17143// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request.
17144func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
17145	pathParameters := map[string]interface{}{
17146		"name":              autorest.Encode("path", name),
17147		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17148		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17149		"webJobName":        autorest.Encode("path", webJobName),
17150	}
17151
17152	const APIVersion = "2021-01-15"
17153	queryParameters := map[string]interface{}{
17154		"api-version": APIVersion,
17155	}
17156
17157	preparer := autorest.CreatePreparer(
17158		autorest.AsGet(),
17159		autorest.WithBaseURL(client.BaseURI),
17160		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters),
17161		autorest.WithQueryParameters(queryParameters))
17162	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17163}
17164
17165// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the
17166// http.Response Body if it receives an error.
17167func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
17168	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17169}
17170
17171// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always
17172// closes the http.Response Body.
17173func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) {
17174	err = autorest.Respond(
17175		resp,
17176		azure.WithErrorUnlessStatusCode(http.StatusOK),
17177		autorest.ByUnmarshallingJSON(&result),
17178		autorest.ByClosing())
17179	result.Response = autorest.Response{Response: resp}
17180	return
17181}
17182
17183// GetTriggeredWebJobHistory description for Gets a triggered web job's history by its ID for an app, , or a deployment
17184// slot.
17185// Parameters:
17186// resourceGroupName - name of the resource group to which the resource belongs.
17187// name - site name.
17188// webJobName - name of Web Job.
17189// ID - history ID.
17190func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) {
17191	if tracing.IsEnabled() {
17192		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory")
17193		defer func() {
17194			sc := -1
17195			if result.Response.Response != nil {
17196				sc = result.Response.Response.StatusCode
17197			}
17198			tracing.EndSpan(ctx, sc, err)
17199		}()
17200	}
17201	if err := validation.Validate([]validation.Validation{
17202		{TargetValue: resourceGroupName,
17203			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17204				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17205				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17206		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistory", err.Error())
17207	}
17208
17209	req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID)
17210	if err != nil {
17211		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request")
17212		return
17213	}
17214
17215	resp, err := client.GetTriggeredWebJobHistorySender(req)
17216	if err != nil {
17217		result.Response = autorest.Response{Response: resp}
17218		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request")
17219		return
17220	}
17221
17222	result, err = client.GetTriggeredWebJobHistoryResponder(resp)
17223	if err != nil {
17224		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request")
17225		return
17226	}
17227
17228	return
17229}
17230
17231// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request.
17232func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) {
17233	pathParameters := map[string]interface{}{
17234		"id":                autorest.Encode("path", ID),
17235		"name":              autorest.Encode("path", name),
17236		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17237		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17238		"webJobName":        autorest.Encode("path", webJobName),
17239	}
17240
17241	const APIVersion = "2021-01-15"
17242	queryParameters := map[string]interface{}{
17243		"api-version": APIVersion,
17244	}
17245
17246	preparer := autorest.CreatePreparer(
17247		autorest.AsGet(),
17248		autorest.WithBaseURL(client.BaseURI),
17249		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters),
17250		autorest.WithQueryParameters(queryParameters))
17251	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17252}
17253
17254// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the
17255// http.Response Body if it receives an error.
17256func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) {
17257	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17258}
17259
17260// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always
17261// closes the http.Response Body.
17262func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) {
17263	err = autorest.Respond(
17264		resp,
17265		azure.WithErrorUnlessStatusCode(http.StatusOK),
17266		autorest.ByUnmarshallingJSON(&result),
17267		autorest.ByClosing())
17268	result.Response = autorest.Response{Response: resp}
17269	return
17270}
17271
17272// GetTriggeredWebJobHistorySlot description for Gets a triggered web job's history by its ID for an app, , or a
17273// deployment slot.
17274// Parameters:
17275// resourceGroupName - name of the resource group to which the resource belongs.
17276// name - site name.
17277// webJobName - name of Web Job.
17278// ID - history ID.
17279// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
17280func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) {
17281	if tracing.IsEnabled() {
17282		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot")
17283		defer func() {
17284			sc := -1
17285			if result.Response.Response != nil {
17286				sc = result.Response.Response.StatusCode
17287			}
17288			tracing.EndSpan(ctx, sc, err)
17289		}()
17290	}
17291	if err := validation.Validate([]validation.Validation{
17292		{TargetValue: resourceGroupName,
17293			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17294				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17295				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17296		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistorySlot", err.Error())
17297	}
17298
17299	req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot)
17300	if err != nil {
17301		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request")
17302		return
17303	}
17304
17305	resp, err := client.GetTriggeredWebJobHistorySlotSender(req)
17306	if err != nil {
17307		result.Response = autorest.Response{Response: resp}
17308		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request")
17309		return
17310	}
17311
17312	result, err = client.GetTriggeredWebJobHistorySlotResponder(resp)
17313	if err != nil {
17314		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request")
17315		return
17316	}
17317
17318	return
17319}
17320
17321// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request.
17322func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) {
17323	pathParameters := map[string]interface{}{
17324		"id":                autorest.Encode("path", ID),
17325		"name":              autorest.Encode("path", name),
17326		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17327		"slot":              autorest.Encode("path", slot),
17328		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17329		"webJobName":        autorest.Encode("path", webJobName),
17330	}
17331
17332	const APIVersion = "2021-01-15"
17333	queryParameters := map[string]interface{}{
17334		"api-version": APIVersion,
17335	}
17336
17337	preparer := autorest.CreatePreparer(
17338		autorest.AsGet(),
17339		autorest.WithBaseURL(client.BaseURI),
17340		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters),
17341		autorest.WithQueryParameters(queryParameters))
17342	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17343}
17344
17345// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the
17346// http.Response Body if it receives an error.
17347func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) {
17348	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17349}
17350
17351// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always
17352// closes the http.Response Body.
17353func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) {
17354	err = autorest.Respond(
17355		resp,
17356		azure.WithErrorUnlessStatusCode(http.StatusOK),
17357		autorest.ByUnmarshallingJSON(&result),
17358		autorest.ByClosing())
17359	result.Response = autorest.Response{Response: resp}
17360	return
17361}
17362
17363// GetTriggeredWebJobSlot description for Gets a triggered web job by its ID for an app, or a deployment slot.
17364// Parameters:
17365// resourceGroupName - name of the resource group to which the resource belongs.
17366// name - site name.
17367// webJobName - name of Web Job.
17368// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
17369func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) {
17370	if tracing.IsEnabled() {
17371		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot")
17372		defer func() {
17373			sc := -1
17374			if result.Response.Response != nil {
17375				sc = result.Response.Response.StatusCode
17376			}
17377			tracing.EndSpan(ctx, sc, err)
17378		}()
17379	}
17380	if err := validation.Validate([]validation.Validation{
17381		{TargetValue: resourceGroupName,
17382			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17383				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17384				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17385		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobSlot", err.Error())
17386	}
17387
17388	req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
17389	if err != nil {
17390		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request")
17391		return
17392	}
17393
17394	resp, err := client.GetTriggeredWebJobSlotSender(req)
17395	if err != nil {
17396		result.Response = autorest.Response{Response: resp}
17397		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request")
17398		return
17399	}
17400
17401	result, err = client.GetTriggeredWebJobSlotResponder(resp)
17402	if err != nil {
17403		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request")
17404		return
17405	}
17406
17407	return
17408}
17409
17410// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request.
17411func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
17412	pathParameters := map[string]interface{}{
17413		"name":              autorest.Encode("path", name),
17414		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17415		"slot":              autorest.Encode("path", slot),
17416		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17417		"webJobName":        autorest.Encode("path", webJobName),
17418	}
17419
17420	const APIVersion = "2021-01-15"
17421	queryParameters := map[string]interface{}{
17422		"api-version": APIVersion,
17423	}
17424
17425	preparer := autorest.CreatePreparer(
17426		autorest.AsGet(),
17427		autorest.WithBaseURL(client.BaseURI),
17428		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters),
17429		autorest.WithQueryParameters(queryParameters))
17430	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17431}
17432
17433// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the
17434// http.Response Body if it receives an error.
17435func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
17436	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17437}
17438
17439// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always
17440// closes the http.Response Body.
17441func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) {
17442	err = autorest.Respond(
17443		resp,
17444		azure.WithErrorUnlessStatusCode(http.StatusOK),
17445		autorest.ByUnmarshallingJSON(&result),
17446		autorest.ByClosing())
17447	result.Response = autorest.Response{Response: resp}
17448	return
17449}
17450
17451// GetVnetConnection description for Gets a virtual network the app (or deployment slot) is connected to by name.
17452// Parameters:
17453// resourceGroupName - name of the resource group to which the resource belongs.
17454// name - name of the app.
17455// vnetName - name of the virtual network.
17456func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) {
17457	if tracing.IsEnabled() {
17458		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection")
17459		defer func() {
17460			sc := -1
17461			if result.Response.Response != nil {
17462				sc = result.Response.Response.StatusCode
17463			}
17464			tracing.EndSpan(ctx, sc, err)
17465		}()
17466	}
17467	if err := validation.Validate([]validation.Validation{
17468		{TargetValue: resourceGroupName,
17469			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17470				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17471				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17472		return result, validation.NewError("web.AppsClient", "GetVnetConnection", err.Error())
17473	}
17474
17475	req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName)
17476	if err != nil {
17477		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request")
17478		return
17479	}
17480
17481	resp, err := client.GetVnetConnectionSender(req)
17482	if err != nil {
17483		result.Response = autorest.Response{Response: resp}
17484		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request")
17485		return
17486	}
17487
17488	result, err = client.GetVnetConnectionResponder(resp)
17489	if err != nil {
17490		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request")
17491		return
17492	}
17493
17494	return
17495}
17496
17497// GetVnetConnectionPreparer prepares the GetVnetConnection request.
17498func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) {
17499	pathParameters := map[string]interface{}{
17500		"name":              autorest.Encode("path", name),
17501		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17502		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17503		"vnetName":          autorest.Encode("path", vnetName),
17504	}
17505
17506	const APIVersion = "2021-01-15"
17507	queryParameters := map[string]interface{}{
17508		"api-version": APIVersion,
17509	}
17510
17511	preparer := autorest.CreatePreparer(
17512		autorest.AsGet(),
17513		autorest.WithBaseURL(client.BaseURI),
17514		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
17515		autorest.WithQueryParameters(queryParameters))
17516	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17517}
17518
17519// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the
17520// http.Response Body if it receives an error.
17521func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) {
17522	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17523}
17524
17525// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always
17526// closes the http.Response Body.
17527func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
17528	err = autorest.Respond(
17529		resp,
17530		azure.WithErrorUnlessStatusCode(http.StatusOK),
17531		autorest.ByUnmarshallingJSON(&result),
17532		autorest.ByClosing())
17533	result.Response = autorest.Response{Response: resp}
17534	return
17535}
17536
17537// GetVnetConnectionGateway description for Gets an app's Virtual Network gateway.
17538// Parameters:
17539// resourceGroupName - name of the resource group to which the resource belongs.
17540// name - name of the app.
17541// vnetName - name of the Virtual Network.
17542// gatewayName - name of the gateway. Currently, the only supported string is "primary".
17543func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) {
17544	if tracing.IsEnabled() {
17545		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway")
17546		defer func() {
17547			sc := -1
17548			if result.Response.Response != nil {
17549				sc = result.Response.Response.StatusCode
17550			}
17551			tracing.EndSpan(ctx, sc, err)
17552		}()
17553	}
17554	if err := validation.Validate([]validation.Validation{
17555		{TargetValue: resourceGroupName,
17556			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17557				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17558				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17559		return result, validation.NewError("web.AppsClient", "GetVnetConnectionGateway", err.Error())
17560	}
17561
17562	req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName)
17563	if err != nil {
17564		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request")
17565		return
17566	}
17567
17568	resp, err := client.GetVnetConnectionGatewaySender(req)
17569	if err != nil {
17570		result.Response = autorest.Response{Response: resp}
17571		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request")
17572		return
17573	}
17574
17575	result, err = client.GetVnetConnectionGatewayResponder(resp)
17576	if err != nil {
17577		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request")
17578		return
17579	}
17580
17581	return
17582}
17583
17584// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request.
17585func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) {
17586	pathParameters := map[string]interface{}{
17587		"gatewayName":       autorest.Encode("path", gatewayName),
17588		"name":              autorest.Encode("path", name),
17589		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17590		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17591		"vnetName":          autorest.Encode("path", vnetName),
17592	}
17593
17594	const APIVersion = "2021-01-15"
17595	queryParameters := map[string]interface{}{
17596		"api-version": APIVersion,
17597	}
17598
17599	preparer := autorest.CreatePreparer(
17600		autorest.AsGet(),
17601		autorest.WithBaseURL(client.BaseURI),
17602		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
17603		autorest.WithQueryParameters(queryParameters))
17604	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17605}
17606
17607// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the
17608// http.Response Body if it receives an error.
17609func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
17610	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17611}
17612
17613// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always
17614// closes the http.Response Body.
17615func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
17616	err = autorest.Respond(
17617		resp,
17618		azure.WithErrorUnlessStatusCode(http.StatusOK),
17619		autorest.ByUnmarshallingJSON(&result),
17620		autorest.ByClosing())
17621	result.Response = autorest.Response{Response: resp}
17622	return
17623}
17624
17625// GetVnetConnectionGatewaySlot description for Gets an app's Virtual Network gateway.
17626// Parameters:
17627// resourceGroupName - name of the resource group to which the resource belongs.
17628// name - name of the app.
17629// vnetName - name of the Virtual Network.
17630// gatewayName - name of the gateway. Currently, the only supported string is "primary".
17631// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the
17632// production slot's Virtual Network.
17633func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) {
17634	if tracing.IsEnabled() {
17635		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot")
17636		defer func() {
17637			sc := -1
17638			if result.Response.Response != nil {
17639				sc = result.Response.Response.StatusCode
17640			}
17641			tracing.EndSpan(ctx, sc, err)
17642		}()
17643	}
17644	if err := validation.Validate([]validation.Validation{
17645		{TargetValue: resourceGroupName,
17646			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17647				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17648				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17649		return result, validation.NewError("web.AppsClient", "GetVnetConnectionGatewaySlot", err.Error())
17650	}
17651
17652	req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot)
17653	if err != nil {
17654		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request")
17655		return
17656	}
17657
17658	resp, err := client.GetVnetConnectionGatewaySlotSender(req)
17659	if err != nil {
17660		result.Response = autorest.Response{Response: resp}
17661		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request")
17662		return
17663	}
17664
17665	result, err = client.GetVnetConnectionGatewaySlotResponder(resp)
17666	if err != nil {
17667		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request")
17668		return
17669	}
17670
17671	return
17672}
17673
17674// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request.
17675func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) {
17676	pathParameters := map[string]interface{}{
17677		"gatewayName":       autorest.Encode("path", gatewayName),
17678		"name":              autorest.Encode("path", name),
17679		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17680		"slot":              autorest.Encode("path", slot),
17681		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17682		"vnetName":          autorest.Encode("path", vnetName),
17683	}
17684
17685	const APIVersion = "2021-01-15"
17686	queryParameters := map[string]interface{}{
17687		"api-version": APIVersion,
17688	}
17689
17690	preparer := autorest.CreatePreparer(
17691		autorest.AsGet(),
17692		autorest.WithBaseURL(client.BaseURI),
17693		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
17694		autorest.WithQueryParameters(queryParameters))
17695	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17696}
17697
17698// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the
17699// http.Response Body if it receives an error.
17700func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
17701	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17702}
17703
17704// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always
17705// closes the http.Response Body.
17706func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
17707	err = autorest.Respond(
17708		resp,
17709		azure.WithErrorUnlessStatusCode(http.StatusOK),
17710		autorest.ByUnmarshallingJSON(&result),
17711		autorest.ByClosing())
17712	result.Response = autorest.Response{Response: resp}
17713	return
17714}
17715
17716// GetVnetConnectionSlot description for Gets a virtual network the app (or deployment slot) is connected to by name.
17717// Parameters:
17718// resourceGroupName - name of the resource group to which the resource belongs.
17719// name - name of the app.
17720// vnetName - name of the virtual network.
17721// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network
17722// for the production slot.
17723func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) {
17724	if tracing.IsEnabled() {
17725		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot")
17726		defer func() {
17727			sc := -1
17728			if result.Response.Response != nil {
17729				sc = result.Response.Response.StatusCode
17730			}
17731			tracing.EndSpan(ctx, sc, err)
17732		}()
17733	}
17734	if err := validation.Validate([]validation.Validation{
17735		{TargetValue: resourceGroupName,
17736			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17737				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17738				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17739		return result, validation.NewError("web.AppsClient", "GetVnetConnectionSlot", err.Error())
17740	}
17741
17742	req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot)
17743	if err != nil {
17744		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request")
17745		return
17746	}
17747
17748	resp, err := client.GetVnetConnectionSlotSender(req)
17749	if err != nil {
17750		result.Response = autorest.Response{Response: resp}
17751		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request")
17752		return
17753	}
17754
17755	result, err = client.GetVnetConnectionSlotResponder(resp)
17756	if err != nil {
17757		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request")
17758		return
17759	}
17760
17761	return
17762}
17763
17764// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request.
17765func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) {
17766	pathParameters := map[string]interface{}{
17767		"name":              autorest.Encode("path", name),
17768		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17769		"slot":              autorest.Encode("path", slot),
17770		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17771		"vnetName":          autorest.Encode("path", vnetName),
17772	}
17773
17774	const APIVersion = "2021-01-15"
17775	queryParameters := map[string]interface{}{
17776		"api-version": APIVersion,
17777	}
17778
17779	preparer := autorest.CreatePreparer(
17780		autorest.AsGet(),
17781		autorest.WithBaseURL(client.BaseURI),
17782		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
17783		autorest.WithQueryParameters(queryParameters))
17784	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17785}
17786
17787// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the
17788// http.Response Body if it receives an error.
17789func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
17790	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17791}
17792
17793// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always
17794// closes the http.Response Body.
17795func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
17796	err = autorest.Respond(
17797		resp,
17798		azure.WithErrorUnlessStatusCode(http.StatusOK),
17799		autorest.ByUnmarshallingJSON(&result),
17800		autorest.ByClosing())
17801	result.Response = autorest.Response{Response: resp}
17802	return
17803}
17804
17805// GetWebJob description for Get webjob information for an app, or a deployment slot.
17806// Parameters:
17807// resourceGroupName - name of the resource group to which the resource belongs.
17808// name - site name.
17809// webJobName - name of the web job.
17810func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) {
17811	if tracing.IsEnabled() {
17812		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob")
17813		defer func() {
17814			sc := -1
17815			if result.Response.Response != nil {
17816				sc = result.Response.Response.StatusCode
17817			}
17818			tracing.EndSpan(ctx, sc, err)
17819		}()
17820	}
17821	if err := validation.Validate([]validation.Validation{
17822		{TargetValue: resourceGroupName,
17823			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17824				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17825				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17826		return result, validation.NewError("web.AppsClient", "GetWebJob", err.Error())
17827	}
17828
17829	req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName)
17830	if err != nil {
17831		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request")
17832		return
17833	}
17834
17835	resp, err := client.GetWebJobSender(req)
17836	if err != nil {
17837		result.Response = autorest.Response{Response: resp}
17838		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request")
17839		return
17840	}
17841
17842	result, err = client.GetWebJobResponder(resp)
17843	if err != nil {
17844		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request")
17845		return
17846	}
17847
17848	return
17849}
17850
17851// GetWebJobPreparer prepares the GetWebJob request.
17852func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
17853	pathParameters := map[string]interface{}{
17854		"name":              autorest.Encode("path", name),
17855		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17856		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17857		"webJobName":        autorest.Encode("path", webJobName),
17858	}
17859
17860	const APIVersion = "2021-01-15"
17861	queryParameters := map[string]interface{}{
17862		"api-version": APIVersion,
17863	}
17864
17865	preparer := autorest.CreatePreparer(
17866		autorest.AsGet(),
17867		autorest.WithBaseURL(client.BaseURI),
17868		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters),
17869		autorest.WithQueryParameters(queryParameters))
17870	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17871}
17872
17873// GetWebJobSender sends the GetWebJob request. The method will close the
17874// http.Response Body if it receives an error.
17875func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) {
17876	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17877}
17878
17879// GetWebJobResponder handles the response to the GetWebJob request. The method always
17880// closes the http.Response Body.
17881func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) {
17882	err = autorest.Respond(
17883		resp,
17884		azure.WithErrorUnlessStatusCode(http.StatusOK),
17885		autorest.ByUnmarshallingJSON(&result),
17886		autorest.ByClosing())
17887	result.Response = autorest.Response{Response: resp}
17888	return
17889}
17890
17891// GetWebJobSlot description for Get webjob information for an app, or a deployment slot.
17892// Parameters:
17893// resourceGroupName - name of the resource group to which the resource belongs.
17894// name - site name.
17895// webJobName - name of the web job.
17896// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
17897// production slot.
17898func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) {
17899	if tracing.IsEnabled() {
17900		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot")
17901		defer func() {
17902			sc := -1
17903			if result.Response.Response != nil {
17904				sc = result.Response.Response.StatusCode
17905			}
17906			tracing.EndSpan(ctx, sc, err)
17907		}()
17908	}
17909	if err := validation.Validate([]validation.Validation{
17910		{TargetValue: resourceGroupName,
17911			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17912				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17913				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17914		return result, validation.NewError("web.AppsClient", "GetWebJobSlot", err.Error())
17915	}
17916
17917	req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
17918	if err != nil {
17919		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request")
17920		return
17921	}
17922
17923	resp, err := client.GetWebJobSlotSender(req)
17924	if err != nil {
17925		result.Response = autorest.Response{Response: resp}
17926		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request")
17927		return
17928	}
17929
17930	result, err = client.GetWebJobSlotResponder(resp)
17931	if err != nil {
17932		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request")
17933		return
17934	}
17935
17936	return
17937}
17938
17939// GetWebJobSlotPreparer prepares the GetWebJobSlot request.
17940func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
17941	pathParameters := map[string]interface{}{
17942		"name":              autorest.Encode("path", name),
17943		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17944		"slot":              autorest.Encode("path", slot),
17945		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17946		"webJobName":        autorest.Encode("path", webJobName),
17947	}
17948
17949	const APIVersion = "2021-01-15"
17950	queryParameters := map[string]interface{}{
17951		"api-version": APIVersion,
17952	}
17953
17954	preparer := autorest.CreatePreparer(
17955		autorest.AsGet(),
17956		autorest.WithBaseURL(client.BaseURI),
17957		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters),
17958		autorest.WithQueryParameters(queryParameters))
17959	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17960}
17961
17962// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the
17963// http.Response Body if it receives an error.
17964func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) {
17965	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17966}
17967
17968// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always
17969// closes the http.Response Body.
17970func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) {
17971	err = autorest.Respond(
17972		resp,
17973		azure.WithErrorUnlessStatusCode(http.StatusOK),
17974		autorest.ByUnmarshallingJSON(&result),
17975		autorest.ByClosing())
17976	result.Response = autorest.Response{Response: resp}
17977	return
17978}
17979
17980// GetWebSiteContainerLogs description for Gets the last lines of docker logs for the given site
17981// Parameters:
17982// resourceGroupName - name of the resource group to which the resource belongs.
17983// name - name of web app.
17984func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) {
17985	if tracing.IsEnabled() {
17986		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs")
17987		defer func() {
17988			sc := -1
17989			if result.Response.Response != nil {
17990				sc = result.Response.Response.StatusCode
17991			}
17992			tracing.EndSpan(ctx, sc, err)
17993		}()
17994	}
17995	if err := validation.Validate([]validation.Validation{
17996		{TargetValue: resourceGroupName,
17997			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17998				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17999				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18000		return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogs", err.Error())
18001	}
18002
18003	req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name)
18004	if err != nil {
18005		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request")
18006		return
18007	}
18008
18009	resp, err := client.GetWebSiteContainerLogsSender(req)
18010	if err != nil {
18011		result.Response = autorest.Response{Response: resp}
18012		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request")
18013		return
18014	}
18015
18016	result, err = client.GetWebSiteContainerLogsResponder(resp)
18017	if err != nil {
18018		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request")
18019		return
18020	}
18021
18022	return
18023}
18024
18025// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request.
18026func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18027	pathParameters := map[string]interface{}{
18028		"name":              autorest.Encode("path", name),
18029		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18030		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18031	}
18032
18033	const APIVersion = "2021-01-15"
18034	queryParameters := map[string]interface{}{
18035		"api-version": APIVersion,
18036	}
18037
18038	preparer := autorest.CreatePreparer(
18039		autorest.AsPost(),
18040		autorest.WithBaseURL(client.BaseURI),
18041		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters),
18042		autorest.WithQueryParameters(queryParameters))
18043	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18044}
18045
18046// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the
18047// http.Response Body if it receives an error.
18048func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) {
18049	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18050}
18051
18052// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always
18053// closes the http.Response Body.
18054func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) {
18055	result.Value = &resp.Body
18056	err = autorest.Respond(
18057		resp,
18058		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
18059	result.Response = autorest.Response{Response: resp}
18060	return
18061}
18062
18063// GetWebSiteContainerLogsSlot description for Gets the last lines of docker logs for the given site
18064// Parameters:
18065// resourceGroupName - name of the resource group to which the resource belongs.
18066// name - name of web app.
18067// slot - name of web app slot. If not specified then will default to production slot.
18068func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) {
18069	if tracing.IsEnabled() {
18070		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot")
18071		defer func() {
18072			sc := -1
18073			if result.Response.Response != nil {
18074				sc = result.Response.Response.StatusCode
18075			}
18076			tracing.EndSpan(ctx, sc, err)
18077		}()
18078	}
18079	if err := validation.Validate([]validation.Validation{
18080		{TargetValue: resourceGroupName,
18081			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18082				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18083				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18084		return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogsSlot", err.Error())
18085	}
18086
18087	req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot)
18088	if err != nil {
18089		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request")
18090		return
18091	}
18092
18093	resp, err := client.GetWebSiteContainerLogsSlotSender(req)
18094	if err != nil {
18095		result.Response = autorest.Response{Response: resp}
18096		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request")
18097		return
18098	}
18099
18100	result, err = client.GetWebSiteContainerLogsSlotResponder(resp)
18101	if err != nil {
18102		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure responding to request")
18103		return
18104	}
18105
18106	return
18107}
18108
18109// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request.
18110func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18111	pathParameters := map[string]interface{}{
18112		"name":              autorest.Encode("path", name),
18113		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18114		"slot":              autorest.Encode("path", slot),
18115		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18116	}
18117
18118	const APIVersion = "2021-01-15"
18119	queryParameters := map[string]interface{}{
18120		"api-version": APIVersion,
18121	}
18122
18123	preparer := autorest.CreatePreparer(
18124		autorest.AsPost(),
18125		autorest.WithBaseURL(client.BaseURI),
18126		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters),
18127		autorest.WithQueryParameters(queryParameters))
18128	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18129}
18130
18131// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the
18132// http.Response Body if it receives an error.
18133func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) {
18134	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18135}
18136
18137// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always
18138// closes the http.Response Body.
18139func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) {
18140	result.Value = &resp.Body
18141	err = autorest.Respond(
18142		resp,
18143		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
18144	result.Response = autorest.Response{Response: resp}
18145	return
18146}
18147
18148// InstallSiteExtension description for Install site extension on a web site, or a deployment slot.
18149// Parameters:
18150// resourceGroupName - name of the resource group to which the resource belongs.
18151// name - site name.
18152// siteExtensionID - site extension name.
18153func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) {
18154	if tracing.IsEnabled() {
18155		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension")
18156		defer func() {
18157			sc := -1
18158			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
18159				sc = result.FutureAPI.Response().StatusCode
18160			}
18161			tracing.EndSpan(ctx, sc, err)
18162		}()
18163	}
18164	if err := validation.Validate([]validation.Validation{
18165		{TargetValue: resourceGroupName,
18166			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18167				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18168				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18169		return result, validation.NewError("web.AppsClient", "InstallSiteExtension", err.Error())
18170	}
18171
18172	req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
18173	if err != nil {
18174		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request")
18175		return
18176	}
18177
18178	result, err = client.InstallSiteExtensionSender(req)
18179	if err != nil {
18180		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure sending request")
18181		return
18182	}
18183
18184	return
18185}
18186
18187// InstallSiteExtensionPreparer prepares the InstallSiteExtension request.
18188func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
18189	pathParameters := map[string]interface{}{
18190		"name":              autorest.Encode("path", name),
18191		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18192		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
18193		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18194	}
18195
18196	const APIVersion = "2021-01-15"
18197	queryParameters := map[string]interface{}{
18198		"api-version": APIVersion,
18199	}
18200
18201	preparer := autorest.CreatePreparer(
18202		autorest.AsPut(),
18203		autorest.WithBaseURL(client.BaseURI),
18204		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
18205		autorest.WithQueryParameters(queryParameters))
18206	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18207}
18208
18209// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the
18210// http.Response Body if it receives an error.
18211func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) {
18212	var resp *http.Response
18213	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
18214	if err != nil {
18215		return
18216	}
18217	var azf azure.Future
18218	azf, err = azure.NewFutureFromResponse(resp)
18219	future.FutureAPI = &azf
18220	future.Result = future.result
18221	return
18222}
18223
18224// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always
18225// closes the http.Response Body.
18226func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
18227	err = autorest.Respond(
18228		resp,
18229		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
18230		autorest.ByUnmarshallingJSON(&result),
18231		autorest.ByClosing())
18232	result.Response = autorest.Response{Response: resp}
18233	return
18234}
18235
18236// InstallSiteExtensionSlot description for Install site extension on a web site, or a deployment slot.
18237// Parameters:
18238// resourceGroupName - name of the resource group to which the resource belongs.
18239// name - site name.
18240// siteExtensionID - site extension name.
18241// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
18242func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) {
18243	if tracing.IsEnabled() {
18244		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot")
18245		defer func() {
18246			sc := -1
18247			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
18248				sc = result.FutureAPI.Response().StatusCode
18249			}
18250			tracing.EndSpan(ctx, sc, err)
18251		}()
18252	}
18253	if err := validation.Validate([]validation.Validation{
18254		{TargetValue: resourceGroupName,
18255			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18256				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18257				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18258		return result, validation.NewError("web.AppsClient", "InstallSiteExtensionSlot", err.Error())
18259	}
18260
18261	req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
18262	if err != nil {
18263		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request")
18264		return
18265	}
18266
18267	result, err = client.InstallSiteExtensionSlotSender(req)
18268	if err != nil {
18269		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure sending request")
18270		return
18271	}
18272
18273	return
18274}
18275
18276// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request.
18277func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
18278	pathParameters := map[string]interface{}{
18279		"name":              autorest.Encode("path", name),
18280		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18281		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
18282		"slot":              autorest.Encode("path", slot),
18283		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18284	}
18285
18286	const APIVersion = "2021-01-15"
18287	queryParameters := map[string]interface{}{
18288		"api-version": APIVersion,
18289	}
18290
18291	preparer := autorest.CreatePreparer(
18292		autorest.AsPut(),
18293		autorest.WithBaseURL(client.BaseURI),
18294		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
18295		autorest.WithQueryParameters(queryParameters))
18296	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18297}
18298
18299// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the
18300// http.Response Body if it receives an error.
18301func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) {
18302	var resp *http.Response
18303	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
18304	if err != nil {
18305		return
18306	}
18307	var azf azure.Future
18308	azf, err = azure.NewFutureFromResponse(resp)
18309	future.FutureAPI = &azf
18310	future.Result = future.result
18311	return
18312}
18313
18314// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always
18315// closes the http.Response Body.
18316func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
18317	err = autorest.Respond(
18318		resp,
18319		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
18320		autorest.ByUnmarshallingJSON(&result),
18321		autorest.ByClosing())
18322	result.Response = autorest.Response{Response: resp}
18323	return
18324}
18325
18326// IsCloneable description for Shows whether an app can be cloned to another resource group or subscription.
18327// Parameters:
18328// resourceGroupName - name of the resource group to which the resource belongs.
18329// name - name of the app.
18330func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) {
18331	if tracing.IsEnabled() {
18332		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable")
18333		defer func() {
18334			sc := -1
18335			if result.Response.Response != nil {
18336				sc = result.Response.Response.StatusCode
18337			}
18338			tracing.EndSpan(ctx, sc, err)
18339		}()
18340	}
18341	if err := validation.Validate([]validation.Validation{
18342		{TargetValue: resourceGroupName,
18343			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18344				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18345				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18346		return result, validation.NewError("web.AppsClient", "IsCloneable", err.Error())
18347	}
18348
18349	req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name)
18350	if err != nil {
18351		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request")
18352		return
18353	}
18354
18355	resp, err := client.IsCloneableSender(req)
18356	if err != nil {
18357		result.Response = autorest.Response{Response: resp}
18358		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request")
18359		return
18360	}
18361
18362	result, err = client.IsCloneableResponder(resp)
18363	if err != nil {
18364		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request")
18365		return
18366	}
18367
18368	return
18369}
18370
18371// IsCloneablePreparer prepares the IsCloneable request.
18372func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18373	pathParameters := map[string]interface{}{
18374		"name":              autorest.Encode("path", name),
18375		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18376		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18377	}
18378
18379	const APIVersion = "2021-01-15"
18380	queryParameters := map[string]interface{}{
18381		"api-version": APIVersion,
18382	}
18383
18384	preparer := autorest.CreatePreparer(
18385		autorest.AsPost(),
18386		autorest.WithBaseURL(client.BaseURI),
18387		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable", pathParameters),
18388		autorest.WithQueryParameters(queryParameters))
18389	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18390}
18391
18392// IsCloneableSender sends the IsCloneable request. The method will close the
18393// http.Response Body if it receives an error.
18394func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) {
18395	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18396}
18397
18398// IsCloneableResponder handles the response to the IsCloneable request. The method always
18399// closes the http.Response Body.
18400func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) {
18401	err = autorest.Respond(
18402		resp,
18403		azure.WithErrorUnlessStatusCode(http.StatusOK),
18404		autorest.ByUnmarshallingJSON(&result),
18405		autorest.ByClosing())
18406	result.Response = autorest.Response{Response: resp}
18407	return
18408}
18409
18410// IsCloneableSlot description for Shows whether an app can be cloned to another resource group or subscription.
18411// Parameters:
18412// resourceGroupName - name of the resource group to which the resource belongs.
18413// name - name of the app.
18414// slot - name of the deployment slot. By default, this API returns information on the production slot.
18415func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) {
18416	if tracing.IsEnabled() {
18417		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot")
18418		defer func() {
18419			sc := -1
18420			if result.Response.Response != nil {
18421				sc = result.Response.Response.StatusCode
18422			}
18423			tracing.EndSpan(ctx, sc, err)
18424		}()
18425	}
18426	if err := validation.Validate([]validation.Validation{
18427		{TargetValue: resourceGroupName,
18428			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18429				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18430				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18431		return result, validation.NewError("web.AppsClient", "IsCloneableSlot", err.Error())
18432	}
18433
18434	req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot)
18435	if err != nil {
18436		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request")
18437		return
18438	}
18439
18440	resp, err := client.IsCloneableSlotSender(req)
18441	if err != nil {
18442		result.Response = autorest.Response{Response: resp}
18443		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request")
18444		return
18445	}
18446
18447	result, err = client.IsCloneableSlotResponder(resp)
18448	if err != nil {
18449		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request")
18450		return
18451	}
18452
18453	return
18454}
18455
18456// IsCloneableSlotPreparer prepares the IsCloneableSlot request.
18457func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18458	pathParameters := map[string]interface{}{
18459		"name":              autorest.Encode("path", name),
18460		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18461		"slot":              autorest.Encode("path", slot),
18462		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18463	}
18464
18465	const APIVersion = "2021-01-15"
18466	queryParameters := map[string]interface{}{
18467		"api-version": APIVersion,
18468	}
18469
18470	preparer := autorest.CreatePreparer(
18471		autorest.AsPost(),
18472		autorest.WithBaseURL(client.BaseURI),
18473		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable", pathParameters),
18474		autorest.WithQueryParameters(queryParameters))
18475	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18476}
18477
18478// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the
18479// http.Response Body if it receives an error.
18480func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) {
18481	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18482}
18483
18484// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always
18485// closes the http.Response Body.
18486func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) {
18487	err = autorest.Respond(
18488		resp,
18489		azure.WithErrorUnlessStatusCode(http.StatusOK),
18490		autorest.ByUnmarshallingJSON(&result),
18491		autorest.ByClosing())
18492	result.Response = autorest.Response{Response: resp}
18493	return
18494}
18495
18496// List description for Get all apps for a subscription.
18497func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) {
18498	if tracing.IsEnabled() {
18499		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List")
18500		defer func() {
18501			sc := -1
18502			if result.ac.Response.Response != nil {
18503				sc = result.ac.Response.Response.StatusCode
18504			}
18505			tracing.EndSpan(ctx, sc, err)
18506		}()
18507	}
18508	result.fn = client.listNextResults
18509	req, err := client.ListPreparer(ctx)
18510	if err != nil {
18511		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request")
18512		return
18513	}
18514
18515	resp, err := client.ListSender(req)
18516	if err != nil {
18517		result.ac.Response = autorest.Response{Response: resp}
18518		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request")
18519		return
18520	}
18521
18522	result.ac, err = client.ListResponder(resp)
18523	if err != nil {
18524		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request")
18525		return
18526	}
18527	if result.ac.hasNextLink() && result.ac.IsEmpty() {
18528		err = result.NextWithContext(ctx)
18529		return
18530	}
18531
18532	return
18533}
18534
18535// ListPreparer prepares the List request.
18536func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
18537	pathParameters := map[string]interface{}{
18538		"subscriptionId": autorest.Encode("path", client.SubscriptionID),
18539	}
18540
18541	const APIVersion = "2021-01-15"
18542	queryParameters := map[string]interface{}{
18543		"api-version": APIVersion,
18544	}
18545
18546	preparer := autorest.CreatePreparer(
18547		autorest.AsGet(),
18548		autorest.WithBaseURL(client.BaseURI),
18549		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", pathParameters),
18550		autorest.WithQueryParameters(queryParameters))
18551	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18552}
18553
18554// ListSender sends the List request. The method will close the
18555// http.Response Body if it receives an error.
18556func (client AppsClient) ListSender(req *http.Request) (*http.Response, error) {
18557	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18558}
18559
18560// ListResponder handles the response to the List request. The method always
18561// closes the http.Response Body.
18562func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) {
18563	err = autorest.Respond(
18564		resp,
18565		azure.WithErrorUnlessStatusCode(http.StatusOK),
18566		autorest.ByUnmarshallingJSON(&result),
18567		autorest.ByClosing())
18568	result.Response = autorest.Response{Response: resp}
18569	return
18570}
18571
18572// listNextResults retrieves the next set of results, if any.
18573func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
18574	req, err := lastResults.appCollectionPreparer(ctx)
18575	if err != nil {
18576		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", nil, "Failure preparing next results request")
18577	}
18578	if req == nil {
18579		return
18580	}
18581	resp, err := client.ListSender(req)
18582	if err != nil {
18583		result.Response = autorest.Response{Response: resp}
18584		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure sending next results request")
18585	}
18586	result, err = client.ListResponder(resp)
18587	if err != nil {
18588		err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request")
18589	}
18590	return
18591}
18592
18593// ListComplete enumerates all values, automatically crossing page boundaries as required.
18594func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) {
18595	if tracing.IsEnabled() {
18596		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List")
18597		defer func() {
18598			sc := -1
18599			if result.Response().Response.Response != nil {
18600				sc = result.page.Response().Response.Response.StatusCode
18601			}
18602			tracing.EndSpan(ctx, sc, err)
18603		}()
18604	}
18605	result.page, err = client.List(ctx)
18606	return
18607}
18608
18609// ListApplicationSettings description for Gets the application settings of an app.
18610// Parameters:
18611// resourceGroupName - name of the resource group to which the resource belongs.
18612// name - name of the app.
18613func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) {
18614	if tracing.IsEnabled() {
18615		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings")
18616		defer func() {
18617			sc := -1
18618			if result.Response.Response != nil {
18619				sc = result.Response.Response.StatusCode
18620			}
18621			tracing.EndSpan(ctx, sc, err)
18622		}()
18623	}
18624	if err := validation.Validate([]validation.Validation{
18625		{TargetValue: resourceGroupName,
18626			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18627				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18628				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18629		return result, validation.NewError("web.AppsClient", "ListApplicationSettings", err.Error())
18630	}
18631
18632	req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name)
18633	if err != nil {
18634		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request")
18635		return
18636	}
18637
18638	resp, err := client.ListApplicationSettingsSender(req)
18639	if err != nil {
18640		result.Response = autorest.Response{Response: resp}
18641		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request")
18642		return
18643	}
18644
18645	result, err = client.ListApplicationSettingsResponder(resp)
18646	if err != nil {
18647		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request")
18648		return
18649	}
18650
18651	return
18652}
18653
18654// ListApplicationSettingsPreparer prepares the ListApplicationSettings request.
18655func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18656	pathParameters := map[string]interface{}{
18657		"name":              autorest.Encode("path", name),
18658		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18659		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18660	}
18661
18662	const APIVersion = "2021-01-15"
18663	queryParameters := map[string]interface{}{
18664		"api-version": APIVersion,
18665	}
18666
18667	preparer := autorest.CreatePreparer(
18668		autorest.AsPost(),
18669		autorest.WithBaseURL(client.BaseURI),
18670		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list", pathParameters),
18671		autorest.WithQueryParameters(queryParameters))
18672	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18673}
18674
18675// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the
18676// http.Response Body if it receives an error.
18677func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) {
18678	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18679}
18680
18681// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always
18682// closes the http.Response Body.
18683func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) {
18684	err = autorest.Respond(
18685		resp,
18686		azure.WithErrorUnlessStatusCode(http.StatusOK),
18687		autorest.ByUnmarshallingJSON(&result),
18688		autorest.ByClosing())
18689	result.Response = autorest.Response{Response: resp}
18690	return
18691}
18692
18693// ListApplicationSettingsSlot description for Gets the application settings of an app.
18694// Parameters:
18695// resourceGroupName - name of the resource group to which the resource belongs.
18696// name - name of the app.
18697// slot - name of the deployment slot. If a slot is not specified, the API will get the application settings
18698// for the production slot.
18699func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) {
18700	if tracing.IsEnabled() {
18701		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot")
18702		defer func() {
18703			sc := -1
18704			if result.Response.Response != nil {
18705				sc = result.Response.Response.StatusCode
18706			}
18707			tracing.EndSpan(ctx, sc, err)
18708		}()
18709	}
18710	if err := validation.Validate([]validation.Validation{
18711		{TargetValue: resourceGroupName,
18712			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18713				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18714				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18715		return result, validation.NewError("web.AppsClient", "ListApplicationSettingsSlot", err.Error())
18716	}
18717
18718	req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
18719	if err != nil {
18720		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request")
18721		return
18722	}
18723
18724	resp, err := client.ListApplicationSettingsSlotSender(req)
18725	if err != nil {
18726		result.Response = autorest.Response{Response: resp}
18727		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request")
18728		return
18729	}
18730
18731	result, err = client.ListApplicationSettingsSlotResponder(resp)
18732	if err != nil {
18733		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request")
18734		return
18735	}
18736
18737	return
18738}
18739
18740// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request.
18741func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18742	pathParameters := map[string]interface{}{
18743		"name":              autorest.Encode("path", name),
18744		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18745		"slot":              autorest.Encode("path", slot),
18746		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18747	}
18748
18749	const APIVersion = "2021-01-15"
18750	queryParameters := map[string]interface{}{
18751		"api-version": APIVersion,
18752	}
18753
18754	preparer := autorest.CreatePreparer(
18755		autorest.AsPost(),
18756		autorest.WithBaseURL(client.BaseURI),
18757		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list", pathParameters),
18758		autorest.WithQueryParameters(queryParameters))
18759	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18760}
18761
18762// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the
18763// http.Response Body if it receives an error.
18764func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) {
18765	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18766}
18767
18768// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always
18769// closes the http.Response Body.
18770func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) {
18771	err = autorest.Respond(
18772		resp,
18773		azure.WithErrorUnlessStatusCode(http.StatusOK),
18774		autorest.ByUnmarshallingJSON(&result),
18775		autorest.ByClosing())
18776	result.Response = autorest.Response{Response: resp}
18777	return
18778}
18779
18780// ListAzureStorageAccounts description for Gets the Azure storage account configurations of an app.
18781// Parameters:
18782// resourceGroupName - name of the resource group to which the resource belongs.
18783// name - name of the app.
18784func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) {
18785	if tracing.IsEnabled() {
18786		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts")
18787		defer func() {
18788			sc := -1
18789			if result.Response.Response != nil {
18790				sc = result.Response.Response.StatusCode
18791			}
18792			tracing.EndSpan(ctx, sc, err)
18793		}()
18794	}
18795	if err := validation.Validate([]validation.Validation{
18796		{TargetValue: resourceGroupName,
18797			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18798				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18799				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18800		return result, validation.NewError("web.AppsClient", "ListAzureStorageAccounts", err.Error())
18801	}
18802
18803	req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name)
18804	if err != nil {
18805		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request")
18806		return
18807	}
18808
18809	resp, err := client.ListAzureStorageAccountsSender(req)
18810	if err != nil {
18811		result.Response = autorest.Response{Response: resp}
18812		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request")
18813		return
18814	}
18815
18816	result, err = client.ListAzureStorageAccountsResponder(resp)
18817	if err != nil {
18818		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request")
18819		return
18820	}
18821
18822	return
18823}
18824
18825// ListAzureStorageAccountsPreparer prepares the ListAzureStorageAccounts request.
18826func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18827	pathParameters := map[string]interface{}{
18828		"name":              autorest.Encode("path", name),
18829		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18830		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18831	}
18832
18833	const APIVersion = "2021-01-15"
18834	queryParameters := map[string]interface{}{
18835		"api-version": APIVersion,
18836	}
18837
18838	preparer := autorest.CreatePreparer(
18839		autorest.AsPost(),
18840		autorest.WithBaseURL(client.BaseURI),
18841		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters),
18842		autorest.WithQueryParameters(queryParameters))
18843	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18844}
18845
18846// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the
18847// http.Response Body if it receives an error.
18848func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) {
18849	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18850}
18851
18852// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always
18853// closes the http.Response Body.
18854func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
18855	err = autorest.Respond(
18856		resp,
18857		azure.WithErrorUnlessStatusCode(http.StatusOK),
18858		autorest.ByUnmarshallingJSON(&result),
18859		autorest.ByClosing())
18860	result.Response = autorest.Response{Response: resp}
18861	return
18862}
18863
18864// ListAzureStorageAccountsSlot description for Gets the Azure storage account configurations of an app.
18865// Parameters:
18866// resourceGroupName - name of the resource group to which the resource belongs.
18867// name - name of the app.
18868// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage
18869// account configurations for the production slot.
18870func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) {
18871	if tracing.IsEnabled() {
18872		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot")
18873		defer func() {
18874			sc := -1
18875			if result.Response.Response != nil {
18876				sc = result.Response.Response.StatusCode
18877			}
18878			tracing.EndSpan(ctx, sc, err)
18879		}()
18880	}
18881	if err := validation.Validate([]validation.Validation{
18882		{TargetValue: resourceGroupName,
18883			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18884				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18885				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18886		return result, validation.NewError("web.AppsClient", "ListAzureStorageAccountsSlot", err.Error())
18887	}
18888
18889	req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot)
18890	if err != nil {
18891		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request")
18892		return
18893	}
18894
18895	resp, err := client.ListAzureStorageAccountsSlotSender(req)
18896	if err != nil {
18897		result.Response = autorest.Response{Response: resp}
18898		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request")
18899		return
18900	}
18901
18902	result, err = client.ListAzureStorageAccountsSlotResponder(resp)
18903	if err != nil {
18904		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure responding to request")
18905		return
18906	}
18907
18908	return
18909}
18910
18911// ListAzureStorageAccountsSlotPreparer prepares the ListAzureStorageAccountsSlot request.
18912func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18913	pathParameters := map[string]interface{}{
18914		"name":              autorest.Encode("path", name),
18915		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18916		"slot":              autorest.Encode("path", slot),
18917		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18918	}
18919
18920	const APIVersion = "2021-01-15"
18921	queryParameters := map[string]interface{}{
18922		"api-version": APIVersion,
18923	}
18924
18925	preparer := autorest.CreatePreparer(
18926		autorest.AsPost(),
18927		autorest.WithBaseURL(client.BaseURI),
18928		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters),
18929		autorest.WithQueryParameters(queryParameters))
18930	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18931}
18932
18933// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the
18934// http.Response Body if it receives an error.
18935func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) {
18936	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18937}
18938
18939// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always
18940// closes the http.Response Body.
18941func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
18942	err = autorest.Respond(
18943		resp,
18944		azure.WithErrorUnlessStatusCode(http.StatusOK),
18945		autorest.ByUnmarshallingJSON(&result),
18946		autorest.ByClosing())
18947	result.Response = autorest.Response{Response: resp}
18948	return
18949}
18950
18951// ListBackups description for Gets existing backups of an app.
18952// Parameters:
18953// resourceGroupName - name of the resource group to which the resource belongs.
18954// name - name of the app.
18955func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) {
18956	if tracing.IsEnabled() {
18957		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups")
18958		defer func() {
18959			sc := -1
18960			if result.bic.Response.Response != nil {
18961				sc = result.bic.Response.Response.StatusCode
18962			}
18963			tracing.EndSpan(ctx, sc, err)
18964		}()
18965	}
18966	if err := validation.Validate([]validation.Validation{
18967		{TargetValue: resourceGroupName,
18968			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18969				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18970				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18971		return result, validation.NewError("web.AppsClient", "ListBackups", err.Error())
18972	}
18973
18974	result.fn = client.listBackupsNextResults
18975	req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name)
18976	if err != nil {
18977		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request")
18978		return
18979	}
18980
18981	resp, err := client.ListBackupsSender(req)
18982	if err != nil {
18983		result.bic.Response = autorest.Response{Response: resp}
18984		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request")
18985		return
18986	}
18987
18988	result.bic, err = client.ListBackupsResponder(resp)
18989	if err != nil {
18990		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request")
18991		return
18992	}
18993	if result.bic.hasNextLink() && result.bic.IsEmpty() {
18994		err = result.NextWithContext(ctx)
18995		return
18996	}
18997
18998	return
18999}
19000
19001// ListBackupsPreparer prepares the ListBackups request.
19002func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19003	pathParameters := map[string]interface{}{
19004		"name":              autorest.Encode("path", name),
19005		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19006		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19007	}
19008
19009	const APIVersion = "2021-01-15"
19010	queryParameters := map[string]interface{}{
19011		"api-version": APIVersion,
19012	}
19013
19014	preparer := autorest.CreatePreparer(
19015		autorest.AsGet(),
19016		autorest.WithBaseURL(client.BaseURI),
19017		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups", pathParameters),
19018		autorest.WithQueryParameters(queryParameters))
19019	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19020}
19021
19022// ListBackupsSender sends the ListBackups request. The method will close the
19023// http.Response Body if it receives an error.
19024func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) {
19025	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19026}
19027
19028// ListBackupsResponder handles the response to the ListBackups request. The method always
19029// closes the http.Response Body.
19030func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) {
19031	err = autorest.Respond(
19032		resp,
19033		azure.WithErrorUnlessStatusCode(http.StatusOK),
19034		autorest.ByUnmarshallingJSON(&result),
19035		autorest.ByClosing())
19036	result.Response = autorest.Response{Response: resp}
19037	return
19038}
19039
19040// listBackupsNextResults retrieves the next set of results, if any.
19041func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
19042	req, err := lastResults.backupItemCollectionPreparer(ctx)
19043	if err != nil {
19044		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request")
19045	}
19046	if req == nil {
19047		return
19048	}
19049	resp, err := client.ListBackupsSender(req)
19050	if err != nil {
19051		result.Response = autorest.Response{Response: resp}
19052		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request")
19053	}
19054	result, err = client.ListBackupsResponder(resp)
19055	if err != nil {
19056		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request")
19057	}
19058	return
19059}
19060
19061// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required.
19062func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) {
19063	if tracing.IsEnabled() {
19064		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups")
19065		defer func() {
19066			sc := -1
19067			if result.Response().Response.Response != nil {
19068				sc = result.page.Response().Response.Response.StatusCode
19069			}
19070			tracing.EndSpan(ctx, sc, err)
19071		}()
19072	}
19073	result.page, err = client.ListBackups(ctx, resourceGroupName, name)
19074	return
19075}
19076
19077// ListBackupsSlot description for Gets existing backups of an app.
19078// Parameters:
19079// resourceGroupName - name of the resource group to which the resource belongs.
19080// name - name of the app.
19081// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production
19082// slot.
19083func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) {
19084	if tracing.IsEnabled() {
19085		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot")
19086		defer func() {
19087			sc := -1
19088			if result.bic.Response.Response != nil {
19089				sc = result.bic.Response.Response.StatusCode
19090			}
19091			tracing.EndSpan(ctx, sc, err)
19092		}()
19093	}
19094	if err := validation.Validate([]validation.Validation{
19095		{TargetValue: resourceGroupName,
19096			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19097				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19098				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19099		return result, validation.NewError("web.AppsClient", "ListBackupsSlot", err.Error())
19100	}
19101
19102	result.fn = client.listBackupsSlotNextResults
19103	req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot)
19104	if err != nil {
19105		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request")
19106		return
19107	}
19108
19109	resp, err := client.ListBackupsSlotSender(req)
19110	if err != nil {
19111		result.bic.Response = autorest.Response{Response: resp}
19112		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request")
19113		return
19114	}
19115
19116	result.bic, err = client.ListBackupsSlotResponder(resp)
19117	if err != nil {
19118		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request")
19119		return
19120	}
19121	if result.bic.hasNextLink() && result.bic.IsEmpty() {
19122		err = result.NextWithContext(ctx)
19123		return
19124	}
19125
19126	return
19127}
19128
19129// ListBackupsSlotPreparer prepares the ListBackupsSlot request.
19130func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19131	pathParameters := map[string]interface{}{
19132		"name":              autorest.Encode("path", name),
19133		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19134		"slot":              autorest.Encode("path", slot),
19135		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19136	}
19137
19138	const APIVersion = "2021-01-15"
19139	queryParameters := map[string]interface{}{
19140		"api-version": APIVersion,
19141	}
19142
19143	preparer := autorest.CreatePreparer(
19144		autorest.AsGet(),
19145		autorest.WithBaseURL(client.BaseURI),
19146		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups", pathParameters),
19147		autorest.WithQueryParameters(queryParameters))
19148	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19149}
19150
19151// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the
19152// http.Response Body if it receives an error.
19153func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) {
19154	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19155}
19156
19157// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always
19158// closes the http.Response Body.
19159func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) {
19160	err = autorest.Respond(
19161		resp,
19162		azure.WithErrorUnlessStatusCode(http.StatusOK),
19163		autorest.ByUnmarshallingJSON(&result),
19164		autorest.ByClosing())
19165	result.Response = autorest.Response{Response: resp}
19166	return
19167}
19168
19169// listBackupsSlotNextResults retrieves the next set of results, if any.
19170func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
19171	req, err := lastResults.backupItemCollectionPreparer(ctx)
19172	if err != nil {
19173		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request")
19174	}
19175	if req == nil {
19176		return
19177	}
19178	resp, err := client.ListBackupsSlotSender(req)
19179	if err != nil {
19180		result.Response = autorest.Response{Response: resp}
19181		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request")
19182	}
19183	result, err = client.ListBackupsSlotResponder(resp)
19184	if err != nil {
19185		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request")
19186	}
19187	return
19188}
19189
19190// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required.
19191func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) {
19192	if tracing.IsEnabled() {
19193		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot")
19194		defer func() {
19195			sc := -1
19196			if result.Response().Response.Response != nil {
19197				sc = result.page.Response().Response.Response.StatusCode
19198			}
19199			tracing.EndSpan(ctx, sc, err)
19200		}()
19201	}
19202	result.page, err = client.ListBackupsSlot(ctx, resourceGroupName, name, slot)
19203	return
19204}
19205
19206// ListBackupStatusSecrets description for Gets status of a web app backup that may be in progress, including secrets
19207// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup
19208// if a new URL is passed in the request body.
19209// Parameters:
19210// resourceGroupName - name of the resource group to which the resource belongs.
19211// name - name of web app.
19212// backupID - ID of backup.
19213// request - information on backup request.
19214func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) {
19215	if tracing.IsEnabled() {
19216		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets")
19217		defer func() {
19218			sc := -1
19219			if result.Response.Response != nil {
19220				sc = result.Response.Response.StatusCode
19221			}
19222			tracing.EndSpan(ctx, sc, err)
19223		}()
19224	}
19225	if err := validation.Validate([]validation.Validation{
19226		{TargetValue: resourceGroupName,
19227			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19228				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19229				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
19230		{TargetValue: request,
19231			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
19232				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
19233					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
19234						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
19235							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
19236							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
19237						}},
19238				}}}}}); err != nil {
19239		return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error())
19240	}
19241
19242	req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request)
19243	if err != nil {
19244		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request")
19245		return
19246	}
19247
19248	resp, err := client.ListBackupStatusSecretsSender(req)
19249	if err != nil {
19250		result.Response = autorest.Response{Response: resp}
19251		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request")
19252		return
19253	}
19254
19255	result, err = client.ListBackupStatusSecretsResponder(resp)
19256	if err != nil {
19257		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request")
19258		return
19259	}
19260
19261	return
19262}
19263
19264// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request.
19265func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) {
19266	pathParameters := map[string]interface{}{
19267		"backupId":          autorest.Encode("path", backupID),
19268		"name":              autorest.Encode("path", name),
19269		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19270		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19271	}
19272
19273	const APIVersion = "2021-01-15"
19274	queryParameters := map[string]interface{}{
19275		"api-version": APIVersion,
19276	}
19277
19278	preparer := autorest.CreatePreparer(
19279		autorest.AsContentType("application/json; charset=utf-8"),
19280		autorest.AsPost(),
19281		autorest.WithBaseURL(client.BaseURI),
19282		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters),
19283		autorest.WithJSON(request),
19284		autorest.WithQueryParameters(queryParameters))
19285	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19286}
19287
19288// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the
19289// http.Response Body if it receives an error.
19290func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) {
19291	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19292}
19293
19294// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always
19295// closes the http.Response Body.
19296func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) {
19297	err = autorest.Respond(
19298		resp,
19299		azure.WithErrorUnlessStatusCode(http.StatusOK),
19300		autorest.ByUnmarshallingJSON(&result),
19301		autorest.ByClosing())
19302	result.Response = autorest.Response{Response: resp}
19303	return
19304}
19305
19306// ListBackupStatusSecretsSlot description for Gets status of a web app backup that may be in progress, including
19307// secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for
19308// the backup if a new URL is passed in the request body.
19309// Parameters:
19310// resourceGroupName - name of the resource group to which the resource belongs.
19311// name - name of web app.
19312// backupID - ID of backup.
19313// request - information on backup request.
19314// slot - name of web app slot. If not specified then will default to production slot.
19315func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) {
19316	if tracing.IsEnabled() {
19317		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot")
19318		defer func() {
19319			sc := -1
19320			if result.Response.Response != nil {
19321				sc = result.Response.Response.StatusCode
19322			}
19323			tracing.EndSpan(ctx, sc, err)
19324		}()
19325	}
19326	if err := validation.Validate([]validation.Validation{
19327		{TargetValue: resourceGroupName,
19328			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19329				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19330				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
19331		{TargetValue: request,
19332			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
19333				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
19334					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
19335						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
19336							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
19337							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
19338						}},
19339				}}}}}); err != nil {
19340		return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error())
19341	}
19342
19343	req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot)
19344	if err != nil {
19345		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request")
19346		return
19347	}
19348
19349	resp, err := client.ListBackupStatusSecretsSlotSender(req)
19350	if err != nil {
19351		result.Response = autorest.Response{Response: resp}
19352		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request")
19353		return
19354	}
19355
19356	result, err = client.ListBackupStatusSecretsSlotResponder(resp)
19357	if err != nil {
19358		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request")
19359		return
19360	}
19361
19362	return
19363}
19364
19365// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request.
19366func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) {
19367	pathParameters := map[string]interface{}{
19368		"backupId":          autorest.Encode("path", backupID),
19369		"name":              autorest.Encode("path", name),
19370		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19371		"slot":              autorest.Encode("path", slot),
19372		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19373	}
19374
19375	const APIVersion = "2021-01-15"
19376	queryParameters := map[string]interface{}{
19377		"api-version": APIVersion,
19378	}
19379
19380	preparer := autorest.CreatePreparer(
19381		autorest.AsContentType("application/json; charset=utf-8"),
19382		autorest.AsPost(),
19383		autorest.WithBaseURL(client.BaseURI),
19384		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters),
19385		autorest.WithJSON(request),
19386		autorest.WithQueryParameters(queryParameters))
19387	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19388}
19389
19390// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the
19391// http.Response Body if it receives an error.
19392func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) {
19393	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19394}
19395
19396// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always
19397// closes the http.Response Body.
19398func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) {
19399	err = autorest.Respond(
19400		resp,
19401		azure.WithErrorUnlessStatusCode(http.StatusOK),
19402		autorest.ByUnmarshallingJSON(&result),
19403		autorest.ByClosing())
19404	result.Response = autorest.Response{Response: resp}
19405	return
19406}
19407
19408// ListBasicPublishingCredentialsPolicies description for Returns whether Scm basic auth is allowed and whether Ftp is
19409// allowed for a given site.
19410// Parameters:
19411// resourceGroupName - name of the resource group to which the resource belongs.
19412// name - name of the app.
19413func (client AppsClient) ListBasicPublishingCredentialsPolicies(ctx context.Context, resourceGroupName string, name string) (result PublishingCredentialsPoliciesCollectionPage, err error) {
19414	if tracing.IsEnabled() {
19415		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBasicPublishingCredentialsPolicies")
19416		defer func() {
19417			sc := -1
19418			if result.pcpc.Response.Response != nil {
19419				sc = result.pcpc.Response.Response.StatusCode
19420			}
19421			tracing.EndSpan(ctx, sc, err)
19422		}()
19423	}
19424	if err := validation.Validate([]validation.Validation{
19425		{TargetValue: resourceGroupName,
19426			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19427				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19428				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19429		return result, validation.NewError("web.AppsClient", "ListBasicPublishingCredentialsPolicies", err.Error())
19430	}
19431
19432	result.fn = client.listBasicPublishingCredentialsPoliciesNextResults
19433	req, err := client.ListBasicPublishingCredentialsPoliciesPreparer(ctx, resourceGroupName, name)
19434	if err != nil {
19435		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBasicPublishingCredentialsPolicies", nil, "Failure preparing request")
19436		return
19437	}
19438
19439	resp, err := client.ListBasicPublishingCredentialsPoliciesSender(req)
19440	if err != nil {
19441		result.pcpc.Response = autorest.Response{Response: resp}
19442		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBasicPublishingCredentialsPolicies", resp, "Failure sending request")
19443		return
19444	}
19445
19446	result.pcpc, err = client.ListBasicPublishingCredentialsPoliciesResponder(resp)
19447	if err != nil {
19448		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBasicPublishingCredentialsPolicies", resp, "Failure responding to request")
19449		return
19450	}
19451	if result.pcpc.hasNextLink() && result.pcpc.IsEmpty() {
19452		err = result.NextWithContext(ctx)
19453		return
19454	}
19455
19456	return
19457}
19458
19459// ListBasicPublishingCredentialsPoliciesPreparer prepares the ListBasicPublishingCredentialsPolicies request.
19460func (client AppsClient) ListBasicPublishingCredentialsPoliciesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19461	pathParameters := map[string]interface{}{
19462		"name":              autorest.Encode("path", name),
19463		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19464		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19465	}
19466
19467	const APIVersion = "2021-01-15"
19468	queryParameters := map[string]interface{}{
19469		"api-version": APIVersion,
19470	}
19471
19472	preparer := autorest.CreatePreparer(
19473		autorest.AsGet(),
19474		autorest.WithBaseURL(client.BaseURI),
19475		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies", pathParameters),
19476		autorest.WithQueryParameters(queryParameters))
19477	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19478}
19479
19480// ListBasicPublishingCredentialsPoliciesSender sends the ListBasicPublishingCredentialsPolicies request. The method will close the
19481// http.Response Body if it receives an error.
19482func (client AppsClient) ListBasicPublishingCredentialsPoliciesSender(req *http.Request) (*http.Response, error) {
19483	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19484}
19485
19486// ListBasicPublishingCredentialsPoliciesResponder handles the response to the ListBasicPublishingCredentialsPolicies request. The method always
19487// closes the http.Response Body.
19488func (client AppsClient) ListBasicPublishingCredentialsPoliciesResponder(resp *http.Response) (result PublishingCredentialsPoliciesCollection, err error) {
19489	err = autorest.Respond(
19490		resp,
19491		azure.WithErrorUnlessStatusCode(http.StatusOK),
19492		autorest.ByUnmarshallingJSON(&result),
19493		autorest.ByClosing())
19494	result.Response = autorest.Response{Response: resp}
19495	return
19496}
19497
19498// listBasicPublishingCredentialsPoliciesNextResults retrieves the next set of results, if any.
19499func (client AppsClient) listBasicPublishingCredentialsPoliciesNextResults(ctx context.Context, lastResults PublishingCredentialsPoliciesCollection) (result PublishingCredentialsPoliciesCollection, err error) {
19500	req, err := lastResults.publishingCredentialsPoliciesCollectionPreparer(ctx)
19501	if err != nil {
19502		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBasicPublishingCredentialsPoliciesNextResults", nil, "Failure preparing next results request")
19503	}
19504	if req == nil {
19505		return
19506	}
19507	resp, err := client.ListBasicPublishingCredentialsPoliciesSender(req)
19508	if err != nil {
19509		result.Response = autorest.Response{Response: resp}
19510		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBasicPublishingCredentialsPoliciesNextResults", resp, "Failure sending next results request")
19511	}
19512	result, err = client.ListBasicPublishingCredentialsPoliciesResponder(resp)
19513	if err != nil {
19514		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBasicPublishingCredentialsPoliciesNextResults", resp, "Failure responding to next results request")
19515	}
19516	return
19517}
19518
19519// ListBasicPublishingCredentialsPoliciesComplete enumerates all values, automatically crossing page boundaries as required.
19520func (client AppsClient) ListBasicPublishingCredentialsPoliciesComplete(ctx context.Context, resourceGroupName string, name string) (result PublishingCredentialsPoliciesCollectionIterator, err error) {
19521	if tracing.IsEnabled() {
19522		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBasicPublishingCredentialsPolicies")
19523		defer func() {
19524			sc := -1
19525			if result.Response().Response.Response != nil {
19526				sc = result.page.Response().Response.Response.StatusCode
19527			}
19528			tracing.EndSpan(ctx, sc, err)
19529		}()
19530	}
19531	result.page, err = client.ListBasicPublishingCredentialsPolicies(ctx, resourceGroupName, name)
19532	return
19533}
19534
19535// ListBasicPublishingCredentialsPoliciesSlot description for Returns whether Scm basic auth is allowed and whether Ftp
19536// is allowed for a given site.
19537// Parameters:
19538// resourceGroupName - name of the resource group to which the resource belongs.
19539// name - name of the app.
19540func (client AppsClient) ListBasicPublishingCredentialsPoliciesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PublishingCredentialsPoliciesCollectionPage, err error) {
19541	if tracing.IsEnabled() {
19542		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBasicPublishingCredentialsPoliciesSlot")
19543		defer func() {
19544			sc := -1
19545			if result.pcpc.Response.Response != nil {
19546				sc = result.pcpc.Response.Response.StatusCode
19547			}
19548			tracing.EndSpan(ctx, sc, err)
19549		}()
19550	}
19551	if err := validation.Validate([]validation.Validation{
19552		{TargetValue: resourceGroupName,
19553			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19554				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19555				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19556		return result, validation.NewError("web.AppsClient", "ListBasicPublishingCredentialsPoliciesSlot", err.Error())
19557	}
19558
19559	result.fn = client.listBasicPublishingCredentialsPoliciesSlotNextResults
19560	req, err := client.ListBasicPublishingCredentialsPoliciesSlotPreparer(ctx, resourceGroupName, name, slot)
19561	if err != nil {
19562		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBasicPublishingCredentialsPoliciesSlot", nil, "Failure preparing request")
19563		return
19564	}
19565
19566	resp, err := client.ListBasicPublishingCredentialsPoliciesSlotSender(req)
19567	if err != nil {
19568		result.pcpc.Response = autorest.Response{Response: resp}
19569		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBasicPublishingCredentialsPoliciesSlot", resp, "Failure sending request")
19570		return
19571	}
19572
19573	result.pcpc, err = client.ListBasicPublishingCredentialsPoliciesSlotResponder(resp)
19574	if err != nil {
19575		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBasicPublishingCredentialsPoliciesSlot", resp, "Failure responding to request")
19576		return
19577	}
19578	if result.pcpc.hasNextLink() && result.pcpc.IsEmpty() {
19579		err = result.NextWithContext(ctx)
19580		return
19581	}
19582
19583	return
19584}
19585
19586// ListBasicPublishingCredentialsPoliciesSlotPreparer prepares the ListBasicPublishingCredentialsPoliciesSlot request.
19587func (client AppsClient) ListBasicPublishingCredentialsPoliciesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19588	pathParameters := map[string]interface{}{
19589		"name":              autorest.Encode("path", name),
19590		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19591		"slot":              autorest.Encode("path", slot),
19592		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19593	}
19594
19595	const APIVersion = "2021-01-15"
19596	queryParameters := map[string]interface{}{
19597		"api-version": APIVersion,
19598	}
19599
19600	preparer := autorest.CreatePreparer(
19601		autorest.AsGet(),
19602		autorest.WithBaseURL(client.BaseURI),
19603		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies", pathParameters),
19604		autorest.WithQueryParameters(queryParameters))
19605	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19606}
19607
19608// ListBasicPublishingCredentialsPoliciesSlotSender sends the ListBasicPublishingCredentialsPoliciesSlot request. The method will close the
19609// http.Response Body if it receives an error.
19610func (client AppsClient) ListBasicPublishingCredentialsPoliciesSlotSender(req *http.Request) (*http.Response, error) {
19611	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19612}
19613
19614// ListBasicPublishingCredentialsPoliciesSlotResponder handles the response to the ListBasicPublishingCredentialsPoliciesSlot request. The method always
19615// closes the http.Response Body.
19616func (client AppsClient) ListBasicPublishingCredentialsPoliciesSlotResponder(resp *http.Response) (result PublishingCredentialsPoliciesCollection, err error) {
19617	err = autorest.Respond(
19618		resp,
19619		azure.WithErrorUnlessStatusCode(http.StatusOK),
19620		autorest.ByUnmarshallingJSON(&result),
19621		autorest.ByClosing())
19622	result.Response = autorest.Response{Response: resp}
19623	return
19624}
19625
19626// listBasicPublishingCredentialsPoliciesSlotNextResults retrieves the next set of results, if any.
19627func (client AppsClient) listBasicPublishingCredentialsPoliciesSlotNextResults(ctx context.Context, lastResults PublishingCredentialsPoliciesCollection) (result PublishingCredentialsPoliciesCollection, err error) {
19628	req, err := lastResults.publishingCredentialsPoliciesCollectionPreparer(ctx)
19629	if err != nil {
19630		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBasicPublishingCredentialsPoliciesSlotNextResults", nil, "Failure preparing next results request")
19631	}
19632	if req == nil {
19633		return
19634	}
19635	resp, err := client.ListBasicPublishingCredentialsPoliciesSlotSender(req)
19636	if err != nil {
19637		result.Response = autorest.Response{Response: resp}
19638		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBasicPublishingCredentialsPoliciesSlotNextResults", resp, "Failure sending next results request")
19639	}
19640	result, err = client.ListBasicPublishingCredentialsPoliciesSlotResponder(resp)
19641	if err != nil {
19642		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBasicPublishingCredentialsPoliciesSlotNextResults", resp, "Failure responding to next results request")
19643	}
19644	return
19645}
19646
19647// ListBasicPublishingCredentialsPoliciesSlotComplete enumerates all values, automatically crossing page boundaries as required.
19648func (client AppsClient) ListBasicPublishingCredentialsPoliciesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result PublishingCredentialsPoliciesCollectionIterator, err error) {
19649	if tracing.IsEnabled() {
19650		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBasicPublishingCredentialsPoliciesSlot")
19651		defer func() {
19652			sc := -1
19653			if result.Response().Response.Response != nil {
19654				sc = result.page.Response().Response.Response.StatusCode
19655			}
19656			tracing.EndSpan(ctx, sc, err)
19657		}()
19658	}
19659	result.page, err = client.ListBasicPublishingCredentialsPoliciesSlot(ctx, resourceGroupName, name, slot)
19660	return
19661}
19662
19663// ListByResourceGroup description for Gets all web, mobile, and API apps in the specified resource group.
19664// Parameters:
19665// resourceGroupName - name of the resource group to which the resource belongs.
19666// includeSlots - specify <strong>true</strong> to include deployment slots in results. The default is false,
19667// which only gives you the production slot of all apps.
19668func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) {
19669	if tracing.IsEnabled() {
19670		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup")
19671		defer func() {
19672			sc := -1
19673			if result.ac.Response.Response != nil {
19674				sc = result.ac.Response.Response.StatusCode
19675			}
19676			tracing.EndSpan(ctx, sc, err)
19677		}()
19678	}
19679	if err := validation.Validate([]validation.Validation{
19680		{TargetValue: resourceGroupName,
19681			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19682				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19683				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19684		return result, validation.NewError("web.AppsClient", "ListByResourceGroup", err.Error())
19685	}
19686
19687	result.fn = client.listByResourceGroupNextResults
19688	req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots)
19689	if err != nil {
19690		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request")
19691		return
19692	}
19693
19694	resp, err := client.ListByResourceGroupSender(req)
19695	if err != nil {
19696		result.ac.Response = autorest.Response{Response: resp}
19697		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request")
19698		return
19699	}
19700
19701	result.ac, err = client.ListByResourceGroupResponder(resp)
19702	if err != nil {
19703		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request")
19704		return
19705	}
19706	if result.ac.hasNextLink() && result.ac.IsEmpty() {
19707		err = result.NextWithContext(ctx)
19708		return
19709	}
19710
19711	return
19712}
19713
19714// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
19715func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) {
19716	pathParameters := map[string]interface{}{
19717		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19718		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19719	}
19720
19721	const APIVersion = "2021-01-15"
19722	queryParameters := map[string]interface{}{
19723		"api-version": APIVersion,
19724	}
19725	if includeSlots != nil {
19726		queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots)
19727	}
19728
19729	preparer := autorest.CreatePreparer(
19730		autorest.AsGet(),
19731		autorest.WithBaseURL(client.BaseURI),
19732		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters),
19733		autorest.WithQueryParameters(queryParameters))
19734	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19735}
19736
19737// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
19738// http.Response Body if it receives an error.
19739func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
19740	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19741}
19742
19743// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
19744// closes the http.Response Body.
19745func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) {
19746	err = autorest.Respond(
19747		resp,
19748		azure.WithErrorUnlessStatusCode(http.StatusOK),
19749		autorest.ByUnmarshallingJSON(&result),
19750		autorest.ByClosing())
19751	result.Response = autorest.Response{Response: resp}
19752	return
19753}
19754
19755// listByResourceGroupNextResults retrieves the next set of results, if any.
19756func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
19757	req, err := lastResults.appCollectionPreparer(ctx)
19758	if err != nil {
19759		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
19760	}
19761	if req == nil {
19762		return
19763	}
19764	resp, err := client.ListByResourceGroupSender(req)
19765	if err != nil {
19766		result.Response = autorest.Response{Response: resp}
19767		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
19768	}
19769	result, err = client.ListByResourceGroupResponder(resp)
19770	if err != nil {
19771		err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
19772	}
19773	return
19774}
19775
19776// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
19777func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) {
19778	if tracing.IsEnabled() {
19779		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup")
19780		defer func() {
19781			sc := -1
19782			if result.Response().Response.Response != nil {
19783				sc = result.page.Response().Response.Response.StatusCode
19784			}
19785			tracing.EndSpan(ctx, sc, err)
19786		}()
19787	}
19788	result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots)
19789	return
19790}
19791
19792// ListConfigurations description for List the configurations of an app
19793// Parameters:
19794// resourceGroupName - name of the resource group to which the resource belongs.
19795// name - name of the app.
19796func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) {
19797	if tracing.IsEnabled() {
19798		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations")
19799		defer func() {
19800			sc := -1
19801			if result.scrc.Response.Response != nil {
19802				sc = result.scrc.Response.Response.StatusCode
19803			}
19804			tracing.EndSpan(ctx, sc, err)
19805		}()
19806	}
19807	if err := validation.Validate([]validation.Validation{
19808		{TargetValue: resourceGroupName,
19809			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19810				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19811				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19812		return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error())
19813	}
19814
19815	result.fn = client.listConfigurationsNextResults
19816	req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name)
19817	if err != nil {
19818		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request")
19819		return
19820	}
19821
19822	resp, err := client.ListConfigurationsSender(req)
19823	if err != nil {
19824		result.scrc.Response = autorest.Response{Response: resp}
19825		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request")
19826		return
19827	}
19828
19829	result.scrc, err = client.ListConfigurationsResponder(resp)
19830	if err != nil {
19831		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request")
19832		return
19833	}
19834	if result.scrc.hasNextLink() && result.scrc.IsEmpty() {
19835		err = result.NextWithContext(ctx)
19836		return
19837	}
19838
19839	return
19840}
19841
19842// ListConfigurationsPreparer prepares the ListConfigurations request.
19843func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19844	pathParameters := map[string]interface{}{
19845		"name":              autorest.Encode("path", name),
19846		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19847		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19848	}
19849
19850	const APIVersion = "2021-01-15"
19851	queryParameters := map[string]interface{}{
19852		"api-version": APIVersion,
19853	}
19854
19855	preparer := autorest.CreatePreparer(
19856		autorest.AsGet(),
19857		autorest.WithBaseURL(client.BaseURI),
19858		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters),
19859		autorest.WithQueryParameters(queryParameters))
19860	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19861}
19862
19863// ListConfigurationsSender sends the ListConfigurations request. The method will close the
19864// http.Response Body if it receives an error.
19865func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) {
19866	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19867}
19868
19869// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always
19870// closes the http.Response Body.
19871func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) {
19872	err = autorest.Respond(
19873		resp,
19874		azure.WithErrorUnlessStatusCode(http.StatusOK),
19875		autorest.ByUnmarshallingJSON(&result),
19876		autorest.ByClosing())
19877	result.Response = autorest.Response{Response: resp}
19878	return
19879}
19880
19881// listConfigurationsNextResults retrieves the next set of results, if any.
19882func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) {
19883	req, err := lastResults.siteConfigResourceCollectionPreparer(ctx)
19884	if err != nil {
19885		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request")
19886	}
19887	if req == nil {
19888		return
19889	}
19890	resp, err := client.ListConfigurationsSender(req)
19891	if err != nil {
19892		result.Response = autorest.Response{Response: resp}
19893		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request")
19894	}
19895	result, err = client.ListConfigurationsResponder(resp)
19896	if err != nil {
19897		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request")
19898	}
19899	return
19900}
19901
19902// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required.
19903func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) {
19904	if tracing.IsEnabled() {
19905		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations")
19906		defer func() {
19907			sc := -1
19908			if result.Response().Response.Response != nil {
19909				sc = result.page.Response().Response.Response.StatusCode
19910			}
19911			tracing.EndSpan(ctx, sc, err)
19912		}()
19913	}
19914	result.page, err = client.ListConfigurations(ctx, resourceGroupName, name)
19915	return
19916}
19917
19918// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each
19919// element of the list contains a timestamp and the ID of the snapshot.
19920// Parameters:
19921// resourceGroupName - name of the resource group to which the resource belongs.
19922// name - name of the app.
19923func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) {
19924	if tracing.IsEnabled() {
19925		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo")
19926		defer func() {
19927			sc := -1
19928			if result.scsic.Response.Response != nil {
19929				sc = result.scsic.Response.Response.StatusCode
19930			}
19931			tracing.EndSpan(ctx, sc, err)
19932		}()
19933	}
19934	if err := validation.Validate([]validation.Validation{
19935		{TargetValue: resourceGroupName,
19936			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19937				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19938				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19939		return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error())
19940	}
19941
19942	result.fn = client.listConfigurationSnapshotInfoNextResults
19943	req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name)
19944	if err != nil {
19945		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request")
19946		return
19947	}
19948
19949	resp, err := client.ListConfigurationSnapshotInfoSender(req)
19950	if err != nil {
19951		result.scsic.Response = autorest.Response{Response: resp}
19952		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request")
19953		return
19954	}
19955
19956	result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp)
19957	if err != nil {
19958		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request")
19959		return
19960	}
19961	if result.scsic.hasNextLink() && result.scsic.IsEmpty() {
19962		err = result.NextWithContext(ctx)
19963		return
19964	}
19965
19966	return
19967}
19968
19969// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request.
19970func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19971	pathParameters := map[string]interface{}{
19972		"name":              autorest.Encode("path", name),
19973		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19974		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19975	}
19976
19977	const APIVersion = "2021-01-15"
19978	queryParameters := map[string]interface{}{
19979		"api-version": APIVersion,
19980	}
19981
19982	preparer := autorest.CreatePreparer(
19983		autorest.AsGet(),
19984		autorest.WithBaseURL(client.BaseURI),
19985		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters),
19986		autorest.WithQueryParameters(queryParameters))
19987	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19988}
19989
19990// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the
19991// http.Response Body if it receives an error.
19992func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) {
19993	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19994}
19995
19996// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always
19997// closes the http.Response Body.
19998func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) {
19999	err = autorest.Respond(
20000		resp,
20001		azure.WithErrorUnlessStatusCode(http.StatusOK),
20002		autorest.ByUnmarshallingJSON(&result),
20003		autorest.ByClosing())
20004	result.Response = autorest.Response{Response: resp}
20005	return
20006}
20007
20008// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any.
20009func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) {
20010	req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx)
20011	if err != nil {
20012		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request")
20013	}
20014	if req == nil {
20015		return
20016	}
20017	resp, err := client.ListConfigurationSnapshotInfoSender(req)
20018	if err != nil {
20019		result.Response = autorest.Response{Response: resp}
20020		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request")
20021	}
20022	result, err = client.ListConfigurationSnapshotInfoResponder(resp)
20023	if err != nil {
20024		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request")
20025	}
20026	return
20027}
20028
20029// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required.
20030func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) {
20031	if tracing.IsEnabled() {
20032		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo")
20033		defer func() {
20034			sc := -1
20035			if result.Response().Response.Response != nil {
20036				sc = result.page.Response().Response.Response.StatusCode
20037			}
20038			tracing.EndSpan(ctx, sc, err)
20039		}()
20040	}
20041	result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name)
20042	return
20043}
20044
20045// ListConfigurationSnapshotInfoSlot description for Gets a list of web app configuration snapshots identifiers. Each
20046// element of the list contains a timestamp and the ID of the snapshot.
20047// Parameters:
20048// resourceGroupName - name of the resource group to which the resource belongs.
20049// name - name of the app.
20050// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
20051// production slot.
20052func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) {
20053	if tracing.IsEnabled() {
20054		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot")
20055		defer func() {
20056			sc := -1
20057			if result.scsic.Response.Response != nil {
20058				sc = result.scsic.Response.Response.StatusCode
20059			}
20060			tracing.EndSpan(ctx, sc, err)
20061		}()
20062	}
20063	if err := validation.Validate([]validation.Validation{
20064		{TargetValue: resourceGroupName,
20065			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20066				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20067				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20068		return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error())
20069	}
20070
20071	result.fn = client.listConfigurationSnapshotInfoSlotNextResults
20072	req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot)
20073	if err != nil {
20074		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request")
20075		return
20076	}
20077
20078	resp, err := client.ListConfigurationSnapshotInfoSlotSender(req)
20079	if err != nil {
20080		result.scsic.Response = autorest.Response{Response: resp}
20081		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request")
20082		return
20083	}
20084
20085	result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp)
20086	if err != nil {
20087		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request")
20088		return
20089	}
20090	if result.scsic.hasNextLink() && result.scsic.IsEmpty() {
20091		err = result.NextWithContext(ctx)
20092		return
20093	}
20094
20095	return
20096}
20097
20098// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request.
20099func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20100	pathParameters := map[string]interface{}{
20101		"name":              autorest.Encode("path", name),
20102		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20103		"slot":              autorest.Encode("path", slot),
20104		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20105	}
20106
20107	const APIVersion = "2021-01-15"
20108	queryParameters := map[string]interface{}{
20109		"api-version": APIVersion,
20110	}
20111
20112	preparer := autorest.CreatePreparer(
20113		autorest.AsGet(),
20114		autorest.WithBaseURL(client.BaseURI),
20115		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters),
20116		autorest.WithQueryParameters(queryParameters))
20117	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20118}
20119
20120// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the
20121// http.Response Body if it receives an error.
20122func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) {
20123	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20124}
20125
20126// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always
20127// closes the http.Response Body.
20128func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) {
20129	err = autorest.Respond(
20130		resp,
20131		azure.WithErrorUnlessStatusCode(http.StatusOK),
20132		autorest.ByUnmarshallingJSON(&result),
20133		autorest.ByClosing())
20134	result.Response = autorest.Response{Response: resp}
20135	return
20136}
20137
20138// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any.
20139func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) {
20140	req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx)
20141	if err != nil {
20142		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request")
20143	}
20144	if req == nil {
20145		return
20146	}
20147	resp, err := client.ListConfigurationSnapshotInfoSlotSender(req)
20148	if err != nil {
20149		result.Response = autorest.Response{Response: resp}
20150		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request")
20151	}
20152	result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp)
20153	if err != nil {
20154		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request")
20155	}
20156	return
20157}
20158
20159// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required.
20160func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) {
20161	if tracing.IsEnabled() {
20162		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot")
20163		defer func() {
20164			sc := -1
20165			if result.Response().Response.Response != nil {
20166				sc = result.page.Response().Response.Response.StatusCode
20167			}
20168			tracing.EndSpan(ctx, sc, err)
20169		}()
20170	}
20171	result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot)
20172	return
20173}
20174
20175// ListConfigurationsSlot description for List the configurations of an app
20176// Parameters:
20177// resourceGroupName - name of the resource group to which the resource belongs.
20178// name - name of the app.
20179// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
20180// production slot.
20181func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) {
20182	if tracing.IsEnabled() {
20183		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot")
20184		defer func() {
20185			sc := -1
20186			if result.scrc.Response.Response != nil {
20187				sc = result.scrc.Response.Response.StatusCode
20188			}
20189			tracing.EndSpan(ctx, sc, err)
20190		}()
20191	}
20192	if err := validation.Validate([]validation.Validation{
20193		{TargetValue: resourceGroupName,
20194			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20195				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20196				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20197		return result, validation.NewError("web.AppsClient", "ListConfigurationsSlot", err.Error())
20198	}
20199
20200	result.fn = client.listConfigurationsSlotNextResults
20201	req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot)
20202	if err != nil {
20203		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request")
20204		return
20205	}
20206
20207	resp, err := client.ListConfigurationsSlotSender(req)
20208	if err != nil {
20209		result.scrc.Response = autorest.Response{Response: resp}
20210		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request")
20211		return
20212	}
20213
20214	result.scrc, err = client.ListConfigurationsSlotResponder(resp)
20215	if err != nil {
20216		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request")
20217		return
20218	}
20219	if result.scrc.hasNextLink() && result.scrc.IsEmpty() {
20220		err = result.NextWithContext(ctx)
20221		return
20222	}
20223
20224	return
20225}
20226
20227// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request.
20228func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20229	pathParameters := map[string]interface{}{
20230		"name":              autorest.Encode("path", name),
20231		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20232		"slot":              autorest.Encode("path", slot),
20233		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20234	}
20235
20236	const APIVersion = "2021-01-15"
20237	queryParameters := map[string]interface{}{
20238		"api-version": APIVersion,
20239	}
20240
20241	preparer := autorest.CreatePreparer(
20242		autorest.AsGet(),
20243		autorest.WithBaseURL(client.BaseURI),
20244		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters),
20245		autorest.WithQueryParameters(queryParameters))
20246	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20247}
20248
20249// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the
20250// http.Response Body if it receives an error.
20251func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) {
20252	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20253}
20254
20255// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always
20256// closes the http.Response Body.
20257func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) {
20258	err = autorest.Respond(
20259		resp,
20260		azure.WithErrorUnlessStatusCode(http.StatusOK),
20261		autorest.ByUnmarshallingJSON(&result),
20262		autorest.ByClosing())
20263	result.Response = autorest.Response{Response: resp}
20264	return
20265}
20266
20267// listConfigurationsSlotNextResults retrieves the next set of results, if any.
20268func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) {
20269	req, err := lastResults.siteConfigResourceCollectionPreparer(ctx)
20270	if err != nil {
20271		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request")
20272	}
20273	if req == nil {
20274		return
20275	}
20276	resp, err := client.ListConfigurationsSlotSender(req)
20277	if err != nil {
20278		result.Response = autorest.Response{Response: resp}
20279		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request")
20280	}
20281	result, err = client.ListConfigurationsSlotResponder(resp)
20282	if err != nil {
20283		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request")
20284	}
20285	return
20286}
20287
20288// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required.
20289func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) {
20290	if tracing.IsEnabled() {
20291		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot")
20292		defer func() {
20293			sc := -1
20294			if result.Response().Response.Response != nil {
20295				sc = result.page.Response().Response.Response.StatusCode
20296			}
20297			tracing.EndSpan(ctx, sc, err)
20298		}()
20299	}
20300	result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot)
20301	return
20302}
20303
20304// ListConnectionStrings description for Gets the connection strings of an app.
20305// Parameters:
20306// resourceGroupName - name of the resource group to which the resource belongs.
20307// name - name of the app.
20308func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) {
20309	if tracing.IsEnabled() {
20310		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings")
20311		defer func() {
20312			sc := -1
20313			if result.Response.Response != nil {
20314				sc = result.Response.Response.StatusCode
20315			}
20316			tracing.EndSpan(ctx, sc, err)
20317		}()
20318	}
20319	if err := validation.Validate([]validation.Validation{
20320		{TargetValue: resourceGroupName,
20321			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20322				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20323				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20324		return result, validation.NewError("web.AppsClient", "ListConnectionStrings", err.Error())
20325	}
20326
20327	req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name)
20328	if err != nil {
20329		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request")
20330		return
20331	}
20332
20333	resp, err := client.ListConnectionStringsSender(req)
20334	if err != nil {
20335		result.Response = autorest.Response{Response: resp}
20336		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request")
20337		return
20338	}
20339
20340	result, err = client.ListConnectionStringsResponder(resp)
20341	if err != nil {
20342		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request")
20343		return
20344	}
20345
20346	return
20347}
20348
20349// ListConnectionStringsPreparer prepares the ListConnectionStrings request.
20350func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20351	pathParameters := map[string]interface{}{
20352		"name":              autorest.Encode("path", name),
20353		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20354		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20355	}
20356
20357	const APIVersion = "2021-01-15"
20358	queryParameters := map[string]interface{}{
20359		"api-version": APIVersion,
20360	}
20361
20362	preparer := autorest.CreatePreparer(
20363		autorest.AsPost(),
20364		autorest.WithBaseURL(client.BaseURI),
20365		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters),
20366		autorest.WithQueryParameters(queryParameters))
20367	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20368}
20369
20370// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the
20371// http.Response Body if it receives an error.
20372func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) {
20373	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20374}
20375
20376// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always
20377// closes the http.Response Body.
20378func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
20379	err = autorest.Respond(
20380		resp,
20381		azure.WithErrorUnlessStatusCode(http.StatusOK),
20382		autorest.ByUnmarshallingJSON(&result),
20383		autorest.ByClosing())
20384	result.Response = autorest.Response{Response: resp}
20385	return
20386}
20387
20388// ListConnectionStringsSlot description for Gets the connection strings of an app.
20389// Parameters:
20390// resourceGroupName - name of the resource group to which the resource belongs.
20391// name - name of the app.
20392// slot - name of the deployment slot. If a slot is not specified, the API will get the connection settings for
20393// the production slot.
20394func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) {
20395	if tracing.IsEnabled() {
20396		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot")
20397		defer func() {
20398			sc := -1
20399			if result.Response.Response != nil {
20400				sc = result.Response.Response.StatusCode
20401			}
20402			tracing.EndSpan(ctx, sc, err)
20403		}()
20404	}
20405	if err := validation.Validate([]validation.Validation{
20406		{TargetValue: resourceGroupName,
20407			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20408				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20409				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20410		return result, validation.NewError("web.AppsClient", "ListConnectionStringsSlot", err.Error())
20411	}
20412
20413	req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot)
20414	if err != nil {
20415		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request")
20416		return
20417	}
20418
20419	resp, err := client.ListConnectionStringsSlotSender(req)
20420	if err != nil {
20421		result.Response = autorest.Response{Response: resp}
20422		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request")
20423		return
20424	}
20425
20426	result, err = client.ListConnectionStringsSlotResponder(resp)
20427	if err != nil {
20428		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request")
20429		return
20430	}
20431
20432	return
20433}
20434
20435// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request.
20436func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20437	pathParameters := map[string]interface{}{
20438		"name":              autorest.Encode("path", name),
20439		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20440		"slot":              autorest.Encode("path", slot),
20441		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20442	}
20443
20444	const APIVersion = "2021-01-15"
20445	queryParameters := map[string]interface{}{
20446		"api-version": APIVersion,
20447	}
20448
20449	preparer := autorest.CreatePreparer(
20450		autorest.AsPost(),
20451		autorest.WithBaseURL(client.BaseURI),
20452		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters),
20453		autorest.WithQueryParameters(queryParameters))
20454	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20455}
20456
20457// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the
20458// http.Response Body if it receives an error.
20459func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) {
20460	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20461}
20462
20463// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always
20464// closes the http.Response Body.
20465func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
20466	err = autorest.Respond(
20467		resp,
20468		azure.WithErrorUnlessStatusCode(http.StatusOK),
20469		autorest.ByUnmarshallingJSON(&result),
20470		autorest.ByClosing())
20471	result.Response = autorest.Response{Response: resp}
20472	return
20473}
20474
20475// ListContinuousWebJobs description for List continuous web jobs for an app, or a deployment slot.
20476// Parameters:
20477// resourceGroupName - name of the resource group to which the resource belongs.
20478// name - site name.
20479func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) {
20480	if tracing.IsEnabled() {
20481		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs")
20482		defer func() {
20483			sc := -1
20484			if result.cwjc.Response.Response != nil {
20485				sc = result.cwjc.Response.Response.StatusCode
20486			}
20487			tracing.EndSpan(ctx, sc, err)
20488		}()
20489	}
20490	if err := validation.Validate([]validation.Validation{
20491		{TargetValue: resourceGroupName,
20492			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20493				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20494				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20495		return result, validation.NewError("web.AppsClient", "ListContinuousWebJobs", err.Error())
20496	}
20497
20498	result.fn = client.listContinuousWebJobsNextResults
20499	req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name)
20500	if err != nil {
20501		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request")
20502		return
20503	}
20504
20505	resp, err := client.ListContinuousWebJobsSender(req)
20506	if err != nil {
20507		result.cwjc.Response = autorest.Response{Response: resp}
20508		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request")
20509		return
20510	}
20511
20512	result.cwjc, err = client.ListContinuousWebJobsResponder(resp)
20513	if err != nil {
20514		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request")
20515		return
20516	}
20517	if result.cwjc.hasNextLink() && result.cwjc.IsEmpty() {
20518		err = result.NextWithContext(ctx)
20519		return
20520	}
20521
20522	return
20523}
20524
20525// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request.
20526func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20527	pathParameters := map[string]interface{}{
20528		"name":              autorest.Encode("path", name),
20529		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20530		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20531	}
20532
20533	const APIVersion = "2021-01-15"
20534	queryParameters := map[string]interface{}{
20535		"api-version": APIVersion,
20536	}
20537
20538	preparer := autorest.CreatePreparer(
20539		autorest.AsGet(),
20540		autorest.WithBaseURL(client.BaseURI),
20541		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters),
20542		autorest.WithQueryParameters(queryParameters))
20543	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20544}
20545
20546// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the
20547// http.Response Body if it receives an error.
20548func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) {
20549	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20550}
20551
20552// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always
20553// closes the http.Response Body.
20554func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) {
20555	err = autorest.Respond(
20556		resp,
20557		azure.WithErrorUnlessStatusCode(http.StatusOK),
20558		autorest.ByUnmarshallingJSON(&result),
20559		autorest.ByClosing())
20560	result.Response = autorest.Response{Response: resp}
20561	return
20562}
20563
20564// listContinuousWebJobsNextResults retrieves the next set of results, if any.
20565func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) {
20566	req, err := lastResults.continuousWebJobCollectionPreparer(ctx)
20567	if err != nil {
20568		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request")
20569	}
20570	if req == nil {
20571		return
20572	}
20573	resp, err := client.ListContinuousWebJobsSender(req)
20574	if err != nil {
20575		result.Response = autorest.Response{Response: resp}
20576		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request")
20577	}
20578	result, err = client.ListContinuousWebJobsResponder(resp)
20579	if err != nil {
20580		err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request")
20581	}
20582	return
20583}
20584
20585// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
20586func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) {
20587	if tracing.IsEnabled() {
20588		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs")
20589		defer func() {
20590			sc := -1
20591			if result.Response().Response.Response != nil {
20592				sc = result.page.Response().Response.Response.StatusCode
20593			}
20594			tracing.EndSpan(ctx, sc, err)
20595		}()
20596	}
20597	result.page, err = client.ListContinuousWebJobs(ctx, resourceGroupName, name)
20598	return
20599}
20600
20601// ListContinuousWebJobsSlot description for List continuous web jobs for an app, or a deployment slot.
20602// Parameters:
20603// resourceGroupName - name of the resource group to which the resource belongs.
20604// name - site name.
20605// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
20606// production slot.
20607func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) {
20608	if tracing.IsEnabled() {
20609		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot")
20610		defer func() {
20611			sc := -1
20612			if result.cwjc.Response.Response != nil {
20613				sc = result.cwjc.Response.Response.StatusCode
20614			}
20615			tracing.EndSpan(ctx, sc, err)
20616		}()
20617	}
20618	if err := validation.Validate([]validation.Validation{
20619		{TargetValue: resourceGroupName,
20620			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20621				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20622				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20623		return result, validation.NewError("web.AppsClient", "ListContinuousWebJobsSlot", err.Error())
20624	}
20625
20626	result.fn = client.listContinuousWebJobsSlotNextResults
20627	req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
20628	if err != nil {
20629		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request")
20630		return
20631	}
20632
20633	resp, err := client.ListContinuousWebJobsSlotSender(req)
20634	if err != nil {
20635		result.cwjc.Response = autorest.Response{Response: resp}
20636		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request")
20637		return
20638	}
20639
20640	result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp)
20641	if err != nil {
20642		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request")
20643		return
20644	}
20645	if result.cwjc.hasNextLink() && result.cwjc.IsEmpty() {
20646		err = result.NextWithContext(ctx)
20647		return
20648	}
20649
20650	return
20651}
20652
20653// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request.
20654func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20655	pathParameters := map[string]interface{}{
20656		"name":              autorest.Encode("path", name),
20657		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20658		"slot":              autorest.Encode("path", slot),
20659		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20660	}
20661
20662	const APIVersion = "2021-01-15"
20663	queryParameters := map[string]interface{}{
20664		"api-version": APIVersion,
20665	}
20666
20667	preparer := autorest.CreatePreparer(
20668		autorest.AsGet(),
20669		autorest.WithBaseURL(client.BaseURI),
20670		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters),
20671		autorest.WithQueryParameters(queryParameters))
20672	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20673}
20674
20675// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the
20676// http.Response Body if it receives an error.
20677func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) {
20678	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20679}
20680
20681// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always
20682// closes the http.Response Body.
20683func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) {
20684	err = autorest.Respond(
20685		resp,
20686		azure.WithErrorUnlessStatusCode(http.StatusOK),
20687		autorest.ByUnmarshallingJSON(&result),
20688		autorest.ByClosing())
20689	result.Response = autorest.Response{Response: resp}
20690	return
20691}
20692
20693// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any.
20694func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) {
20695	req, err := lastResults.continuousWebJobCollectionPreparer(ctx)
20696	if err != nil {
20697		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request")
20698	}
20699	if req == nil {
20700		return
20701	}
20702	resp, err := client.ListContinuousWebJobsSlotSender(req)
20703	if err != nil {
20704		result.Response = autorest.Response{Response: resp}
20705		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request")
20706	}
20707	result, err = client.ListContinuousWebJobsSlotResponder(resp)
20708	if err != nil {
20709		err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request")
20710	}
20711	return
20712}
20713
20714// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
20715func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) {
20716	if tracing.IsEnabled() {
20717		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot")
20718		defer func() {
20719			sc := -1
20720			if result.Response().Response.Response != nil {
20721				sc = result.page.Response().Response.Response.StatusCode
20722			}
20723			tracing.EndSpan(ctx, sc, err)
20724		}()
20725	}
20726	result.page, err = client.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot)
20727	return
20728}
20729
20730// ListDeploymentLog description for List deployment log for specific deployment for an app, or a deployment slot.
20731// Parameters:
20732// resourceGroupName - name of the resource group to which the resource belongs.
20733// name - name of the app.
20734// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET
20735// /api/sites/{siteName}/deployments".
20736func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) {
20737	if tracing.IsEnabled() {
20738		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog")
20739		defer func() {
20740			sc := -1
20741			if result.Response.Response != nil {
20742				sc = result.Response.Response.StatusCode
20743			}
20744			tracing.EndSpan(ctx, sc, err)
20745		}()
20746	}
20747	if err := validation.Validate([]validation.Validation{
20748		{TargetValue: resourceGroupName,
20749			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20750				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20751				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20752		return result, validation.NewError("web.AppsClient", "ListDeploymentLog", err.Error())
20753	}
20754
20755	req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID)
20756	if err != nil {
20757		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request")
20758		return
20759	}
20760
20761	resp, err := client.ListDeploymentLogSender(req)
20762	if err != nil {
20763		result.Response = autorest.Response{Response: resp}
20764		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request")
20765		return
20766	}
20767
20768	result, err = client.ListDeploymentLogResponder(resp)
20769	if err != nil {
20770		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request")
20771		return
20772	}
20773
20774	return
20775}
20776
20777// ListDeploymentLogPreparer prepares the ListDeploymentLog request.
20778func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
20779	pathParameters := map[string]interface{}{
20780		"id":                autorest.Encode("path", ID),
20781		"name":              autorest.Encode("path", name),
20782		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20783		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20784	}
20785
20786	const APIVersion = "2021-01-15"
20787	queryParameters := map[string]interface{}{
20788		"api-version": APIVersion,
20789	}
20790
20791	preparer := autorest.CreatePreparer(
20792		autorest.AsGet(),
20793		autorest.WithBaseURL(client.BaseURI),
20794		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters),
20795		autorest.WithQueryParameters(queryParameters))
20796	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20797}
20798
20799// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the
20800// http.Response Body if it receives an error.
20801func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) {
20802	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20803}
20804
20805// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always
20806// closes the http.Response Body.
20807func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) {
20808	err = autorest.Respond(
20809		resp,
20810		azure.WithErrorUnlessStatusCode(http.StatusOK),
20811		autorest.ByUnmarshallingJSON(&result),
20812		autorest.ByClosing())
20813	result.Response = autorest.Response{Response: resp}
20814	return
20815}
20816
20817// ListDeploymentLogSlot description for List deployment log for specific deployment for an app, or a deployment slot.
20818// Parameters:
20819// resourceGroupName - name of the resource group to which the resource belongs.
20820// name - name of the app.
20821// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET
20822// /api/sites/{siteName}/deployments".
20823// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
20824// production slot.
20825func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) {
20826	if tracing.IsEnabled() {
20827		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot")
20828		defer func() {
20829			sc := -1
20830			if result.Response.Response != nil {
20831				sc = result.Response.Response.StatusCode
20832			}
20833			tracing.EndSpan(ctx, sc, err)
20834		}()
20835	}
20836	if err := validation.Validate([]validation.Validation{
20837		{TargetValue: resourceGroupName,
20838			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20839				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20840				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20841		return result, validation.NewError("web.AppsClient", "ListDeploymentLogSlot", err.Error())
20842	}
20843
20844	req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot)
20845	if err != nil {
20846		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request")
20847		return
20848	}
20849
20850	resp, err := client.ListDeploymentLogSlotSender(req)
20851	if err != nil {
20852		result.Response = autorest.Response{Response: resp}
20853		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request")
20854		return
20855	}
20856
20857	result, err = client.ListDeploymentLogSlotResponder(resp)
20858	if err != nil {
20859		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request")
20860		return
20861	}
20862
20863	return
20864}
20865
20866// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request.
20867func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
20868	pathParameters := map[string]interface{}{
20869		"id":                autorest.Encode("path", ID),
20870		"name":              autorest.Encode("path", name),
20871		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20872		"slot":              autorest.Encode("path", slot),
20873		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20874	}
20875
20876	const APIVersion = "2021-01-15"
20877	queryParameters := map[string]interface{}{
20878		"api-version": APIVersion,
20879	}
20880
20881	preparer := autorest.CreatePreparer(
20882		autorest.AsGet(),
20883		autorest.WithBaseURL(client.BaseURI),
20884		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters),
20885		autorest.WithQueryParameters(queryParameters))
20886	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20887}
20888
20889// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the
20890// http.Response Body if it receives an error.
20891func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) {
20892	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20893}
20894
20895// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always
20896// closes the http.Response Body.
20897func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) {
20898	err = autorest.Respond(
20899		resp,
20900		azure.WithErrorUnlessStatusCode(http.StatusOK),
20901		autorest.ByUnmarshallingJSON(&result),
20902		autorest.ByClosing())
20903	result.Response = autorest.Response{Response: resp}
20904	return
20905}
20906
20907// ListDeployments description for List deployments for an app, or a deployment slot.
20908// Parameters:
20909// resourceGroupName - name of the resource group to which the resource belongs.
20910// name - name of the app.
20911func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) {
20912	if tracing.IsEnabled() {
20913		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments")
20914		defer func() {
20915			sc := -1
20916			if result.dc.Response.Response != nil {
20917				sc = result.dc.Response.Response.StatusCode
20918			}
20919			tracing.EndSpan(ctx, sc, err)
20920		}()
20921	}
20922	if err := validation.Validate([]validation.Validation{
20923		{TargetValue: resourceGroupName,
20924			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20925				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20926				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20927		return result, validation.NewError("web.AppsClient", "ListDeployments", err.Error())
20928	}
20929
20930	result.fn = client.listDeploymentsNextResults
20931	req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name)
20932	if err != nil {
20933		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request")
20934		return
20935	}
20936
20937	resp, err := client.ListDeploymentsSender(req)
20938	if err != nil {
20939		result.dc.Response = autorest.Response{Response: resp}
20940		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request")
20941		return
20942	}
20943
20944	result.dc, err = client.ListDeploymentsResponder(resp)
20945	if err != nil {
20946		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request")
20947		return
20948	}
20949	if result.dc.hasNextLink() && result.dc.IsEmpty() {
20950		err = result.NextWithContext(ctx)
20951		return
20952	}
20953
20954	return
20955}
20956
20957// ListDeploymentsPreparer prepares the ListDeployments request.
20958func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20959	pathParameters := map[string]interface{}{
20960		"name":              autorest.Encode("path", name),
20961		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20962		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20963	}
20964
20965	const APIVersion = "2021-01-15"
20966	queryParameters := map[string]interface{}{
20967		"api-version": APIVersion,
20968	}
20969
20970	preparer := autorest.CreatePreparer(
20971		autorest.AsGet(),
20972		autorest.WithBaseURL(client.BaseURI),
20973		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters),
20974		autorest.WithQueryParameters(queryParameters))
20975	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20976}
20977
20978// ListDeploymentsSender sends the ListDeployments request. The method will close the
20979// http.Response Body if it receives an error.
20980func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) {
20981	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20982}
20983
20984// ListDeploymentsResponder handles the response to the ListDeployments request. The method always
20985// closes the http.Response Body.
20986func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) {
20987	err = autorest.Respond(
20988		resp,
20989		azure.WithErrorUnlessStatusCode(http.StatusOK),
20990		autorest.ByUnmarshallingJSON(&result),
20991		autorest.ByClosing())
20992	result.Response = autorest.Response{Response: resp}
20993	return
20994}
20995
20996// listDeploymentsNextResults retrieves the next set of results, if any.
20997func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) {
20998	req, err := lastResults.deploymentCollectionPreparer(ctx)
20999	if err != nil {
21000		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request")
21001	}
21002	if req == nil {
21003		return
21004	}
21005	resp, err := client.ListDeploymentsSender(req)
21006	if err != nil {
21007		result.Response = autorest.Response{Response: resp}
21008		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request")
21009	}
21010	result, err = client.ListDeploymentsResponder(resp)
21011	if err != nil {
21012		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request")
21013	}
21014	return
21015}
21016
21017// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required.
21018func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) {
21019	if tracing.IsEnabled() {
21020		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments")
21021		defer func() {
21022			sc := -1
21023			if result.Response().Response.Response != nil {
21024				sc = result.page.Response().Response.Response.StatusCode
21025			}
21026			tracing.EndSpan(ctx, sc, err)
21027		}()
21028	}
21029	result.page, err = client.ListDeployments(ctx, resourceGroupName, name)
21030	return
21031}
21032
21033// ListDeploymentsSlot description for List deployments for an app, or a deployment slot.
21034// Parameters:
21035// resourceGroupName - name of the resource group to which the resource belongs.
21036// name - name of the app.
21037// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
21038// production slot.
21039func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) {
21040	if tracing.IsEnabled() {
21041		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot")
21042		defer func() {
21043			sc := -1
21044			if result.dc.Response.Response != nil {
21045				sc = result.dc.Response.Response.StatusCode
21046			}
21047			tracing.EndSpan(ctx, sc, err)
21048		}()
21049	}
21050	if err := validation.Validate([]validation.Validation{
21051		{TargetValue: resourceGroupName,
21052			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21053				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21054				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21055		return result, validation.NewError("web.AppsClient", "ListDeploymentsSlot", err.Error())
21056	}
21057
21058	result.fn = client.listDeploymentsSlotNextResults
21059	req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot)
21060	if err != nil {
21061		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request")
21062		return
21063	}
21064
21065	resp, err := client.ListDeploymentsSlotSender(req)
21066	if err != nil {
21067		result.dc.Response = autorest.Response{Response: resp}
21068		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request")
21069		return
21070	}
21071
21072	result.dc, err = client.ListDeploymentsSlotResponder(resp)
21073	if err != nil {
21074		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request")
21075		return
21076	}
21077	if result.dc.hasNextLink() && result.dc.IsEmpty() {
21078		err = result.NextWithContext(ctx)
21079		return
21080	}
21081
21082	return
21083}
21084
21085// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request.
21086func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21087	pathParameters := map[string]interface{}{
21088		"name":              autorest.Encode("path", name),
21089		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21090		"slot":              autorest.Encode("path", slot),
21091		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21092	}
21093
21094	const APIVersion = "2021-01-15"
21095	queryParameters := map[string]interface{}{
21096		"api-version": APIVersion,
21097	}
21098
21099	preparer := autorest.CreatePreparer(
21100		autorest.AsGet(),
21101		autorest.WithBaseURL(client.BaseURI),
21102		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters),
21103		autorest.WithQueryParameters(queryParameters))
21104	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21105}
21106
21107// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the
21108// http.Response Body if it receives an error.
21109func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) {
21110	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21111}
21112
21113// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always
21114// closes the http.Response Body.
21115func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) {
21116	err = autorest.Respond(
21117		resp,
21118		azure.WithErrorUnlessStatusCode(http.StatusOK),
21119		autorest.ByUnmarshallingJSON(&result),
21120		autorest.ByClosing())
21121	result.Response = autorest.Response{Response: resp}
21122	return
21123}
21124
21125// listDeploymentsSlotNextResults retrieves the next set of results, if any.
21126func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) {
21127	req, err := lastResults.deploymentCollectionPreparer(ctx)
21128	if err != nil {
21129		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request")
21130	}
21131	if req == nil {
21132		return
21133	}
21134	resp, err := client.ListDeploymentsSlotSender(req)
21135	if err != nil {
21136		result.Response = autorest.Response{Response: resp}
21137		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request")
21138	}
21139	result, err = client.ListDeploymentsSlotResponder(resp)
21140	if err != nil {
21141		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request")
21142	}
21143	return
21144}
21145
21146// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required.
21147func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) {
21148	if tracing.IsEnabled() {
21149		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot")
21150		defer func() {
21151			sc := -1
21152			if result.Response().Response.Response != nil {
21153				sc = result.page.Response().Response.Response.StatusCode
21154			}
21155			tracing.EndSpan(ctx, sc, err)
21156		}()
21157	}
21158	result.page, err = client.ListDeploymentsSlot(ctx, resourceGroupName, name, slot)
21159	return
21160}
21161
21162// ListDomainOwnershipIdentifiers description for Lists ownership identifiers for domain associated with web app.
21163// Parameters:
21164// resourceGroupName - name of the resource group to which the resource belongs.
21165// name - name of the app.
21166func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) {
21167	if tracing.IsEnabled() {
21168		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers")
21169		defer func() {
21170			sc := -1
21171			if result.ic.Response.Response != nil {
21172				sc = result.ic.Response.Response.StatusCode
21173			}
21174			tracing.EndSpan(ctx, sc, err)
21175		}()
21176	}
21177	if err := validation.Validate([]validation.Validation{
21178		{TargetValue: resourceGroupName,
21179			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21180				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21181				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21182		return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiers", err.Error())
21183	}
21184
21185	result.fn = client.listDomainOwnershipIdentifiersNextResults
21186	req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name)
21187	if err != nil {
21188		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request")
21189		return
21190	}
21191
21192	resp, err := client.ListDomainOwnershipIdentifiersSender(req)
21193	if err != nil {
21194		result.ic.Response = autorest.Response{Response: resp}
21195		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request")
21196		return
21197	}
21198
21199	result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp)
21200	if err != nil {
21201		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request")
21202		return
21203	}
21204	if result.ic.hasNextLink() && result.ic.IsEmpty() {
21205		err = result.NextWithContext(ctx)
21206		return
21207	}
21208
21209	return
21210}
21211
21212// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request.
21213func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21214	pathParameters := map[string]interface{}{
21215		"name":              autorest.Encode("path", name),
21216		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21217		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21218	}
21219
21220	const APIVersion = "2021-01-15"
21221	queryParameters := map[string]interface{}{
21222		"api-version": APIVersion,
21223	}
21224
21225	preparer := autorest.CreatePreparer(
21226		autorest.AsGet(),
21227		autorest.WithBaseURL(client.BaseURI),
21228		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters),
21229		autorest.WithQueryParameters(queryParameters))
21230	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21231}
21232
21233// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the
21234// http.Response Body if it receives an error.
21235func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) {
21236	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21237}
21238
21239// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always
21240// closes the http.Response Body.
21241func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) {
21242	err = autorest.Respond(
21243		resp,
21244		azure.WithErrorUnlessStatusCode(http.StatusOK),
21245		autorest.ByUnmarshallingJSON(&result),
21246		autorest.ByClosing())
21247	result.Response = autorest.Response{Response: resp}
21248	return
21249}
21250
21251// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any.
21252func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) {
21253	req, err := lastResults.identifierCollectionPreparer(ctx)
21254	if err != nil {
21255		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request")
21256	}
21257	if req == nil {
21258		return
21259	}
21260	resp, err := client.ListDomainOwnershipIdentifiersSender(req)
21261	if err != nil {
21262		result.Response = autorest.Response{Response: resp}
21263		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request")
21264	}
21265	result, err = client.ListDomainOwnershipIdentifiersResponder(resp)
21266	if err != nil {
21267		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request")
21268	}
21269	return
21270}
21271
21272// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required.
21273func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) {
21274	if tracing.IsEnabled() {
21275		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers")
21276		defer func() {
21277			sc := -1
21278			if result.Response().Response.Response != nil {
21279				sc = result.page.Response().Response.Response.StatusCode
21280			}
21281			tracing.EndSpan(ctx, sc, err)
21282		}()
21283	}
21284	result.page, err = client.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name)
21285	return
21286}
21287
21288// ListDomainOwnershipIdentifiersSlot description for Lists ownership identifiers for domain associated with web app.
21289// Parameters:
21290// resourceGroupName - name of the resource group to which the resource belongs.
21291// name - name of the app.
21292// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
21293// production slot.
21294func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) {
21295	if tracing.IsEnabled() {
21296		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot")
21297		defer func() {
21298			sc := -1
21299			if result.ic.Response.Response != nil {
21300				sc = result.ic.Response.Response.StatusCode
21301			}
21302			tracing.EndSpan(ctx, sc, err)
21303		}()
21304	}
21305	if err := validation.Validate([]validation.Validation{
21306		{TargetValue: resourceGroupName,
21307			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21308				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21309				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21310		return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiersSlot", err.Error())
21311	}
21312
21313	result.fn = client.listDomainOwnershipIdentifiersSlotNextResults
21314	req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot)
21315	if err != nil {
21316		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request")
21317		return
21318	}
21319
21320	resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req)
21321	if err != nil {
21322		result.ic.Response = autorest.Response{Response: resp}
21323		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request")
21324		return
21325	}
21326
21327	result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp)
21328	if err != nil {
21329		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request")
21330		return
21331	}
21332	if result.ic.hasNextLink() && result.ic.IsEmpty() {
21333		err = result.NextWithContext(ctx)
21334		return
21335	}
21336
21337	return
21338}
21339
21340// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request.
21341func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21342	pathParameters := map[string]interface{}{
21343		"name":              autorest.Encode("path", name),
21344		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21345		"slot":              autorest.Encode("path", slot),
21346		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21347	}
21348
21349	const APIVersion = "2021-01-15"
21350	queryParameters := map[string]interface{}{
21351		"api-version": APIVersion,
21352	}
21353
21354	preparer := autorest.CreatePreparer(
21355		autorest.AsGet(),
21356		autorest.WithBaseURL(client.BaseURI),
21357		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters),
21358		autorest.WithQueryParameters(queryParameters))
21359	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21360}
21361
21362// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the
21363// http.Response Body if it receives an error.
21364func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) {
21365	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21366}
21367
21368// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always
21369// closes the http.Response Body.
21370func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) {
21371	err = autorest.Respond(
21372		resp,
21373		azure.WithErrorUnlessStatusCode(http.StatusOK),
21374		autorest.ByUnmarshallingJSON(&result),
21375		autorest.ByClosing())
21376	result.Response = autorest.Response{Response: resp}
21377	return
21378}
21379
21380// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any.
21381func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) {
21382	req, err := lastResults.identifierCollectionPreparer(ctx)
21383	if err != nil {
21384		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request")
21385	}
21386	if req == nil {
21387		return
21388	}
21389	resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req)
21390	if err != nil {
21391		result.Response = autorest.Response{Response: resp}
21392		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request")
21393	}
21394	result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp)
21395	if err != nil {
21396		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request")
21397	}
21398	return
21399}
21400
21401// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required.
21402func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) {
21403	if tracing.IsEnabled() {
21404		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot")
21405		defer func() {
21406			sc := -1
21407			if result.Response().Response.Response != nil {
21408				sc = result.page.Response().Response.Response.StatusCode
21409			}
21410			tracing.EndSpan(ctx, sc, err)
21411		}()
21412	}
21413	result.page, err = client.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot)
21414	return
21415}
21416
21417// ListFunctionKeys description for Get function keys for a function in a web site, or a deployment slot.
21418// Parameters:
21419// resourceGroupName - name of the resource group to which the resource belongs.
21420// name - site name.
21421// functionName - function name.
21422func (client AppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result StringDictionary, err error) {
21423	if tracing.IsEnabled() {
21424		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeys")
21425		defer func() {
21426			sc := -1
21427			if result.Response.Response != nil {
21428				sc = result.Response.Response.StatusCode
21429			}
21430			tracing.EndSpan(ctx, sc, err)
21431		}()
21432	}
21433	if err := validation.Validate([]validation.Validation{
21434		{TargetValue: resourceGroupName,
21435			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21436				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21437				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21438		return result, validation.NewError("web.AppsClient", "ListFunctionKeys", err.Error())
21439	}
21440
21441	req, err := client.ListFunctionKeysPreparer(ctx, resourceGroupName, name, functionName)
21442	if err != nil {
21443		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", nil, "Failure preparing request")
21444		return
21445	}
21446
21447	resp, err := client.ListFunctionKeysSender(req)
21448	if err != nil {
21449		result.Response = autorest.Response{Response: resp}
21450		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure sending request")
21451		return
21452	}
21453
21454	result, err = client.ListFunctionKeysResponder(resp)
21455	if err != nil {
21456		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure responding to request")
21457		return
21458	}
21459
21460	return
21461}
21462
21463// ListFunctionKeysPreparer prepares the ListFunctionKeys request.
21464func (client AppsClient) ListFunctionKeysPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
21465	pathParameters := map[string]interface{}{
21466		"functionName":      autorest.Encode("path", functionName),
21467		"name":              autorest.Encode("path", name),
21468		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21469		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21470	}
21471
21472	const APIVersion = "2021-01-15"
21473	queryParameters := map[string]interface{}{
21474		"api-version": APIVersion,
21475	}
21476
21477	preparer := autorest.CreatePreparer(
21478		autorest.AsPost(),
21479		autorest.WithBaseURL(client.BaseURI),
21480		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys", pathParameters),
21481		autorest.WithQueryParameters(queryParameters))
21482	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21483}
21484
21485// ListFunctionKeysSender sends the ListFunctionKeys request. The method will close the
21486// http.Response Body if it receives an error.
21487func (client AppsClient) ListFunctionKeysSender(req *http.Request) (*http.Response, error) {
21488	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21489}
21490
21491// ListFunctionKeysResponder handles the response to the ListFunctionKeys request. The method always
21492// closes the http.Response Body.
21493func (client AppsClient) ListFunctionKeysResponder(resp *http.Response) (result StringDictionary, err error) {
21494	err = autorest.Respond(
21495		resp,
21496		azure.WithErrorUnlessStatusCode(http.StatusOK),
21497		autorest.ByUnmarshallingJSON(&result),
21498		autorest.ByClosing())
21499	result.Response = autorest.Response{Response: resp}
21500	return
21501}
21502
21503// ListFunctionKeysSlot description for Get function keys for a function in a web site, or a deployment slot.
21504// Parameters:
21505// resourceGroupName - name of the resource group to which the resource belongs.
21506// name - site name.
21507// functionName - function name.
21508// slot - name of the deployment slot.
21509func (client AppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result StringDictionary, err error) {
21510	if tracing.IsEnabled() {
21511		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeysSlot")
21512		defer func() {
21513			sc := -1
21514			if result.Response.Response != nil {
21515				sc = result.Response.Response.StatusCode
21516			}
21517			tracing.EndSpan(ctx, sc, err)
21518		}()
21519	}
21520	if err := validation.Validate([]validation.Validation{
21521		{TargetValue: resourceGroupName,
21522			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21523				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21524				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21525		return result, validation.NewError("web.AppsClient", "ListFunctionKeysSlot", err.Error())
21526	}
21527
21528	req, err := client.ListFunctionKeysSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
21529	if err != nil {
21530		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", nil, "Failure preparing request")
21531		return
21532	}
21533
21534	resp, err := client.ListFunctionKeysSlotSender(req)
21535	if err != nil {
21536		result.Response = autorest.Response{Response: resp}
21537		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure sending request")
21538		return
21539	}
21540
21541	result, err = client.ListFunctionKeysSlotResponder(resp)
21542	if err != nil {
21543		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure responding to request")
21544		return
21545	}
21546
21547	return
21548}
21549
21550// ListFunctionKeysSlotPreparer prepares the ListFunctionKeysSlot request.
21551func (client AppsClient) ListFunctionKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
21552	pathParameters := map[string]interface{}{
21553		"functionName":      autorest.Encode("path", functionName),
21554		"name":              autorest.Encode("path", name),
21555		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21556		"slot":              autorest.Encode("path", slot),
21557		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21558	}
21559
21560	const APIVersion = "2021-01-15"
21561	queryParameters := map[string]interface{}{
21562		"api-version": APIVersion,
21563	}
21564
21565	preparer := autorest.CreatePreparer(
21566		autorest.AsPost(),
21567		autorest.WithBaseURL(client.BaseURI),
21568		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys", pathParameters),
21569		autorest.WithQueryParameters(queryParameters))
21570	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21571}
21572
21573// ListFunctionKeysSlotSender sends the ListFunctionKeysSlot request. The method will close the
21574// http.Response Body if it receives an error.
21575func (client AppsClient) ListFunctionKeysSlotSender(req *http.Request) (*http.Response, error) {
21576	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21577}
21578
21579// ListFunctionKeysSlotResponder handles the response to the ListFunctionKeysSlot request. The method always
21580// closes the http.Response Body.
21581func (client AppsClient) ListFunctionKeysSlotResponder(resp *http.Response) (result StringDictionary, err error) {
21582	err = autorest.Respond(
21583		resp,
21584		azure.WithErrorUnlessStatusCode(http.StatusOK),
21585		autorest.ByUnmarshallingJSON(&result),
21586		autorest.ByClosing())
21587	result.Response = autorest.Response{Response: resp}
21588	return
21589}
21590
21591// ListFunctions description for List the functions for a web site, or a deployment slot.
21592// Parameters:
21593// resourceGroupName - name of the resource group to which the resource belongs.
21594// name - site name.
21595func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) {
21596	if tracing.IsEnabled() {
21597		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions")
21598		defer func() {
21599			sc := -1
21600			if result.fec.Response.Response != nil {
21601				sc = result.fec.Response.Response.StatusCode
21602			}
21603			tracing.EndSpan(ctx, sc, err)
21604		}()
21605	}
21606	if err := validation.Validate([]validation.Validation{
21607		{TargetValue: resourceGroupName,
21608			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21609				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21610				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21611		return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error())
21612	}
21613
21614	result.fn = client.listFunctionsNextResults
21615	req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name)
21616	if err != nil {
21617		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request")
21618		return
21619	}
21620
21621	resp, err := client.ListFunctionsSender(req)
21622	if err != nil {
21623		result.fec.Response = autorest.Response{Response: resp}
21624		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request")
21625		return
21626	}
21627
21628	result.fec, err = client.ListFunctionsResponder(resp)
21629	if err != nil {
21630		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request")
21631		return
21632	}
21633	if result.fec.hasNextLink() && result.fec.IsEmpty() {
21634		err = result.NextWithContext(ctx)
21635		return
21636	}
21637
21638	return
21639}
21640
21641// ListFunctionsPreparer prepares the ListFunctions request.
21642func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21643	pathParameters := map[string]interface{}{
21644		"name":              autorest.Encode("path", name),
21645		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21646		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21647	}
21648
21649	const APIVersion = "2021-01-15"
21650	queryParameters := map[string]interface{}{
21651		"api-version": APIVersion,
21652	}
21653
21654	preparer := autorest.CreatePreparer(
21655		autorest.AsGet(),
21656		autorest.WithBaseURL(client.BaseURI),
21657		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters),
21658		autorest.WithQueryParameters(queryParameters))
21659	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21660}
21661
21662// ListFunctionsSender sends the ListFunctions request. The method will close the
21663// http.Response Body if it receives an error.
21664func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) {
21665	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21666}
21667
21668// ListFunctionsResponder handles the response to the ListFunctions request. The method always
21669// closes the http.Response Body.
21670func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) {
21671	err = autorest.Respond(
21672		resp,
21673		azure.WithErrorUnlessStatusCode(http.StatusOK),
21674		autorest.ByUnmarshallingJSON(&result),
21675		autorest.ByClosing())
21676	result.Response = autorest.Response{Response: resp}
21677	return
21678}
21679
21680// listFunctionsNextResults retrieves the next set of results, if any.
21681func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) {
21682	req, err := lastResults.functionEnvelopeCollectionPreparer(ctx)
21683	if err != nil {
21684		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request")
21685	}
21686	if req == nil {
21687		return
21688	}
21689	resp, err := client.ListFunctionsSender(req)
21690	if err != nil {
21691		result.Response = autorest.Response{Response: resp}
21692		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request")
21693	}
21694	result, err = client.ListFunctionsResponder(resp)
21695	if err != nil {
21696		err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request")
21697	}
21698	return
21699}
21700
21701// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required.
21702func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) {
21703	if tracing.IsEnabled() {
21704		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions")
21705		defer func() {
21706			sc := -1
21707			if result.Response().Response.Response != nil {
21708				sc = result.page.Response().Response.Response.StatusCode
21709			}
21710			tracing.EndSpan(ctx, sc, err)
21711		}()
21712	}
21713	result.page, err = client.ListFunctions(ctx, resourceGroupName, name)
21714	return
21715}
21716
21717// ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot.
21718// Parameters:
21719// resourceGroupName - name of the resource group to which the resource belongs.
21720// name - site name.
21721// functionName - function name.
21722func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) {
21723	if tracing.IsEnabled() {
21724		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets")
21725		defer func() {
21726			sc := -1
21727			if result.Response.Response != nil {
21728				sc = result.Response.Response.StatusCode
21729			}
21730			tracing.EndSpan(ctx, sc, err)
21731		}()
21732	}
21733	if err := validation.Validate([]validation.Validation{
21734		{TargetValue: resourceGroupName,
21735			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21736				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21737				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21738		return result, validation.NewError("web.AppsClient", "ListFunctionSecrets", err.Error())
21739	}
21740
21741	req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName)
21742	if err != nil {
21743		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request")
21744		return
21745	}
21746
21747	resp, err := client.ListFunctionSecretsSender(req)
21748	if err != nil {
21749		result.Response = autorest.Response{Response: resp}
21750		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request")
21751		return
21752	}
21753
21754	result, err = client.ListFunctionSecretsResponder(resp)
21755	if err != nil {
21756		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request")
21757		return
21758	}
21759
21760	return
21761}
21762
21763// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request.
21764func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
21765	pathParameters := map[string]interface{}{
21766		"functionName":      autorest.Encode("path", functionName),
21767		"name":              autorest.Encode("path", name),
21768		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21769		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21770	}
21771
21772	const APIVersion = "2021-01-15"
21773	queryParameters := map[string]interface{}{
21774		"api-version": APIVersion,
21775	}
21776
21777	preparer := autorest.CreatePreparer(
21778		autorest.AsPost(),
21779		autorest.WithBaseURL(client.BaseURI),
21780		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters),
21781		autorest.WithQueryParameters(queryParameters))
21782	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21783}
21784
21785// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the
21786// http.Response Body if it receives an error.
21787func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) {
21788	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21789}
21790
21791// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always
21792// closes the http.Response Body.
21793func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, 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// ListFunctionSecretsSlot description for Get function secrets for a function in a web site, or a deployment slot.
21804// Parameters:
21805// resourceGroupName - name of the resource group to which the resource belongs.
21806// name - site name.
21807// functionName - function name.
21808// slot - name of the deployment slot.
21809func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) {
21810	if tracing.IsEnabled() {
21811		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot")
21812		defer func() {
21813			sc := -1
21814			if result.Response.Response != nil {
21815				sc = result.Response.Response.StatusCode
21816			}
21817			tracing.EndSpan(ctx, sc, err)
21818		}()
21819	}
21820	if err := validation.Validate([]validation.Validation{
21821		{TargetValue: resourceGroupName,
21822			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21823				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21824				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21825		return result, validation.NewError("web.AppsClient", "ListFunctionSecretsSlot", err.Error())
21826	}
21827
21828	req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
21829	if err != nil {
21830		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request")
21831		return
21832	}
21833
21834	resp, err := client.ListFunctionSecretsSlotSender(req)
21835	if err != nil {
21836		result.Response = autorest.Response{Response: resp}
21837		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request")
21838		return
21839	}
21840
21841	result, err = client.ListFunctionSecretsSlotResponder(resp)
21842	if err != nil {
21843		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request")
21844		return
21845	}
21846
21847	return
21848}
21849
21850// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request.
21851func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
21852	pathParameters := map[string]interface{}{
21853		"functionName":      autorest.Encode("path", functionName),
21854		"name":              autorest.Encode("path", name),
21855		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21856		"slot":              autorest.Encode("path", slot),
21857		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21858	}
21859
21860	const APIVersion = "2021-01-15"
21861	queryParameters := map[string]interface{}{
21862		"api-version": APIVersion,
21863	}
21864
21865	preparer := autorest.CreatePreparer(
21866		autorest.AsPost(),
21867		autorest.WithBaseURL(client.BaseURI),
21868		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters),
21869		autorest.WithQueryParameters(queryParameters))
21870	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21871}
21872
21873// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the
21874// http.Response Body if it receives an error.
21875func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) {
21876	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21877}
21878
21879// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always
21880// closes the http.Response Body.
21881func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) {
21882	err = autorest.Respond(
21883		resp,
21884		azure.WithErrorUnlessStatusCode(http.StatusOK),
21885		autorest.ByUnmarshallingJSON(&result),
21886		autorest.ByClosing())
21887	result.Response = autorest.Response{Response: resp}
21888	return
21889}
21890
21891// ListHostKeys description for Get host secrets for a function app.
21892// Parameters:
21893// resourceGroupName - name of the resource group to which the resource belongs.
21894// name - site name.
21895func (client AppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result HostKeys, err error) {
21896	if tracing.IsEnabled() {
21897		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeys")
21898		defer func() {
21899			sc := -1
21900			if result.Response.Response != nil {
21901				sc = result.Response.Response.StatusCode
21902			}
21903			tracing.EndSpan(ctx, sc, err)
21904		}()
21905	}
21906	if err := validation.Validate([]validation.Validation{
21907		{TargetValue: resourceGroupName,
21908			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21909				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21910				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21911		return result, validation.NewError("web.AppsClient", "ListHostKeys", err.Error())
21912	}
21913
21914	req, err := client.ListHostKeysPreparer(ctx, resourceGroupName, name)
21915	if err != nil {
21916		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", nil, "Failure preparing request")
21917		return
21918	}
21919
21920	resp, err := client.ListHostKeysSender(req)
21921	if err != nil {
21922		result.Response = autorest.Response{Response: resp}
21923		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure sending request")
21924		return
21925	}
21926
21927	result, err = client.ListHostKeysResponder(resp)
21928	if err != nil {
21929		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure responding to request")
21930		return
21931	}
21932
21933	return
21934}
21935
21936// ListHostKeysPreparer prepares the ListHostKeys request.
21937func (client AppsClient) ListHostKeysPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21938	pathParameters := map[string]interface{}{
21939		"name":              autorest.Encode("path", name),
21940		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21941		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21942	}
21943
21944	const APIVersion = "2021-01-15"
21945	queryParameters := map[string]interface{}{
21946		"api-version": APIVersion,
21947	}
21948
21949	preparer := autorest.CreatePreparer(
21950		autorest.AsPost(),
21951		autorest.WithBaseURL(client.BaseURI),
21952		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys", pathParameters),
21953		autorest.WithQueryParameters(queryParameters))
21954	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21955}
21956
21957// ListHostKeysSender sends the ListHostKeys request. The method will close the
21958// http.Response Body if it receives an error.
21959func (client AppsClient) ListHostKeysSender(req *http.Request) (*http.Response, error) {
21960	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21961}
21962
21963// ListHostKeysResponder handles the response to the ListHostKeys request. The method always
21964// closes the http.Response Body.
21965func (client AppsClient) ListHostKeysResponder(resp *http.Response) (result HostKeys, err error) {
21966	err = autorest.Respond(
21967		resp,
21968		azure.WithErrorUnlessStatusCode(http.StatusOK),
21969		autorest.ByUnmarshallingJSON(&result),
21970		autorest.ByClosing())
21971	result.Response = autorest.Response{Response: resp}
21972	return
21973}
21974
21975// ListHostKeysSlot description for Get host secrets for a function app.
21976// Parameters:
21977// resourceGroupName - name of the resource group to which the resource belongs.
21978// name - site name.
21979// slot - name of the deployment slot.
21980func (client AppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostKeys, err error) {
21981	if tracing.IsEnabled() {
21982		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeysSlot")
21983		defer func() {
21984			sc := -1
21985			if result.Response.Response != nil {
21986				sc = result.Response.Response.StatusCode
21987			}
21988			tracing.EndSpan(ctx, sc, err)
21989		}()
21990	}
21991	if err := validation.Validate([]validation.Validation{
21992		{TargetValue: resourceGroupName,
21993			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21994				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21995				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21996		return result, validation.NewError("web.AppsClient", "ListHostKeysSlot", err.Error())
21997	}
21998
21999	req, err := client.ListHostKeysSlotPreparer(ctx, resourceGroupName, name, slot)
22000	if err != nil {
22001		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", nil, "Failure preparing request")
22002		return
22003	}
22004
22005	resp, err := client.ListHostKeysSlotSender(req)
22006	if err != nil {
22007		result.Response = autorest.Response{Response: resp}
22008		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure sending request")
22009		return
22010	}
22011
22012	result, err = client.ListHostKeysSlotResponder(resp)
22013	if err != nil {
22014		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure responding to request")
22015		return
22016	}
22017
22018	return
22019}
22020
22021// ListHostKeysSlotPreparer prepares the ListHostKeysSlot request.
22022func (client AppsClient) ListHostKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22023	pathParameters := map[string]interface{}{
22024		"name":              autorest.Encode("path", name),
22025		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22026		"slot":              autorest.Encode("path", slot),
22027		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22028	}
22029
22030	const APIVersion = "2021-01-15"
22031	queryParameters := map[string]interface{}{
22032		"api-version": APIVersion,
22033	}
22034
22035	preparer := autorest.CreatePreparer(
22036		autorest.AsPost(),
22037		autorest.WithBaseURL(client.BaseURI),
22038		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys", pathParameters),
22039		autorest.WithQueryParameters(queryParameters))
22040	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22041}
22042
22043// ListHostKeysSlotSender sends the ListHostKeysSlot request. The method will close the
22044// http.Response Body if it receives an error.
22045func (client AppsClient) ListHostKeysSlotSender(req *http.Request) (*http.Response, error) {
22046	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22047}
22048
22049// ListHostKeysSlotResponder handles the response to the ListHostKeysSlot request. The method always
22050// closes the http.Response Body.
22051func (client AppsClient) ListHostKeysSlotResponder(resp *http.Response) (result HostKeys, err error) {
22052	err = autorest.Respond(
22053		resp,
22054		azure.WithErrorUnlessStatusCode(http.StatusOK),
22055		autorest.ByUnmarshallingJSON(&result),
22056		autorest.ByClosing())
22057	result.Response = autorest.Response{Response: resp}
22058	return
22059}
22060
22061// ListHostNameBindings description for Get hostname bindings for an app or a deployment slot.
22062// Parameters:
22063// resourceGroupName - name of the resource group to which the resource belongs.
22064// name - name of the app.
22065func (client AppsClient) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result HostNameBindingCollectionPage, err error) {
22066	if tracing.IsEnabled() {
22067		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindings")
22068		defer func() {
22069			sc := -1
22070			if result.hnbc.Response.Response != nil {
22071				sc = result.hnbc.Response.Response.StatusCode
22072			}
22073			tracing.EndSpan(ctx, sc, err)
22074		}()
22075	}
22076	if err := validation.Validate([]validation.Validation{
22077		{TargetValue: resourceGroupName,
22078			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22079				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22080				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22081		return result, validation.NewError("web.AppsClient", "ListHostNameBindings", err.Error())
22082	}
22083
22084	result.fn = client.listHostNameBindingsNextResults
22085	req, err := client.ListHostNameBindingsPreparer(ctx, resourceGroupName, name)
22086	if err != nil {
22087		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", nil, "Failure preparing request")
22088		return
22089	}
22090
22091	resp, err := client.ListHostNameBindingsSender(req)
22092	if err != nil {
22093		result.hnbc.Response = autorest.Response{Response: resp}
22094		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", resp, "Failure sending request")
22095		return
22096	}
22097
22098	result.hnbc, err = client.ListHostNameBindingsResponder(resp)
22099	if err != nil {
22100		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", resp, "Failure responding to request")
22101		return
22102	}
22103	if result.hnbc.hasNextLink() && result.hnbc.IsEmpty() {
22104		err = result.NextWithContext(ctx)
22105		return
22106	}
22107
22108	return
22109}
22110
22111// ListHostNameBindingsPreparer prepares the ListHostNameBindings request.
22112func (client AppsClient) ListHostNameBindingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
22113	pathParameters := map[string]interface{}{
22114		"name":              autorest.Encode("path", name),
22115		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22116		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22117	}
22118
22119	const APIVersion = "2021-01-15"
22120	queryParameters := map[string]interface{}{
22121		"api-version": APIVersion,
22122	}
22123
22124	preparer := autorest.CreatePreparer(
22125		autorest.AsGet(),
22126		autorest.WithBaseURL(client.BaseURI),
22127		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings", pathParameters),
22128		autorest.WithQueryParameters(queryParameters))
22129	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22130}
22131
22132// ListHostNameBindingsSender sends the ListHostNameBindings request. The method will close the
22133// http.Response Body if it receives an error.
22134func (client AppsClient) ListHostNameBindingsSender(req *http.Request) (*http.Response, error) {
22135	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22136}
22137
22138// ListHostNameBindingsResponder handles the response to the ListHostNameBindings request. The method always
22139// closes the http.Response Body.
22140func (client AppsClient) ListHostNameBindingsResponder(resp *http.Response) (result HostNameBindingCollection, err error) {
22141	err = autorest.Respond(
22142		resp,
22143		azure.WithErrorUnlessStatusCode(http.StatusOK),
22144		autorest.ByUnmarshallingJSON(&result),
22145		autorest.ByClosing())
22146	result.Response = autorest.Response{Response: resp}
22147	return
22148}
22149
22150// listHostNameBindingsNextResults retrieves the next set of results, if any.
22151func (client AppsClient) listHostNameBindingsNextResults(ctx context.Context, lastResults HostNameBindingCollection) (result HostNameBindingCollection, err error) {
22152	req, err := lastResults.hostNameBindingCollectionPreparer(ctx)
22153	if err != nil {
22154		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", nil, "Failure preparing next results request")
22155	}
22156	if req == nil {
22157		return
22158	}
22159	resp, err := client.ListHostNameBindingsSender(req)
22160	if err != nil {
22161		result.Response = autorest.Response{Response: resp}
22162		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", resp, "Failure sending next results request")
22163	}
22164	result, err = client.ListHostNameBindingsResponder(resp)
22165	if err != nil {
22166		err = autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", resp, "Failure responding to next results request")
22167	}
22168	return
22169}
22170
22171// ListHostNameBindingsComplete enumerates all values, automatically crossing page boundaries as required.
22172func (client AppsClient) ListHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result HostNameBindingCollectionIterator, err error) {
22173	if tracing.IsEnabled() {
22174		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindings")
22175		defer func() {
22176			sc := -1
22177			if result.Response().Response.Response != nil {
22178				sc = result.page.Response().Response.Response.StatusCode
22179			}
22180			tracing.EndSpan(ctx, sc, err)
22181		}()
22182	}
22183	result.page, err = client.ListHostNameBindings(ctx, resourceGroupName, name)
22184	return
22185}
22186
22187// ListHostNameBindingsSlot description for Get hostname bindings for an app or a deployment slot.
22188// Parameters:
22189// resourceGroupName - name of the resource group to which the resource belongs.
22190// name - name of the app.
22191// slot - name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the
22192// production slot.
22193func (client AppsClient) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostNameBindingCollectionPage, err error) {
22194	if tracing.IsEnabled() {
22195		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindingsSlot")
22196		defer func() {
22197			sc := -1
22198			if result.hnbc.Response.Response != nil {
22199				sc = result.hnbc.Response.Response.StatusCode
22200			}
22201			tracing.EndSpan(ctx, sc, err)
22202		}()
22203	}
22204	if err := validation.Validate([]validation.Validation{
22205		{TargetValue: resourceGroupName,
22206			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22207				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22208				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22209		return result, validation.NewError("web.AppsClient", "ListHostNameBindingsSlot", err.Error())
22210	}
22211
22212	result.fn = client.listHostNameBindingsSlotNextResults
22213	req, err := client.ListHostNameBindingsSlotPreparer(ctx, resourceGroupName, name, slot)
22214	if err != nil {
22215		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", nil, "Failure preparing request")
22216		return
22217	}
22218
22219	resp, err := client.ListHostNameBindingsSlotSender(req)
22220	if err != nil {
22221		result.hnbc.Response = autorest.Response{Response: resp}
22222		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", resp, "Failure sending request")
22223		return
22224	}
22225
22226	result.hnbc, err = client.ListHostNameBindingsSlotResponder(resp)
22227	if err != nil {
22228		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", resp, "Failure responding to request")
22229		return
22230	}
22231	if result.hnbc.hasNextLink() && result.hnbc.IsEmpty() {
22232		err = result.NextWithContext(ctx)
22233		return
22234	}
22235
22236	return
22237}
22238
22239// ListHostNameBindingsSlotPreparer prepares the ListHostNameBindingsSlot request.
22240func (client AppsClient) ListHostNameBindingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22241	pathParameters := map[string]interface{}{
22242		"name":              autorest.Encode("path", name),
22243		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22244		"slot":              autorest.Encode("path", slot),
22245		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22246	}
22247
22248	const APIVersion = "2021-01-15"
22249	queryParameters := map[string]interface{}{
22250		"api-version": APIVersion,
22251	}
22252
22253	preparer := autorest.CreatePreparer(
22254		autorest.AsGet(),
22255		autorest.WithBaseURL(client.BaseURI),
22256		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings", pathParameters),
22257		autorest.WithQueryParameters(queryParameters))
22258	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22259}
22260
22261// ListHostNameBindingsSlotSender sends the ListHostNameBindingsSlot request. The method will close the
22262// http.Response Body if it receives an error.
22263func (client AppsClient) ListHostNameBindingsSlotSender(req *http.Request) (*http.Response, error) {
22264	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22265}
22266
22267// ListHostNameBindingsSlotResponder handles the response to the ListHostNameBindingsSlot request. The method always
22268// closes the http.Response Body.
22269func (client AppsClient) ListHostNameBindingsSlotResponder(resp *http.Response) (result HostNameBindingCollection, err error) {
22270	err = autorest.Respond(
22271		resp,
22272		azure.WithErrorUnlessStatusCode(http.StatusOK),
22273		autorest.ByUnmarshallingJSON(&result),
22274		autorest.ByClosing())
22275	result.Response = autorest.Response{Response: resp}
22276	return
22277}
22278
22279// listHostNameBindingsSlotNextResults retrieves the next set of results, if any.
22280func (client AppsClient) listHostNameBindingsSlotNextResults(ctx context.Context, lastResults HostNameBindingCollection) (result HostNameBindingCollection, err error) {
22281	req, err := lastResults.hostNameBindingCollectionPreparer(ctx)
22282	if err != nil {
22283		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", nil, "Failure preparing next results request")
22284	}
22285	if req == nil {
22286		return
22287	}
22288	resp, err := client.ListHostNameBindingsSlotSender(req)
22289	if err != nil {
22290		result.Response = autorest.Response{Response: resp}
22291		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", resp, "Failure sending next results request")
22292	}
22293	result, err = client.ListHostNameBindingsSlotResponder(resp)
22294	if err != nil {
22295		err = autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", resp, "Failure responding to next results request")
22296	}
22297	return
22298}
22299
22300// ListHostNameBindingsSlotComplete enumerates all values, automatically crossing page boundaries as required.
22301func (client AppsClient) ListHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result HostNameBindingCollectionIterator, err error) {
22302	if tracing.IsEnabled() {
22303		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindingsSlot")
22304		defer func() {
22305			sc := -1
22306			if result.Response().Response.Response != nil {
22307				sc = result.page.Response().Response.Response.StatusCode
22308			}
22309			tracing.EndSpan(ctx, sc, err)
22310		}()
22311	}
22312	result.page, err = client.ListHostNameBindingsSlot(ctx, resourceGroupName, name, slot)
22313	return
22314}
22315
22316// ListHybridConnections description for Retrieves all Service Bus Hybrid Connections used by this Web App.
22317// Parameters:
22318// resourceGroupName - name of the resource group to which the resource belongs.
22319// name - the name of the web app.
22320func (client AppsClient) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result HybridConnection, err error) {
22321	if tracing.IsEnabled() {
22322		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnections")
22323		defer func() {
22324			sc := -1
22325			if result.Response.Response != nil {
22326				sc = result.Response.Response.StatusCode
22327			}
22328			tracing.EndSpan(ctx, sc, err)
22329		}()
22330	}
22331	if err := validation.Validate([]validation.Validation{
22332		{TargetValue: resourceGroupName,
22333			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22334				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22335				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22336		return result, validation.NewError("web.AppsClient", "ListHybridConnections", err.Error())
22337	}
22338
22339	req, err := client.ListHybridConnectionsPreparer(ctx, resourceGroupName, name)
22340	if err != nil {
22341		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", nil, "Failure preparing request")
22342		return
22343	}
22344
22345	resp, err := client.ListHybridConnectionsSender(req)
22346	if err != nil {
22347		result.Response = autorest.Response{Response: resp}
22348		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", resp, "Failure sending request")
22349		return
22350	}
22351
22352	result, err = client.ListHybridConnectionsResponder(resp)
22353	if err != nil {
22354		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", resp, "Failure responding to request")
22355		return
22356	}
22357
22358	return
22359}
22360
22361// ListHybridConnectionsPreparer prepares the ListHybridConnections request.
22362func (client AppsClient) ListHybridConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
22363	pathParameters := map[string]interface{}{
22364		"name":              autorest.Encode("path", name),
22365		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22366		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22367	}
22368
22369	const APIVersion = "2021-01-15"
22370	queryParameters := map[string]interface{}{
22371		"api-version": APIVersion,
22372	}
22373
22374	preparer := autorest.CreatePreparer(
22375		autorest.AsGet(),
22376		autorest.WithBaseURL(client.BaseURI),
22377		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays", pathParameters),
22378		autorest.WithQueryParameters(queryParameters))
22379	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22380}
22381
22382// ListHybridConnectionsSender sends the ListHybridConnections request. The method will close the
22383// http.Response Body if it receives an error.
22384func (client AppsClient) ListHybridConnectionsSender(req *http.Request) (*http.Response, error) {
22385	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22386}
22387
22388// ListHybridConnectionsResponder handles the response to the ListHybridConnections request. The method always
22389// closes the http.Response Body.
22390func (client AppsClient) ListHybridConnectionsResponder(resp *http.Response) (result HybridConnection, err error) {
22391	err = autorest.Respond(
22392		resp,
22393		azure.WithErrorUnlessStatusCode(http.StatusOK),
22394		autorest.ByUnmarshallingJSON(&result),
22395		autorest.ByClosing())
22396	result.Response = autorest.Response{Response: resp}
22397	return
22398}
22399
22400// ListHybridConnectionsSlot description for Retrieves all Service Bus Hybrid Connections used by this Web App.
22401// Parameters:
22402// resourceGroupName - name of the resource group to which the resource belongs.
22403// name - the name of the web app.
22404// slot - the name of the slot for the web app.
22405func (client AppsClient) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HybridConnection, err error) {
22406	if tracing.IsEnabled() {
22407		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnectionsSlot")
22408		defer func() {
22409			sc := -1
22410			if result.Response.Response != nil {
22411				sc = result.Response.Response.StatusCode
22412			}
22413			tracing.EndSpan(ctx, sc, err)
22414		}()
22415	}
22416	if err := validation.Validate([]validation.Validation{
22417		{TargetValue: resourceGroupName,
22418			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22419				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22420				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22421		return result, validation.NewError("web.AppsClient", "ListHybridConnectionsSlot", err.Error())
22422	}
22423
22424	req, err := client.ListHybridConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
22425	if err != nil {
22426		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", nil, "Failure preparing request")
22427		return
22428	}
22429
22430	resp, err := client.ListHybridConnectionsSlotSender(req)
22431	if err != nil {
22432		result.Response = autorest.Response{Response: resp}
22433		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", resp, "Failure sending request")
22434		return
22435	}
22436
22437	result, err = client.ListHybridConnectionsSlotResponder(resp)
22438	if err != nil {
22439		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", resp, "Failure responding to request")
22440		return
22441	}
22442
22443	return
22444}
22445
22446// ListHybridConnectionsSlotPreparer prepares the ListHybridConnectionsSlot request.
22447func (client AppsClient) ListHybridConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22448	pathParameters := map[string]interface{}{
22449		"name":              autorest.Encode("path", name),
22450		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22451		"slot":              autorest.Encode("path", slot),
22452		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22453	}
22454
22455	const APIVersion = "2021-01-15"
22456	queryParameters := map[string]interface{}{
22457		"api-version": APIVersion,
22458	}
22459
22460	preparer := autorest.CreatePreparer(
22461		autorest.AsGet(),
22462		autorest.WithBaseURL(client.BaseURI),
22463		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays", pathParameters),
22464		autorest.WithQueryParameters(queryParameters))
22465	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22466}
22467
22468// ListHybridConnectionsSlotSender sends the ListHybridConnectionsSlot request. The method will close the
22469// http.Response Body if it receives an error.
22470func (client AppsClient) ListHybridConnectionsSlotSender(req *http.Request) (*http.Response, error) {
22471	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22472}
22473
22474// ListHybridConnectionsSlotResponder handles the response to the ListHybridConnectionsSlot request. The method always
22475// closes the http.Response Body.
22476func (client AppsClient) ListHybridConnectionsSlotResponder(resp *http.Response) (result HybridConnection, err error) {
22477	err = autorest.Respond(
22478		resp,
22479		azure.WithErrorUnlessStatusCode(http.StatusOK),
22480		autorest.ByUnmarshallingJSON(&result),
22481		autorest.ByClosing())
22482	result.Response = autorest.Response{Response: resp}
22483	return
22484}
22485
22486// ListInstanceFunctionsSlot description for List the functions for a web site, or a deployment slot.
22487// Parameters:
22488// resourceGroupName - name of the resource group to which the resource belongs.
22489// name - site name.
22490// slot - name of the deployment slot.
22491func (client AppsClient) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionPage, err error) {
22492	if tracing.IsEnabled() {
22493		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot")
22494		defer func() {
22495			sc := -1
22496			if result.fec.Response.Response != nil {
22497				sc = result.fec.Response.Response.StatusCode
22498			}
22499			tracing.EndSpan(ctx, sc, err)
22500		}()
22501	}
22502	if err := validation.Validate([]validation.Validation{
22503		{TargetValue: resourceGroupName,
22504			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22505				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22506				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22507		return result, validation.NewError("web.AppsClient", "ListInstanceFunctionsSlot", err.Error())
22508	}
22509
22510	result.fn = client.listInstanceFunctionsSlotNextResults
22511	req, err := client.ListInstanceFunctionsSlotPreparer(ctx, resourceGroupName, name, slot)
22512	if err != nil {
22513		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", nil, "Failure preparing request")
22514		return
22515	}
22516
22517	resp, err := client.ListInstanceFunctionsSlotSender(req)
22518	if err != nil {
22519		result.fec.Response = autorest.Response{Response: resp}
22520		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure sending request")
22521		return
22522	}
22523
22524	result.fec, err = client.ListInstanceFunctionsSlotResponder(resp)
22525	if err != nil {
22526		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure responding to request")
22527		return
22528	}
22529	if result.fec.hasNextLink() && result.fec.IsEmpty() {
22530		err = result.NextWithContext(ctx)
22531		return
22532	}
22533
22534	return
22535}
22536
22537// ListInstanceFunctionsSlotPreparer prepares the ListInstanceFunctionsSlot request.
22538func (client AppsClient) ListInstanceFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22539	pathParameters := map[string]interface{}{
22540		"name":              autorest.Encode("path", name),
22541		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22542		"slot":              autorest.Encode("path", slot),
22543		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22544	}
22545
22546	const APIVersion = "2021-01-15"
22547	queryParameters := map[string]interface{}{
22548		"api-version": APIVersion,
22549	}
22550
22551	preparer := autorest.CreatePreparer(
22552		autorest.AsGet(),
22553		autorest.WithBaseURL(client.BaseURI),
22554		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions", pathParameters),
22555		autorest.WithQueryParameters(queryParameters))
22556	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22557}
22558
22559// ListInstanceFunctionsSlotSender sends the ListInstanceFunctionsSlot request. The method will close the
22560// http.Response Body if it receives an error.
22561func (client AppsClient) ListInstanceFunctionsSlotSender(req *http.Request) (*http.Response, error) {
22562	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22563}
22564
22565// ListInstanceFunctionsSlotResponder handles the response to the ListInstanceFunctionsSlot request. The method always
22566// closes the http.Response Body.
22567func (client AppsClient) ListInstanceFunctionsSlotResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) {
22568	err = autorest.Respond(
22569		resp,
22570		azure.WithErrorUnlessStatusCode(http.StatusOK),
22571		autorest.ByUnmarshallingJSON(&result),
22572		autorest.ByClosing())
22573	result.Response = autorest.Response{Response: resp}
22574	return
22575}
22576
22577// listInstanceFunctionsSlotNextResults retrieves the next set of results, if any.
22578func (client AppsClient) listInstanceFunctionsSlotNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) {
22579	req, err := lastResults.functionEnvelopeCollectionPreparer(ctx)
22580	if err != nil {
22581		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", nil, "Failure preparing next results request")
22582	}
22583	if req == nil {
22584		return
22585	}
22586	resp, err := client.ListInstanceFunctionsSlotSender(req)
22587	if err != nil {
22588		result.Response = autorest.Response{Response: resp}
22589		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", resp, "Failure sending next results request")
22590	}
22591	result, err = client.ListInstanceFunctionsSlotResponder(resp)
22592	if err != nil {
22593		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", resp, "Failure responding to next results request")
22594	}
22595	return
22596}
22597
22598// ListInstanceFunctionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
22599func (client AppsClient) ListInstanceFunctionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionIterator, err error) {
22600	if tracing.IsEnabled() {
22601		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot")
22602		defer func() {
22603			sc := -1
22604			if result.Response().Response.Response != nil {
22605				sc = result.page.Response().Response.Response.StatusCode
22606			}
22607			tracing.EndSpan(ctx, sc, err)
22608		}()
22609	}
22610	result.page, err = client.ListInstanceFunctionsSlot(ctx, resourceGroupName, name, slot)
22611	return
22612}
22613
22614// ListInstanceIdentifiers description for Gets all scale-out instances of an app.
22615// Parameters:
22616// resourceGroupName - name of the resource group to which the resource belongs.
22617// name - name of the app.
22618func (client AppsClient) ListInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result AppInstanceStatusCollectionPage, err error) {
22619	if tracing.IsEnabled() {
22620		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiers")
22621		defer func() {
22622			sc := -1
22623			if result.aisc.Response.Response != nil {
22624				sc = result.aisc.Response.Response.StatusCode
22625			}
22626			tracing.EndSpan(ctx, sc, err)
22627		}()
22628	}
22629	if err := validation.Validate([]validation.Validation{
22630		{TargetValue: resourceGroupName,
22631			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22632				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22633				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22634		return result, validation.NewError("web.AppsClient", "ListInstanceIdentifiers", err.Error())
22635	}
22636
22637	result.fn = client.listInstanceIdentifiersNextResults
22638	req, err := client.ListInstanceIdentifiersPreparer(ctx, resourceGroupName, name)
22639	if err != nil {
22640		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", nil, "Failure preparing request")
22641		return
22642	}
22643
22644	resp, err := client.ListInstanceIdentifiersSender(req)
22645	if err != nil {
22646		result.aisc.Response = autorest.Response{Response: resp}
22647		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", resp, "Failure sending request")
22648		return
22649	}
22650
22651	result.aisc, err = client.ListInstanceIdentifiersResponder(resp)
22652	if err != nil {
22653		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", resp, "Failure responding to request")
22654		return
22655	}
22656	if result.aisc.hasNextLink() && result.aisc.IsEmpty() {
22657		err = result.NextWithContext(ctx)
22658		return
22659	}
22660
22661	return
22662}
22663
22664// ListInstanceIdentifiersPreparer prepares the ListInstanceIdentifiers request.
22665func (client AppsClient) ListInstanceIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
22666	pathParameters := map[string]interface{}{
22667		"name":              autorest.Encode("path", name),
22668		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22669		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22670	}
22671
22672	const APIVersion = "2021-01-15"
22673	queryParameters := map[string]interface{}{
22674		"api-version": APIVersion,
22675	}
22676
22677	preparer := autorest.CreatePreparer(
22678		autorest.AsGet(),
22679		autorest.WithBaseURL(client.BaseURI),
22680		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances", pathParameters),
22681		autorest.WithQueryParameters(queryParameters))
22682	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22683}
22684
22685// ListInstanceIdentifiersSender sends the ListInstanceIdentifiers request. The method will close the
22686// http.Response Body if it receives an error.
22687func (client AppsClient) ListInstanceIdentifiersSender(req *http.Request) (*http.Response, error) {
22688	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22689}
22690
22691// ListInstanceIdentifiersResponder handles the response to the ListInstanceIdentifiers request. The method always
22692// closes the http.Response Body.
22693func (client AppsClient) ListInstanceIdentifiersResponder(resp *http.Response) (result AppInstanceStatusCollection, err error) {
22694	err = autorest.Respond(
22695		resp,
22696		azure.WithErrorUnlessStatusCode(http.StatusOK),
22697		autorest.ByUnmarshallingJSON(&result),
22698		autorest.ByClosing())
22699	result.Response = autorest.Response{Response: resp}
22700	return
22701}
22702
22703// listInstanceIdentifiersNextResults retrieves the next set of results, if any.
22704func (client AppsClient) listInstanceIdentifiersNextResults(ctx context.Context, lastResults AppInstanceStatusCollection) (result AppInstanceStatusCollection, err error) {
22705	req, err := lastResults.appInstanceStatusCollectionPreparer(ctx)
22706	if err != nil {
22707		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", nil, "Failure preparing next results request")
22708	}
22709	if req == nil {
22710		return
22711	}
22712	resp, err := client.ListInstanceIdentifiersSender(req)
22713	if err != nil {
22714		result.Response = autorest.Response{Response: resp}
22715		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", resp, "Failure sending next results request")
22716	}
22717	result, err = client.ListInstanceIdentifiersResponder(resp)
22718	if err != nil {
22719		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", resp, "Failure responding to next results request")
22720	}
22721	return
22722}
22723
22724// ListInstanceIdentifiersComplete enumerates all values, automatically crossing page boundaries as required.
22725func (client AppsClient) ListInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result AppInstanceStatusCollectionIterator, err error) {
22726	if tracing.IsEnabled() {
22727		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiers")
22728		defer func() {
22729			sc := -1
22730			if result.Response().Response.Response != nil {
22731				sc = result.page.Response().Response.Response.StatusCode
22732			}
22733			tracing.EndSpan(ctx, sc, err)
22734		}()
22735	}
22736	result.page, err = client.ListInstanceIdentifiers(ctx, resourceGroupName, name)
22737	return
22738}
22739
22740// ListInstanceIdentifiersSlot description for Gets all scale-out instances of an app.
22741// Parameters:
22742// resourceGroupName - name of the resource group to which the resource belongs.
22743// name - name of the app.
22744// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances.
22745func (client AppsClient) ListInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AppInstanceStatusCollectionPage, err error) {
22746	if tracing.IsEnabled() {
22747		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiersSlot")
22748		defer func() {
22749			sc := -1
22750			if result.aisc.Response.Response != nil {
22751				sc = result.aisc.Response.Response.StatusCode
22752			}
22753			tracing.EndSpan(ctx, sc, err)
22754		}()
22755	}
22756	if err := validation.Validate([]validation.Validation{
22757		{TargetValue: resourceGroupName,
22758			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22759				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22760				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22761		return result, validation.NewError("web.AppsClient", "ListInstanceIdentifiersSlot", err.Error())
22762	}
22763
22764	result.fn = client.listInstanceIdentifiersSlotNextResults
22765	req, err := client.ListInstanceIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot)
22766	if err != nil {
22767		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", nil, "Failure preparing request")
22768		return
22769	}
22770
22771	resp, err := client.ListInstanceIdentifiersSlotSender(req)
22772	if err != nil {
22773		result.aisc.Response = autorest.Response{Response: resp}
22774		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", resp, "Failure sending request")
22775		return
22776	}
22777
22778	result.aisc, err = client.ListInstanceIdentifiersSlotResponder(resp)
22779	if err != nil {
22780		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", resp, "Failure responding to request")
22781		return
22782	}
22783	if result.aisc.hasNextLink() && result.aisc.IsEmpty() {
22784		err = result.NextWithContext(ctx)
22785		return
22786	}
22787
22788	return
22789}
22790
22791// ListInstanceIdentifiersSlotPreparer prepares the ListInstanceIdentifiersSlot request.
22792func (client AppsClient) ListInstanceIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22793	pathParameters := map[string]interface{}{
22794		"name":              autorest.Encode("path", name),
22795		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22796		"slot":              autorest.Encode("path", slot),
22797		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22798	}
22799
22800	const APIVersion = "2021-01-15"
22801	queryParameters := map[string]interface{}{
22802		"api-version": APIVersion,
22803	}
22804
22805	preparer := autorest.CreatePreparer(
22806		autorest.AsGet(),
22807		autorest.WithBaseURL(client.BaseURI),
22808		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances", pathParameters),
22809		autorest.WithQueryParameters(queryParameters))
22810	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22811}
22812
22813// ListInstanceIdentifiersSlotSender sends the ListInstanceIdentifiersSlot request. The method will close the
22814// http.Response Body if it receives an error.
22815func (client AppsClient) ListInstanceIdentifiersSlotSender(req *http.Request) (*http.Response, error) {
22816	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22817}
22818
22819// ListInstanceIdentifiersSlotResponder handles the response to the ListInstanceIdentifiersSlot request. The method always
22820// closes the http.Response Body.
22821func (client AppsClient) ListInstanceIdentifiersSlotResponder(resp *http.Response) (result AppInstanceStatusCollection, err error) {
22822	err = autorest.Respond(
22823		resp,
22824		azure.WithErrorUnlessStatusCode(http.StatusOK),
22825		autorest.ByUnmarshallingJSON(&result),
22826		autorest.ByClosing())
22827	result.Response = autorest.Response{Response: resp}
22828	return
22829}
22830
22831// listInstanceIdentifiersSlotNextResults retrieves the next set of results, if any.
22832func (client AppsClient) listInstanceIdentifiersSlotNextResults(ctx context.Context, lastResults AppInstanceStatusCollection) (result AppInstanceStatusCollection, err error) {
22833	req, err := lastResults.appInstanceStatusCollectionPreparer(ctx)
22834	if err != nil {
22835		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", nil, "Failure preparing next results request")
22836	}
22837	if req == nil {
22838		return
22839	}
22840	resp, err := client.ListInstanceIdentifiersSlotSender(req)
22841	if err != nil {
22842		result.Response = autorest.Response{Response: resp}
22843		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", resp, "Failure sending next results request")
22844	}
22845	result, err = client.ListInstanceIdentifiersSlotResponder(resp)
22846	if err != nil {
22847		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", resp, "Failure responding to next results request")
22848	}
22849	return
22850}
22851
22852// ListInstanceIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required.
22853func (client AppsClient) ListInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result AppInstanceStatusCollectionIterator, err error) {
22854	if tracing.IsEnabled() {
22855		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiersSlot")
22856		defer func() {
22857			sc := -1
22858			if result.Response().Response.Response != nil {
22859				sc = result.page.Response().Response.Response.StatusCode
22860			}
22861			tracing.EndSpan(ctx, sc, err)
22862		}()
22863	}
22864	result.page, err = client.ListInstanceIdentifiersSlot(ctx, resourceGroupName, name, slot)
22865	return
22866}
22867
22868// ListInstanceProcesses description for Get list of processes for a web site, or a deployment slot, or for a specific
22869// scaled-out instance in a web site.
22870// Parameters:
22871// resourceGroupName - name of the resource group to which the resource belongs.
22872// name - site name.
22873// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
22874// response from "GET api/sites/{siteName}/instances".
22875func (client AppsClient) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionPage, err error) {
22876	if tracing.IsEnabled() {
22877		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses")
22878		defer func() {
22879			sc := -1
22880			if result.pic.Response.Response != nil {
22881				sc = result.pic.Response.Response.StatusCode
22882			}
22883			tracing.EndSpan(ctx, sc, err)
22884		}()
22885	}
22886	if err := validation.Validate([]validation.Validation{
22887		{TargetValue: resourceGroupName,
22888			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22889				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22890				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22891		return result, validation.NewError("web.AppsClient", "ListInstanceProcesses", err.Error())
22892	}
22893
22894	result.fn = client.listInstanceProcessesNextResults
22895	req, err := client.ListInstanceProcessesPreparer(ctx, resourceGroupName, name, instanceID)
22896	if err != nil {
22897		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing request")
22898		return
22899	}
22900
22901	resp, err := client.ListInstanceProcessesSender(req)
22902	if err != nil {
22903		result.pic.Response = autorest.Response{Response: resp}
22904		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending request")
22905		return
22906	}
22907
22908	result.pic, err = client.ListInstanceProcessesResponder(resp)
22909	if err != nil {
22910		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to request")
22911		return
22912	}
22913	if result.pic.hasNextLink() && result.pic.IsEmpty() {
22914		err = result.NextWithContext(ctx)
22915		return
22916	}
22917
22918	return
22919}
22920
22921// ListInstanceProcessesPreparer prepares the ListInstanceProcesses request.
22922func (client AppsClient) ListInstanceProcessesPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
22923	pathParameters := map[string]interface{}{
22924		"instanceId":        autorest.Encode("path", instanceID),
22925		"name":              autorest.Encode("path", name),
22926		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22927		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22928	}
22929
22930	const APIVersion = "2021-01-15"
22931	queryParameters := map[string]interface{}{
22932		"api-version": APIVersion,
22933	}
22934
22935	preparer := autorest.CreatePreparer(
22936		autorest.AsGet(),
22937		autorest.WithBaseURL(client.BaseURI),
22938		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes", pathParameters),
22939		autorest.WithQueryParameters(queryParameters))
22940	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22941}
22942
22943// ListInstanceProcessesSender sends the ListInstanceProcesses request. The method will close the
22944// http.Response Body if it receives an error.
22945func (client AppsClient) ListInstanceProcessesSender(req *http.Request) (*http.Response, error) {
22946	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22947}
22948
22949// ListInstanceProcessesResponder handles the response to the ListInstanceProcesses request. The method always
22950// closes the http.Response Body.
22951func (client AppsClient) ListInstanceProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
22952	err = autorest.Respond(
22953		resp,
22954		azure.WithErrorUnlessStatusCode(http.StatusOK),
22955		autorest.ByUnmarshallingJSON(&result),
22956		autorest.ByClosing())
22957	result.Response = autorest.Response{Response: resp}
22958	return
22959}
22960
22961// listInstanceProcessesNextResults retrieves the next set of results, if any.
22962func (client AppsClient) listInstanceProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
22963	req, err := lastResults.processInfoCollectionPreparer(ctx)
22964	if err != nil {
22965		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", nil, "Failure preparing next results request")
22966	}
22967	if req == nil {
22968		return
22969	}
22970	resp, err := client.ListInstanceProcessesSender(req)
22971	if err != nil {
22972		result.Response = autorest.Response{Response: resp}
22973		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure sending next results request")
22974	}
22975	result, err = client.ListInstanceProcessesResponder(resp)
22976	if err != nil {
22977		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure responding to next results request")
22978	}
22979	return
22980}
22981
22982// ListInstanceProcessesComplete enumerates all values, automatically crossing page boundaries as required.
22983func (client AppsClient) ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionIterator, err error) {
22984	if tracing.IsEnabled() {
22985		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses")
22986		defer func() {
22987			sc := -1
22988			if result.Response().Response.Response != nil {
22989				sc = result.page.Response().Response.Response.StatusCode
22990			}
22991			tracing.EndSpan(ctx, sc, err)
22992		}()
22993	}
22994	result.page, err = client.ListInstanceProcesses(ctx, resourceGroupName, name, instanceID)
22995	return
22996}
22997
22998// ListInstanceProcessesSlot description for Get list of processes for a web site, or a deployment slot, or for a
22999// specific scaled-out instance in a web site.
23000// Parameters:
23001// resourceGroupName - name of the resource group to which the resource belongs.
23002// name - site name.
23003// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23004// production slot.
23005// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
23006// response from "GET api/sites/{siteName}/instances".
23007func (client AppsClient) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionPage, err error) {
23008	if tracing.IsEnabled() {
23009		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot")
23010		defer func() {
23011			sc := -1
23012			if result.pic.Response.Response != nil {
23013				sc = result.pic.Response.Response.StatusCode
23014			}
23015			tracing.EndSpan(ctx, sc, err)
23016		}()
23017	}
23018	if err := validation.Validate([]validation.Validation{
23019		{TargetValue: resourceGroupName,
23020			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23021				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23022				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23023		return result, validation.NewError("web.AppsClient", "ListInstanceProcessesSlot", err.Error())
23024	}
23025
23026	result.fn = client.listInstanceProcessesSlotNextResults
23027	req, err := client.ListInstanceProcessesSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
23028	if err != nil {
23029		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing request")
23030		return
23031	}
23032
23033	resp, err := client.ListInstanceProcessesSlotSender(req)
23034	if err != nil {
23035		result.pic.Response = autorest.Response{Response: resp}
23036		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending request")
23037		return
23038	}
23039
23040	result.pic, err = client.ListInstanceProcessesSlotResponder(resp)
23041	if err != nil {
23042		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to request")
23043		return
23044	}
23045	if result.pic.hasNextLink() && result.pic.IsEmpty() {
23046		err = result.NextWithContext(ctx)
23047		return
23048	}
23049
23050	return
23051}
23052
23053// ListInstanceProcessesSlotPreparer prepares the ListInstanceProcessesSlot request.
23054func (client AppsClient) ListInstanceProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
23055	pathParameters := map[string]interface{}{
23056		"instanceId":        autorest.Encode("path", instanceID),
23057		"name":              autorest.Encode("path", name),
23058		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23059		"slot":              autorest.Encode("path", slot),
23060		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23061	}
23062
23063	const APIVersion = "2021-01-15"
23064	queryParameters := map[string]interface{}{
23065		"api-version": APIVersion,
23066	}
23067
23068	preparer := autorest.CreatePreparer(
23069		autorest.AsGet(),
23070		autorest.WithBaseURL(client.BaseURI),
23071		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes", pathParameters),
23072		autorest.WithQueryParameters(queryParameters))
23073	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23074}
23075
23076// ListInstanceProcessesSlotSender sends the ListInstanceProcessesSlot request. The method will close the
23077// http.Response Body if it receives an error.
23078func (client AppsClient) ListInstanceProcessesSlotSender(req *http.Request) (*http.Response, error) {
23079	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23080}
23081
23082// ListInstanceProcessesSlotResponder handles the response to the ListInstanceProcessesSlot request. The method always
23083// closes the http.Response Body.
23084func (client AppsClient) ListInstanceProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
23085	err = autorest.Respond(
23086		resp,
23087		azure.WithErrorUnlessStatusCode(http.StatusOK),
23088		autorest.ByUnmarshallingJSON(&result),
23089		autorest.ByClosing())
23090	result.Response = autorest.Response{Response: resp}
23091	return
23092}
23093
23094// listInstanceProcessesSlotNextResults retrieves the next set of results, if any.
23095func (client AppsClient) listInstanceProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
23096	req, err := lastResults.processInfoCollectionPreparer(ctx)
23097	if err != nil {
23098		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", nil, "Failure preparing next results request")
23099	}
23100	if req == nil {
23101		return
23102	}
23103	resp, err := client.ListInstanceProcessesSlotSender(req)
23104	if err != nil {
23105		result.Response = autorest.Response{Response: resp}
23106		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure sending next results request")
23107	}
23108	result, err = client.ListInstanceProcessesSlotResponder(resp)
23109	if err != nil {
23110		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure responding to next results request")
23111	}
23112	return
23113}
23114
23115// ListInstanceProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required.
23116func (client AppsClient) ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionIterator, err error) {
23117	if tracing.IsEnabled() {
23118		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot")
23119		defer func() {
23120			sc := -1
23121			if result.Response().Response.Response != nil {
23122				sc = result.page.Response().Response.Response.StatusCode
23123			}
23124			tracing.EndSpan(ctx, sc, err)
23125		}()
23126	}
23127	result.page, err = client.ListInstanceProcessesSlot(ctx, resourceGroupName, name, slot, instanceID)
23128	return
23129}
23130
23131// ListInstanceProcessModules description for List module information for a process by its ID for a specific scaled-out
23132// instance in a web site.
23133// Parameters:
23134// resourceGroupName - name of the resource group to which the resource belongs.
23135// name - site name.
23136// processID - pID.
23137// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
23138// response from "GET api/sites/{siteName}/instances".
23139func (client AppsClient) ListInstanceProcessModules(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollectionPage, err error) {
23140	if tracing.IsEnabled() {
23141		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModules")
23142		defer func() {
23143			sc := -1
23144			if result.pmic.Response.Response != nil {
23145				sc = result.pmic.Response.Response.StatusCode
23146			}
23147			tracing.EndSpan(ctx, sc, err)
23148		}()
23149	}
23150	if err := validation.Validate([]validation.Validation{
23151		{TargetValue: resourceGroupName,
23152			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23153				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23154				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23155		return result, validation.NewError("web.AppsClient", "ListInstanceProcessModules", err.Error())
23156	}
23157
23158	result.fn = client.listInstanceProcessModulesNextResults
23159	req, err := client.ListInstanceProcessModulesPreparer(ctx, resourceGroupName, name, processID, instanceID)
23160	if err != nil {
23161		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", nil, "Failure preparing request")
23162		return
23163	}
23164
23165	resp, err := client.ListInstanceProcessModulesSender(req)
23166	if err != nil {
23167		result.pmic.Response = autorest.Response{Response: resp}
23168		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure sending request")
23169		return
23170	}
23171
23172	result.pmic, err = client.ListInstanceProcessModulesResponder(resp)
23173	if err != nil {
23174		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure responding to request")
23175		return
23176	}
23177	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
23178		err = result.NextWithContext(ctx)
23179		return
23180	}
23181
23182	return
23183}
23184
23185// ListInstanceProcessModulesPreparer prepares the ListInstanceProcessModules request.
23186func (client AppsClient) ListInstanceProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
23187	pathParameters := map[string]interface{}{
23188		"instanceId":        autorest.Encode("path", instanceID),
23189		"name":              autorest.Encode("path", name),
23190		"processId":         autorest.Encode("path", processID),
23191		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23192		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23193	}
23194
23195	const APIVersion = "2021-01-15"
23196	queryParameters := map[string]interface{}{
23197		"api-version": APIVersion,
23198	}
23199
23200	preparer := autorest.CreatePreparer(
23201		autorest.AsGet(),
23202		autorest.WithBaseURL(client.BaseURI),
23203		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules", pathParameters),
23204		autorest.WithQueryParameters(queryParameters))
23205	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23206}
23207
23208// ListInstanceProcessModulesSender sends the ListInstanceProcessModules request. The method will close the
23209// http.Response Body if it receives an error.
23210func (client AppsClient) ListInstanceProcessModulesSender(req *http.Request) (*http.Response, error) {
23211	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23212}
23213
23214// ListInstanceProcessModulesResponder handles the response to the ListInstanceProcessModules request. The method always
23215// closes the http.Response Body.
23216func (client AppsClient) ListInstanceProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
23217	err = autorest.Respond(
23218		resp,
23219		azure.WithErrorUnlessStatusCode(http.StatusOK),
23220		autorest.ByUnmarshallingJSON(&result),
23221		autorest.ByClosing())
23222	result.Response = autorest.Response{Response: resp}
23223	return
23224}
23225
23226// listInstanceProcessModulesNextResults retrieves the next set of results, if any.
23227func (client AppsClient) listInstanceProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
23228	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
23229	if err != nil {
23230		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", nil, "Failure preparing next results request")
23231	}
23232	if req == nil {
23233		return
23234	}
23235	resp, err := client.ListInstanceProcessModulesSender(req)
23236	if err != nil {
23237		result.Response = autorest.Response{Response: resp}
23238		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", resp, "Failure sending next results request")
23239	}
23240	result, err = client.ListInstanceProcessModulesResponder(resp)
23241	if err != nil {
23242		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", resp, "Failure responding to next results request")
23243	}
23244	return
23245}
23246
23247// ListInstanceProcessModulesComplete enumerates all values, automatically crossing page boundaries as required.
23248func (client AppsClient) ListInstanceProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollectionIterator, err error) {
23249	if tracing.IsEnabled() {
23250		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModules")
23251		defer func() {
23252			sc := -1
23253			if result.Response().Response.Response != nil {
23254				sc = result.page.Response().Response.Response.StatusCode
23255			}
23256			tracing.EndSpan(ctx, sc, err)
23257		}()
23258	}
23259	result.page, err = client.ListInstanceProcessModules(ctx, resourceGroupName, name, processID, instanceID)
23260	return
23261}
23262
23263// ListInstanceProcessModulesSlot description for List module information for a process by its ID for a specific
23264// scaled-out instance in a web site.
23265// Parameters:
23266// resourceGroupName - name of the resource group to which the resource belongs.
23267// name - site name.
23268// processID - pID.
23269// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23270// production slot.
23271// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
23272// response from "GET api/sites/{siteName}/instances".
23273func (client AppsClient) ListInstanceProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollectionPage, err error) {
23274	if tracing.IsEnabled() {
23275		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModulesSlot")
23276		defer func() {
23277			sc := -1
23278			if result.pmic.Response.Response != nil {
23279				sc = result.pmic.Response.Response.StatusCode
23280			}
23281			tracing.EndSpan(ctx, sc, err)
23282		}()
23283	}
23284	if err := validation.Validate([]validation.Validation{
23285		{TargetValue: resourceGroupName,
23286			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23287				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23288				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23289		return result, validation.NewError("web.AppsClient", "ListInstanceProcessModulesSlot", err.Error())
23290	}
23291
23292	result.fn = client.listInstanceProcessModulesSlotNextResults
23293	req, err := client.ListInstanceProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
23294	if err != nil {
23295		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", nil, "Failure preparing request")
23296		return
23297	}
23298
23299	resp, err := client.ListInstanceProcessModulesSlotSender(req)
23300	if err != nil {
23301		result.pmic.Response = autorest.Response{Response: resp}
23302		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure sending request")
23303		return
23304	}
23305
23306	result.pmic, err = client.ListInstanceProcessModulesSlotResponder(resp)
23307	if err != nil {
23308		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure responding to request")
23309		return
23310	}
23311	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
23312		err = result.NextWithContext(ctx)
23313		return
23314	}
23315
23316	return
23317}
23318
23319// ListInstanceProcessModulesSlotPreparer prepares the ListInstanceProcessModulesSlot request.
23320func (client AppsClient) ListInstanceProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
23321	pathParameters := map[string]interface{}{
23322		"instanceId":        autorest.Encode("path", instanceID),
23323		"name":              autorest.Encode("path", name),
23324		"processId":         autorest.Encode("path", processID),
23325		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23326		"slot":              autorest.Encode("path", slot),
23327		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23328	}
23329
23330	const APIVersion = "2021-01-15"
23331	queryParameters := map[string]interface{}{
23332		"api-version": APIVersion,
23333	}
23334
23335	preparer := autorest.CreatePreparer(
23336		autorest.AsGet(),
23337		autorest.WithBaseURL(client.BaseURI),
23338		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules", pathParameters),
23339		autorest.WithQueryParameters(queryParameters))
23340	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23341}
23342
23343// ListInstanceProcessModulesSlotSender sends the ListInstanceProcessModulesSlot request. The method will close the
23344// http.Response Body if it receives an error.
23345func (client AppsClient) ListInstanceProcessModulesSlotSender(req *http.Request) (*http.Response, error) {
23346	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23347}
23348
23349// ListInstanceProcessModulesSlotResponder handles the response to the ListInstanceProcessModulesSlot request. The method always
23350// closes the http.Response Body.
23351func (client AppsClient) ListInstanceProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
23352	err = autorest.Respond(
23353		resp,
23354		azure.WithErrorUnlessStatusCode(http.StatusOK),
23355		autorest.ByUnmarshallingJSON(&result),
23356		autorest.ByClosing())
23357	result.Response = autorest.Response{Response: resp}
23358	return
23359}
23360
23361// listInstanceProcessModulesSlotNextResults retrieves the next set of results, if any.
23362func (client AppsClient) listInstanceProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
23363	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
23364	if err != nil {
23365		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", nil, "Failure preparing next results request")
23366	}
23367	if req == nil {
23368		return
23369	}
23370	resp, err := client.ListInstanceProcessModulesSlotSender(req)
23371	if err != nil {
23372		result.Response = autorest.Response{Response: resp}
23373		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", resp, "Failure sending next results request")
23374	}
23375	result, err = client.ListInstanceProcessModulesSlotResponder(resp)
23376	if err != nil {
23377		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", resp, "Failure responding to next results request")
23378	}
23379	return
23380}
23381
23382// ListInstanceProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required.
23383func (client AppsClient) ListInstanceProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollectionIterator, err error) {
23384	if tracing.IsEnabled() {
23385		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModulesSlot")
23386		defer func() {
23387			sc := -1
23388			if result.Response().Response.Response != nil {
23389				sc = result.page.Response().Response.Response.StatusCode
23390			}
23391			tracing.EndSpan(ctx, sc, err)
23392		}()
23393	}
23394	result.page, err = client.ListInstanceProcessModulesSlot(ctx, resourceGroupName, name, processID, slot, instanceID)
23395	return
23396}
23397
23398// ListInstanceProcessThreads description for List the threads in a process by its ID for a specific scaled-out
23399// instance in a web site.
23400// Parameters:
23401// resourceGroupName - name of the resource group to which the resource belongs.
23402// name - site name.
23403// processID - pID.
23404// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
23405// response from "GET api/sites/{siteName}/instances".
23406func (client AppsClient) ListInstanceProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollectionPage, err error) {
23407	if tracing.IsEnabled() {
23408		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreads")
23409		defer func() {
23410			sc := -1
23411			if result.ptic.Response.Response != nil {
23412				sc = result.ptic.Response.Response.StatusCode
23413			}
23414			tracing.EndSpan(ctx, sc, err)
23415		}()
23416	}
23417	if err := validation.Validate([]validation.Validation{
23418		{TargetValue: resourceGroupName,
23419			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23420				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23421				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23422		return result, validation.NewError("web.AppsClient", "ListInstanceProcessThreads", err.Error())
23423	}
23424
23425	result.fn = client.listInstanceProcessThreadsNextResults
23426	req, err := client.ListInstanceProcessThreadsPreparer(ctx, resourceGroupName, name, processID, instanceID)
23427	if err != nil {
23428		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", nil, "Failure preparing request")
23429		return
23430	}
23431
23432	resp, err := client.ListInstanceProcessThreadsSender(req)
23433	if err != nil {
23434		result.ptic.Response = autorest.Response{Response: resp}
23435		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure sending request")
23436		return
23437	}
23438
23439	result.ptic, err = client.ListInstanceProcessThreadsResponder(resp)
23440	if err != nil {
23441		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure responding to request")
23442		return
23443	}
23444	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
23445		err = result.NextWithContext(ctx)
23446		return
23447	}
23448
23449	return
23450}
23451
23452// ListInstanceProcessThreadsPreparer prepares the ListInstanceProcessThreads request.
23453func (client AppsClient) ListInstanceProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
23454	pathParameters := map[string]interface{}{
23455		"instanceId":        autorest.Encode("path", instanceID),
23456		"name":              autorest.Encode("path", name),
23457		"processId":         autorest.Encode("path", processID),
23458		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23459		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23460	}
23461
23462	const APIVersion = "2021-01-15"
23463	queryParameters := map[string]interface{}{
23464		"api-version": APIVersion,
23465	}
23466
23467	preparer := autorest.CreatePreparer(
23468		autorest.AsGet(),
23469		autorest.WithBaseURL(client.BaseURI),
23470		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads", pathParameters),
23471		autorest.WithQueryParameters(queryParameters))
23472	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23473}
23474
23475// ListInstanceProcessThreadsSender sends the ListInstanceProcessThreads request. The method will close the
23476// http.Response Body if it receives an error.
23477func (client AppsClient) ListInstanceProcessThreadsSender(req *http.Request) (*http.Response, error) {
23478	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23479}
23480
23481// ListInstanceProcessThreadsResponder handles the response to the ListInstanceProcessThreads request. The method always
23482// closes the http.Response Body.
23483func (client AppsClient) ListInstanceProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
23484	err = autorest.Respond(
23485		resp,
23486		azure.WithErrorUnlessStatusCode(http.StatusOK),
23487		autorest.ByUnmarshallingJSON(&result),
23488		autorest.ByClosing())
23489	result.Response = autorest.Response{Response: resp}
23490	return
23491}
23492
23493// listInstanceProcessThreadsNextResults retrieves the next set of results, if any.
23494func (client AppsClient) listInstanceProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
23495	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
23496	if err != nil {
23497		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", nil, "Failure preparing next results request")
23498	}
23499	if req == nil {
23500		return
23501	}
23502	resp, err := client.ListInstanceProcessThreadsSender(req)
23503	if err != nil {
23504		result.Response = autorest.Response{Response: resp}
23505		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", resp, "Failure sending next results request")
23506	}
23507	result, err = client.ListInstanceProcessThreadsResponder(resp)
23508	if err != nil {
23509		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", resp, "Failure responding to next results request")
23510	}
23511	return
23512}
23513
23514// ListInstanceProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required.
23515func (client AppsClient) ListInstanceProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollectionIterator, err error) {
23516	if tracing.IsEnabled() {
23517		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreads")
23518		defer func() {
23519			sc := -1
23520			if result.Response().Response.Response != nil {
23521				sc = result.page.Response().Response.Response.StatusCode
23522			}
23523			tracing.EndSpan(ctx, sc, err)
23524		}()
23525	}
23526	result.page, err = client.ListInstanceProcessThreads(ctx, resourceGroupName, name, processID, instanceID)
23527	return
23528}
23529
23530// ListInstanceProcessThreadsSlot description for List the threads in a process by its ID for a specific scaled-out
23531// instance in a web site.
23532// Parameters:
23533// resourceGroupName - name of the resource group to which the resource belongs.
23534// name - site name.
23535// processID - pID.
23536// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23537// production slot.
23538// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
23539// response from "GET api/sites/{siteName}/instances".
23540func (client AppsClient) ListInstanceProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollectionPage, err error) {
23541	if tracing.IsEnabled() {
23542		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreadsSlot")
23543		defer func() {
23544			sc := -1
23545			if result.ptic.Response.Response != nil {
23546				sc = result.ptic.Response.Response.StatusCode
23547			}
23548			tracing.EndSpan(ctx, sc, err)
23549		}()
23550	}
23551	if err := validation.Validate([]validation.Validation{
23552		{TargetValue: resourceGroupName,
23553			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23554				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23555				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23556		return result, validation.NewError("web.AppsClient", "ListInstanceProcessThreadsSlot", err.Error())
23557	}
23558
23559	result.fn = client.listInstanceProcessThreadsSlotNextResults
23560	req, err := client.ListInstanceProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
23561	if err != nil {
23562		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", nil, "Failure preparing request")
23563		return
23564	}
23565
23566	resp, err := client.ListInstanceProcessThreadsSlotSender(req)
23567	if err != nil {
23568		result.ptic.Response = autorest.Response{Response: resp}
23569		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure sending request")
23570		return
23571	}
23572
23573	result.ptic, err = client.ListInstanceProcessThreadsSlotResponder(resp)
23574	if err != nil {
23575		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure responding to request")
23576		return
23577	}
23578	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
23579		err = result.NextWithContext(ctx)
23580		return
23581	}
23582
23583	return
23584}
23585
23586// ListInstanceProcessThreadsSlotPreparer prepares the ListInstanceProcessThreadsSlot request.
23587func (client AppsClient) ListInstanceProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
23588	pathParameters := map[string]interface{}{
23589		"instanceId":        autorest.Encode("path", instanceID),
23590		"name":              autorest.Encode("path", name),
23591		"processId":         autorest.Encode("path", processID),
23592		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23593		"slot":              autorest.Encode("path", slot),
23594		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23595	}
23596
23597	const APIVersion = "2021-01-15"
23598	queryParameters := map[string]interface{}{
23599		"api-version": APIVersion,
23600	}
23601
23602	preparer := autorest.CreatePreparer(
23603		autorest.AsGet(),
23604		autorest.WithBaseURL(client.BaseURI),
23605		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads", pathParameters),
23606		autorest.WithQueryParameters(queryParameters))
23607	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23608}
23609
23610// ListInstanceProcessThreadsSlotSender sends the ListInstanceProcessThreadsSlot request. The method will close the
23611// http.Response Body if it receives an error.
23612func (client AppsClient) ListInstanceProcessThreadsSlotSender(req *http.Request) (*http.Response, error) {
23613	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23614}
23615
23616// ListInstanceProcessThreadsSlotResponder handles the response to the ListInstanceProcessThreadsSlot request. The method always
23617// closes the http.Response Body.
23618func (client AppsClient) ListInstanceProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
23619	err = autorest.Respond(
23620		resp,
23621		azure.WithErrorUnlessStatusCode(http.StatusOK),
23622		autorest.ByUnmarshallingJSON(&result),
23623		autorest.ByClosing())
23624	result.Response = autorest.Response{Response: resp}
23625	return
23626}
23627
23628// listInstanceProcessThreadsSlotNextResults retrieves the next set of results, if any.
23629func (client AppsClient) listInstanceProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
23630	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
23631	if err != nil {
23632		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", nil, "Failure preparing next results request")
23633	}
23634	if req == nil {
23635		return
23636	}
23637	resp, err := client.ListInstanceProcessThreadsSlotSender(req)
23638	if err != nil {
23639		result.Response = autorest.Response{Response: resp}
23640		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", resp, "Failure sending next results request")
23641	}
23642	result, err = client.ListInstanceProcessThreadsSlotResponder(resp)
23643	if err != nil {
23644		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", resp, "Failure responding to next results request")
23645	}
23646	return
23647}
23648
23649// ListInstanceProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required.
23650func (client AppsClient) ListInstanceProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollectionIterator, err error) {
23651	if tracing.IsEnabled() {
23652		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreadsSlot")
23653		defer func() {
23654			sc := -1
23655			if result.Response().Response.Response != nil {
23656				sc = result.page.Response().Response.Response.StatusCode
23657			}
23658			tracing.EndSpan(ctx, sc, err)
23659		}()
23660	}
23661	result.page, err = client.ListInstanceProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot, instanceID)
23662	return
23663}
23664
23665// ListMetadata description for Gets the metadata of an app.
23666// Parameters:
23667// resourceGroupName - name of the resource group to which the resource belongs.
23668// name - name of the app.
23669func (client AppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) {
23670	if tracing.IsEnabled() {
23671		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetadata")
23672		defer func() {
23673			sc := -1
23674			if result.Response.Response != nil {
23675				sc = result.Response.Response.StatusCode
23676			}
23677			tracing.EndSpan(ctx, sc, err)
23678		}()
23679	}
23680	if err := validation.Validate([]validation.Validation{
23681		{TargetValue: resourceGroupName,
23682			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23683				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23684				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23685		return result, validation.NewError("web.AppsClient", "ListMetadata", err.Error())
23686	}
23687
23688	req, err := client.ListMetadataPreparer(ctx, resourceGroupName, name)
23689	if err != nil {
23690		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", nil, "Failure preparing request")
23691		return
23692	}
23693
23694	resp, err := client.ListMetadataSender(req)
23695	if err != nil {
23696		result.Response = autorest.Response{Response: resp}
23697		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", resp, "Failure sending request")
23698		return
23699	}
23700
23701	result, err = client.ListMetadataResponder(resp)
23702	if err != nil {
23703		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", resp, "Failure responding to request")
23704		return
23705	}
23706
23707	return
23708}
23709
23710// ListMetadataPreparer prepares the ListMetadata request.
23711func (client AppsClient) ListMetadataPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
23712	pathParameters := map[string]interface{}{
23713		"name":              autorest.Encode("path", name),
23714		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23715		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23716	}
23717
23718	const APIVersion = "2021-01-15"
23719	queryParameters := map[string]interface{}{
23720		"api-version": APIVersion,
23721	}
23722
23723	preparer := autorest.CreatePreparer(
23724		autorest.AsPost(),
23725		autorest.WithBaseURL(client.BaseURI),
23726		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list", pathParameters),
23727		autorest.WithQueryParameters(queryParameters))
23728	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23729}
23730
23731// ListMetadataSender sends the ListMetadata request. The method will close the
23732// http.Response Body if it receives an error.
23733func (client AppsClient) ListMetadataSender(req *http.Request) (*http.Response, error) {
23734	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23735}
23736
23737// ListMetadataResponder handles the response to the ListMetadata request. The method always
23738// closes the http.Response Body.
23739func (client AppsClient) ListMetadataResponder(resp *http.Response) (result StringDictionary, err error) {
23740	err = autorest.Respond(
23741		resp,
23742		azure.WithErrorUnlessStatusCode(http.StatusOK),
23743		autorest.ByUnmarshallingJSON(&result),
23744		autorest.ByClosing())
23745	result.Response = autorest.Response{Response: resp}
23746	return
23747}
23748
23749// ListMetadataSlot description for Gets the metadata of an app.
23750// Parameters:
23751// resourceGroupName - name of the resource group to which the resource belongs.
23752// name - name of the app.
23753// slot - name of the deployment slot. If a slot is not specified, the API will get the metadata for the
23754// production slot.
23755func (client AppsClient) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) {
23756	if tracing.IsEnabled() {
23757		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetadataSlot")
23758		defer func() {
23759			sc := -1
23760			if result.Response.Response != nil {
23761				sc = result.Response.Response.StatusCode
23762			}
23763			tracing.EndSpan(ctx, sc, err)
23764		}()
23765	}
23766	if err := validation.Validate([]validation.Validation{
23767		{TargetValue: resourceGroupName,
23768			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23769				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23770				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23771		return result, validation.NewError("web.AppsClient", "ListMetadataSlot", err.Error())
23772	}
23773
23774	req, err := client.ListMetadataSlotPreparer(ctx, resourceGroupName, name, slot)
23775	if err != nil {
23776		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", nil, "Failure preparing request")
23777		return
23778	}
23779
23780	resp, err := client.ListMetadataSlotSender(req)
23781	if err != nil {
23782		result.Response = autorest.Response{Response: resp}
23783		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", resp, "Failure sending request")
23784		return
23785	}
23786
23787	result, err = client.ListMetadataSlotResponder(resp)
23788	if err != nil {
23789		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", resp, "Failure responding to request")
23790		return
23791	}
23792
23793	return
23794}
23795
23796// ListMetadataSlotPreparer prepares the ListMetadataSlot request.
23797func (client AppsClient) ListMetadataSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
23798	pathParameters := map[string]interface{}{
23799		"name":              autorest.Encode("path", name),
23800		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23801		"slot":              autorest.Encode("path", slot),
23802		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23803	}
23804
23805	const APIVersion = "2021-01-15"
23806	queryParameters := map[string]interface{}{
23807		"api-version": APIVersion,
23808	}
23809
23810	preparer := autorest.CreatePreparer(
23811		autorest.AsPost(),
23812		autorest.WithBaseURL(client.BaseURI),
23813		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list", pathParameters),
23814		autorest.WithQueryParameters(queryParameters))
23815	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23816}
23817
23818// ListMetadataSlotSender sends the ListMetadataSlot request. The method will close the
23819// http.Response Body if it receives an error.
23820func (client AppsClient) ListMetadataSlotSender(req *http.Request) (*http.Response, error) {
23821	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23822}
23823
23824// ListMetadataSlotResponder handles the response to the ListMetadataSlot request. The method always
23825// closes the http.Response Body.
23826func (client AppsClient) ListMetadataSlotResponder(resp *http.Response) (result StringDictionary, err error) {
23827	err = autorest.Respond(
23828		resp,
23829		azure.WithErrorUnlessStatusCode(http.StatusOK),
23830		autorest.ByUnmarshallingJSON(&result),
23831		autorest.ByClosing())
23832	result.Response = autorest.Response{Response: resp}
23833	return
23834}
23835
23836// ListNetworkFeatures description for Gets all network features used by the app (or deployment slot, if specified).
23837// Parameters:
23838// resourceGroupName - name of the resource group to which the resource belongs.
23839// name - name of the app.
23840// view - the type of view. Only "summary" is supported at this time.
23841func (client AppsClient) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result NetworkFeatures, err error) {
23842	if tracing.IsEnabled() {
23843		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListNetworkFeatures")
23844		defer func() {
23845			sc := -1
23846			if result.Response.Response != nil {
23847				sc = result.Response.Response.StatusCode
23848			}
23849			tracing.EndSpan(ctx, sc, err)
23850		}()
23851	}
23852	if err := validation.Validate([]validation.Validation{
23853		{TargetValue: resourceGroupName,
23854			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23855				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23856				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23857		return result, validation.NewError("web.AppsClient", "ListNetworkFeatures", err.Error())
23858	}
23859
23860	req, err := client.ListNetworkFeaturesPreparer(ctx, resourceGroupName, name, view)
23861	if err != nil {
23862		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", nil, "Failure preparing request")
23863		return
23864	}
23865
23866	resp, err := client.ListNetworkFeaturesSender(req)
23867	if err != nil {
23868		result.Response = autorest.Response{Response: resp}
23869		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", resp, "Failure sending request")
23870		return
23871	}
23872
23873	result, err = client.ListNetworkFeaturesResponder(resp)
23874	if err != nil {
23875		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", resp, "Failure responding to request")
23876		return
23877	}
23878
23879	return
23880}
23881
23882// ListNetworkFeaturesPreparer prepares the ListNetworkFeatures request.
23883func (client AppsClient) ListNetworkFeaturesPreparer(ctx context.Context, resourceGroupName string, name string, view string) (*http.Request, error) {
23884	pathParameters := map[string]interface{}{
23885		"name":              autorest.Encode("path", name),
23886		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23887		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23888		"view":              autorest.Encode("path", view),
23889	}
23890
23891	const APIVersion = "2021-01-15"
23892	queryParameters := map[string]interface{}{
23893		"api-version": APIVersion,
23894	}
23895
23896	preparer := autorest.CreatePreparer(
23897		autorest.AsGet(),
23898		autorest.WithBaseURL(client.BaseURI),
23899		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}", pathParameters),
23900		autorest.WithQueryParameters(queryParameters))
23901	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23902}
23903
23904// ListNetworkFeaturesSender sends the ListNetworkFeatures request. The method will close the
23905// http.Response Body if it receives an error.
23906func (client AppsClient) ListNetworkFeaturesSender(req *http.Request) (*http.Response, error) {
23907	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23908}
23909
23910// ListNetworkFeaturesResponder handles the response to the ListNetworkFeatures request. The method always
23911// closes the http.Response Body.
23912func (client AppsClient) ListNetworkFeaturesResponder(resp *http.Response) (result NetworkFeatures, err error) {
23913	err = autorest.Respond(
23914		resp,
23915		azure.WithErrorUnlessStatusCode(http.StatusOK),
23916		autorest.ByUnmarshallingJSON(&result),
23917		autorest.ByClosing())
23918	result.Response = autorest.Response{Response: resp}
23919	return
23920}
23921
23922// ListNetworkFeaturesSlot description for Gets all network features used by the app (or deployment slot, if
23923// specified).
23924// Parameters:
23925// resourceGroupName - name of the resource group to which the resource belongs.
23926// name - name of the app.
23927// view - the type of view. Only "summary" is supported at this time.
23928// slot - name of the deployment slot. If a slot is not specified, the API will get network features for the
23929// production slot.
23930func (client AppsClient) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result NetworkFeatures, err error) {
23931	if tracing.IsEnabled() {
23932		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListNetworkFeaturesSlot")
23933		defer func() {
23934			sc := -1
23935			if result.Response.Response != nil {
23936				sc = result.Response.Response.StatusCode
23937			}
23938			tracing.EndSpan(ctx, sc, err)
23939		}()
23940	}
23941	if err := validation.Validate([]validation.Validation{
23942		{TargetValue: resourceGroupName,
23943			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23944				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23945				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23946		return result, validation.NewError("web.AppsClient", "ListNetworkFeaturesSlot", err.Error())
23947	}
23948
23949	req, err := client.ListNetworkFeaturesSlotPreparer(ctx, resourceGroupName, name, view, slot)
23950	if err != nil {
23951		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", nil, "Failure preparing request")
23952		return
23953	}
23954
23955	resp, err := client.ListNetworkFeaturesSlotSender(req)
23956	if err != nil {
23957		result.Response = autorest.Response{Response: resp}
23958		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", resp, "Failure sending request")
23959		return
23960	}
23961
23962	result, err = client.ListNetworkFeaturesSlotResponder(resp)
23963	if err != nil {
23964		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", resp, "Failure responding to request")
23965		return
23966	}
23967
23968	return
23969}
23970
23971// ListNetworkFeaturesSlotPreparer prepares the ListNetworkFeaturesSlot request.
23972func (client AppsClient) ListNetworkFeaturesSlotPreparer(ctx context.Context, resourceGroupName string, name string, view string, slot string) (*http.Request, error) {
23973	pathParameters := map[string]interface{}{
23974		"name":              autorest.Encode("path", name),
23975		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23976		"slot":              autorest.Encode("path", slot),
23977		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23978		"view":              autorest.Encode("path", view),
23979	}
23980
23981	const APIVersion = "2021-01-15"
23982	queryParameters := map[string]interface{}{
23983		"api-version": APIVersion,
23984	}
23985
23986	preparer := autorest.CreatePreparer(
23987		autorest.AsGet(),
23988		autorest.WithBaseURL(client.BaseURI),
23989		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}", pathParameters),
23990		autorest.WithQueryParameters(queryParameters))
23991	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23992}
23993
23994// ListNetworkFeaturesSlotSender sends the ListNetworkFeaturesSlot request. The method will close the
23995// http.Response Body if it receives an error.
23996func (client AppsClient) ListNetworkFeaturesSlotSender(req *http.Request) (*http.Response, error) {
23997	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23998}
23999
24000// ListNetworkFeaturesSlotResponder handles the response to the ListNetworkFeaturesSlot request. The method always
24001// closes the http.Response Body.
24002func (client AppsClient) ListNetworkFeaturesSlotResponder(resp *http.Response) (result NetworkFeatures, err error) {
24003	err = autorest.Respond(
24004		resp,
24005		azure.WithErrorUnlessStatusCode(http.StatusOK),
24006		autorest.ByUnmarshallingJSON(&result),
24007		autorest.ByClosing())
24008	result.Response = autorest.Response{Response: resp}
24009	return
24010}
24011
24012// ListPerfMonCounters description for Gets perfmon counters for web app.
24013// Parameters:
24014// resourceGroupName - name of the resource group to which the resource belongs.
24015// name - name of web app.
24016// filter - return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example:
24017// $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
24018// duration'[Hour|Minute|Day]'.
24019func (client AppsClient) ListPerfMonCounters(ctx context.Context, resourceGroupName string, name string, filter string) (result PerfMonCounterCollectionPage, err error) {
24020	if tracing.IsEnabled() {
24021		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCounters")
24022		defer func() {
24023			sc := -1
24024			if result.pmcc.Response.Response != nil {
24025				sc = result.pmcc.Response.Response.StatusCode
24026			}
24027			tracing.EndSpan(ctx, sc, err)
24028		}()
24029	}
24030	if err := validation.Validate([]validation.Validation{
24031		{TargetValue: resourceGroupName,
24032			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24033				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24034				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24035		return result, validation.NewError("web.AppsClient", "ListPerfMonCounters", err.Error())
24036	}
24037
24038	result.fn = client.listPerfMonCountersNextResults
24039	req, err := client.ListPerfMonCountersPreparer(ctx, resourceGroupName, name, filter)
24040	if err != nil {
24041		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", nil, "Failure preparing request")
24042		return
24043	}
24044
24045	resp, err := client.ListPerfMonCountersSender(req)
24046	if err != nil {
24047		result.pmcc.Response = autorest.Response{Response: resp}
24048		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", resp, "Failure sending request")
24049		return
24050	}
24051
24052	result.pmcc, err = client.ListPerfMonCountersResponder(resp)
24053	if err != nil {
24054		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", resp, "Failure responding to request")
24055		return
24056	}
24057	if result.pmcc.hasNextLink() && result.pmcc.IsEmpty() {
24058		err = result.NextWithContext(ctx)
24059		return
24060	}
24061
24062	return
24063}
24064
24065// ListPerfMonCountersPreparer prepares the ListPerfMonCounters request.
24066func (client AppsClient) ListPerfMonCountersPreparer(ctx context.Context, resourceGroupName string, name string, filter string) (*http.Request, error) {
24067	pathParameters := map[string]interface{}{
24068		"name":              autorest.Encode("path", name),
24069		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24070		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24071	}
24072
24073	const APIVersion = "2021-01-15"
24074	queryParameters := map[string]interface{}{
24075		"api-version": APIVersion,
24076	}
24077	if len(filter) > 0 {
24078		queryParameters["$filter"] = filter
24079	}
24080
24081	preparer := autorest.CreatePreparer(
24082		autorest.AsGet(),
24083		autorest.WithBaseURL(client.BaseURI),
24084		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters", pathParameters),
24085		autorest.WithQueryParameters(queryParameters))
24086	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24087}
24088
24089// ListPerfMonCountersSender sends the ListPerfMonCounters request. The method will close the
24090// http.Response Body if it receives an error.
24091func (client AppsClient) ListPerfMonCountersSender(req *http.Request) (*http.Response, error) {
24092	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24093}
24094
24095// ListPerfMonCountersResponder handles the response to the ListPerfMonCounters request. The method always
24096// closes the http.Response Body.
24097func (client AppsClient) ListPerfMonCountersResponder(resp *http.Response) (result PerfMonCounterCollection, err error) {
24098	err = autorest.Respond(
24099		resp,
24100		azure.WithErrorUnlessStatusCode(http.StatusOK),
24101		autorest.ByUnmarshallingJSON(&result),
24102		autorest.ByClosing())
24103	result.Response = autorest.Response{Response: resp}
24104	return
24105}
24106
24107// listPerfMonCountersNextResults retrieves the next set of results, if any.
24108func (client AppsClient) listPerfMonCountersNextResults(ctx context.Context, lastResults PerfMonCounterCollection) (result PerfMonCounterCollection, err error) {
24109	req, err := lastResults.perfMonCounterCollectionPreparer(ctx)
24110	if err != nil {
24111		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", nil, "Failure preparing next results request")
24112	}
24113	if req == nil {
24114		return
24115	}
24116	resp, err := client.ListPerfMonCountersSender(req)
24117	if err != nil {
24118		result.Response = autorest.Response{Response: resp}
24119		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", resp, "Failure sending next results request")
24120	}
24121	result, err = client.ListPerfMonCountersResponder(resp)
24122	if err != nil {
24123		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", resp, "Failure responding to next results request")
24124	}
24125	return
24126}
24127
24128// ListPerfMonCountersComplete enumerates all values, automatically crossing page boundaries as required.
24129func (client AppsClient) ListPerfMonCountersComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result PerfMonCounterCollectionIterator, err error) {
24130	if tracing.IsEnabled() {
24131		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCounters")
24132		defer func() {
24133			sc := -1
24134			if result.Response().Response.Response != nil {
24135				sc = result.page.Response().Response.Response.StatusCode
24136			}
24137			tracing.EndSpan(ctx, sc, err)
24138		}()
24139	}
24140	result.page, err = client.ListPerfMonCounters(ctx, resourceGroupName, name, filter)
24141	return
24142}
24143
24144// ListPerfMonCountersSlot description for Gets perfmon counters for web app.
24145// Parameters:
24146// resourceGroupName - name of the resource group to which the resource belongs.
24147// name - name of web app.
24148// slot - name of web app slot. If not specified then will default to production slot.
24149// filter - return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example:
24150// $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
24151// duration'[Hour|Minute|Day]'.
24152func (client AppsClient) ListPerfMonCountersSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollectionPage, err error) {
24153	if tracing.IsEnabled() {
24154		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCountersSlot")
24155		defer func() {
24156			sc := -1
24157			if result.pmcc.Response.Response != nil {
24158				sc = result.pmcc.Response.Response.StatusCode
24159			}
24160			tracing.EndSpan(ctx, sc, err)
24161		}()
24162	}
24163	if err := validation.Validate([]validation.Validation{
24164		{TargetValue: resourceGroupName,
24165			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24166				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24167				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24168		return result, validation.NewError("web.AppsClient", "ListPerfMonCountersSlot", err.Error())
24169	}
24170
24171	result.fn = client.listPerfMonCountersSlotNextResults
24172	req, err := client.ListPerfMonCountersSlotPreparer(ctx, resourceGroupName, name, slot, filter)
24173	if err != nil {
24174		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", nil, "Failure preparing request")
24175		return
24176	}
24177
24178	resp, err := client.ListPerfMonCountersSlotSender(req)
24179	if err != nil {
24180		result.pmcc.Response = autorest.Response{Response: resp}
24181		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", resp, "Failure sending request")
24182		return
24183	}
24184
24185	result.pmcc, err = client.ListPerfMonCountersSlotResponder(resp)
24186	if err != nil {
24187		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", resp, "Failure responding to request")
24188		return
24189	}
24190	if result.pmcc.hasNextLink() && result.pmcc.IsEmpty() {
24191		err = result.NextWithContext(ctx)
24192		return
24193	}
24194
24195	return
24196}
24197
24198// ListPerfMonCountersSlotPreparer prepares the ListPerfMonCountersSlot request.
24199func (client AppsClient) ListPerfMonCountersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (*http.Request, error) {
24200	pathParameters := map[string]interface{}{
24201		"name":              autorest.Encode("path", name),
24202		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24203		"slot":              autorest.Encode("path", slot),
24204		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24205	}
24206
24207	const APIVersion = "2021-01-15"
24208	queryParameters := map[string]interface{}{
24209		"api-version": APIVersion,
24210	}
24211	if len(filter) > 0 {
24212		queryParameters["$filter"] = filter
24213	}
24214
24215	preparer := autorest.CreatePreparer(
24216		autorest.AsGet(),
24217		autorest.WithBaseURL(client.BaseURI),
24218		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters", pathParameters),
24219		autorest.WithQueryParameters(queryParameters))
24220	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24221}
24222
24223// ListPerfMonCountersSlotSender sends the ListPerfMonCountersSlot request. The method will close the
24224// http.Response Body if it receives an error.
24225func (client AppsClient) ListPerfMonCountersSlotSender(req *http.Request) (*http.Response, error) {
24226	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24227}
24228
24229// ListPerfMonCountersSlotResponder handles the response to the ListPerfMonCountersSlot request. The method always
24230// closes the http.Response Body.
24231func (client AppsClient) ListPerfMonCountersSlotResponder(resp *http.Response) (result PerfMonCounterCollection, err error) {
24232	err = autorest.Respond(
24233		resp,
24234		azure.WithErrorUnlessStatusCode(http.StatusOK),
24235		autorest.ByUnmarshallingJSON(&result),
24236		autorest.ByClosing())
24237	result.Response = autorest.Response{Response: resp}
24238	return
24239}
24240
24241// listPerfMonCountersSlotNextResults retrieves the next set of results, if any.
24242func (client AppsClient) listPerfMonCountersSlotNextResults(ctx context.Context, lastResults PerfMonCounterCollection) (result PerfMonCounterCollection, err error) {
24243	req, err := lastResults.perfMonCounterCollectionPreparer(ctx)
24244	if err != nil {
24245		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", nil, "Failure preparing next results request")
24246	}
24247	if req == nil {
24248		return
24249	}
24250	resp, err := client.ListPerfMonCountersSlotSender(req)
24251	if err != nil {
24252		result.Response = autorest.Response{Response: resp}
24253		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", resp, "Failure sending next results request")
24254	}
24255	result, err = client.ListPerfMonCountersSlotResponder(resp)
24256	if err != nil {
24257		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", resp, "Failure responding to next results request")
24258	}
24259	return
24260}
24261
24262// ListPerfMonCountersSlotComplete enumerates all values, automatically crossing page boundaries as required.
24263func (client AppsClient) ListPerfMonCountersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollectionIterator, err error) {
24264	if tracing.IsEnabled() {
24265		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCountersSlot")
24266		defer func() {
24267			sc := -1
24268			if result.Response().Response.Response != nil {
24269				sc = result.page.Response().Response.Response.StatusCode
24270			}
24271			tracing.EndSpan(ctx, sc, err)
24272		}()
24273	}
24274	result.page, err = client.ListPerfMonCountersSlot(ctx, resourceGroupName, name, slot, filter)
24275	return
24276}
24277
24278// ListPremierAddOns description for Gets the premier add-ons of an app.
24279// Parameters:
24280// resourceGroupName - name of the resource group to which the resource belongs.
24281// name - name of the app.
24282func (client AppsClient) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string) (result PremierAddOn, err error) {
24283	if tracing.IsEnabled() {
24284		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPremierAddOns")
24285		defer func() {
24286			sc := -1
24287			if result.Response.Response != nil {
24288				sc = result.Response.Response.StatusCode
24289			}
24290			tracing.EndSpan(ctx, sc, err)
24291		}()
24292	}
24293	if err := validation.Validate([]validation.Validation{
24294		{TargetValue: resourceGroupName,
24295			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24296				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24297				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24298		return result, validation.NewError("web.AppsClient", "ListPremierAddOns", err.Error())
24299	}
24300
24301	req, err := client.ListPremierAddOnsPreparer(ctx, resourceGroupName, name)
24302	if err != nil {
24303		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", nil, "Failure preparing request")
24304		return
24305	}
24306
24307	resp, err := client.ListPremierAddOnsSender(req)
24308	if err != nil {
24309		result.Response = autorest.Response{Response: resp}
24310		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", resp, "Failure sending request")
24311		return
24312	}
24313
24314	result, err = client.ListPremierAddOnsResponder(resp)
24315	if err != nil {
24316		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", resp, "Failure responding to request")
24317		return
24318	}
24319
24320	return
24321}
24322
24323// ListPremierAddOnsPreparer prepares the ListPremierAddOns request.
24324func (client AppsClient) ListPremierAddOnsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24325	pathParameters := map[string]interface{}{
24326		"name":              autorest.Encode("path", name),
24327		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24328		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24329	}
24330
24331	const APIVersion = "2021-01-15"
24332	queryParameters := map[string]interface{}{
24333		"api-version": APIVersion,
24334	}
24335
24336	preparer := autorest.CreatePreparer(
24337		autorest.AsGet(),
24338		autorest.WithBaseURL(client.BaseURI),
24339		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons", pathParameters),
24340		autorest.WithQueryParameters(queryParameters))
24341	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24342}
24343
24344// ListPremierAddOnsSender sends the ListPremierAddOns request. The method will close the
24345// http.Response Body if it receives an error.
24346func (client AppsClient) ListPremierAddOnsSender(req *http.Request) (*http.Response, error) {
24347	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24348}
24349
24350// ListPremierAddOnsResponder handles the response to the ListPremierAddOns request. The method always
24351// closes the http.Response Body.
24352func (client AppsClient) ListPremierAddOnsResponder(resp *http.Response) (result PremierAddOn, err error) {
24353	err = autorest.Respond(
24354		resp,
24355		azure.WithErrorUnlessStatusCode(http.StatusOK),
24356		autorest.ByUnmarshallingJSON(&result),
24357		autorest.ByClosing())
24358	result.Response = autorest.Response{Response: resp}
24359	return
24360}
24361
24362// ListPremierAddOnsSlot description for Gets the premier add-ons of an app.
24363// Parameters:
24364// resourceGroupName - name of the resource group to which the resource belongs.
24365// name - name of the app.
24366// slot - name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the
24367// production slot.
24368func (client AppsClient) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PremierAddOn, err error) {
24369	if tracing.IsEnabled() {
24370		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPremierAddOnsSlot")
24371		defer func() {
24372			sc := -1
24373			if result.Response.Response != nil {
24374				sc = result.Response.Response.StatusCode
24375			}
24376			tracing.EndSpan(ctx, sc, err)
24377		}()
24378	}
24379	if err := validation.Validate([]validation.Validation{
24380		{TargetValue: resourceGroupName,
24381			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24382				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24383				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24384		return result, validation.NewError("web.AppsClient", "ListPremierAddOnsSlot", err.Error())
24385	}
24386
24387	req, err := client.ListPremierAddOnsSlotPreparer(ctx, resourceGroupName, name, slot)
24388	if err != nil {
24389		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", nil, "Failure preparing request")
24390		return
24391	}
24392
24393	resp, err := client.ListPremierAddOnsSlotSender(req)
24394	if err != nil {
24395		result.Response = autorest.Response{Response: resp}
24396		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", resp, "Failure sending request")
24397		return
24398	}
24399
24400	result, err = client.ListPremierAddOnsSlotResponder(resp)
24401	if err != nil {
24402		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", resp, "Failure responding to request")
24403		return
24404	}
24405
24406	return
24407}
24408
24409// ListPremierAddOnsSlotPreparer prepares the ListPremierAddOnsSlot request.
24410func (client AppsClient) ListPremierAddOnsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24411	pathParameters := map[string]interface{}{
24412		"name":              autorest.Encode("path", name),
24413		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24414		"slot":              autorest.Encode("path", slot),
24415		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24416	}
24417
24418	const APIVersion = "2021-01-15"
24419	queryParameters := map[string]interface{}{
24420		"api-version": APIVersion,
24421	}
24422
24423	preparer := autorest.CreatePreparer(
24424		autorest.AsGet(),
24425		autorest.WithBaseURL(client.BaseURI),
24426		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons", pathParameters),
24427		autorest.WithQueryParameters(queryParameters))
24428	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24429}
24430
24431// ListPremierAddOnsSlotSender sends the ListPremierAddOnsSlot request. The method will close the
24432// http.Response Body if it receives an error.
24433func (client AppsClient) ListPremierAddOnsSlotSender(req *http.Request) (*http.Response, error) {
24434	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24435}
24436
24437// ListPremierAddOnsSlotResponder handles the response to the ListPremierAddOnsSlot request. The method always
24438// closes the http.Response Body.
24439func (client AppsClient) ListPremierAddOnsSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
24440	err = autorest.Respond(
24441		resp,
24442		azure.WithErrorUnlessStatusCode(http.StatusOK),
24443		autorest.ByUnmarshallingJSON(&result),
24444		autorest.ByClosing())
24445	result.Response = autorest.Response{Response: resp}
24446	return
24447}
24448
24449// ListProcesses description for Get list of processes for a web site, or a deployment slot, or for a specific
24450// scaled-out instance in a web site.
24451// Parameters:
24452// resourceGroupName - name of the resource group to which the resource belongs.
24453// name - site name.
24454func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionPage, err error) {
24455	if tracing.IsEnabled() {
24456		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses")
24457		defer func() {
24458			sc := -1
24459			if result.pic.Response.Response != nil {
24460				sc = result.pic.Response.Response.StatusCode
24461			}
24462			tracing.EndSpan(ctx, sc, err)
24463		}()
24464	}
24465	if err := validation.Validate([]validation.Validation{
24466		{TargetValue: resourceGroupName,
24467			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24468				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24469				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24470		return result, validation.NewError("web.AppsClient", "ListProcesses", err.Error())
24471	}
24472
24473	result.fn = client.listProcessesNextResults
24474	req, err := client.ListProcessesPreparer(ctx, resourceGroupName, name)
24475	if err != nil {
24476		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing request")
24477		return
24478	}
24479
24480	resp, err := client.ListProcessesSender(req)
24481	if err != nil {
24482		result.pic.Response = autorest.Response{Response: resp}
24483		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending request")
24484		return
24485	}
24486
24487	result.pic, err = client.ListProcessesResponder(resp)
24488	if err != nil {
24489		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to request")
24490		return
24491	}
24492	if result.pic.hasNextLink() && result.pic.IsEmpty() {
24493		err = result.NextWithContext(ctx)
24494		return
24495	}
24496
24497	return
24498}
24499
24500// ListProcessesPreparer prepares the ListProcesses request.
24501func (client AppsClient) ListProcessesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24502	pathParameters := map[string]interface{}{
24503		"name":              autorest.Encode("path", name),
24504		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24505		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24506	}
24507
24508	const APIVersion = "2021-01-15"
24509	queryParameters := map[string]interface{}{
24510		"api-version": APIVersion,
24511	}
24512
24513	preparer := autorest.CreatePreparer(
24514		autorest.AsGet(),
24515		autorest.WithBaseURL(client.BaseURI),
24516		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes", pathParameters),
24517		autorest.WithQueryParameters(queryParameters))
24518	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24519}
24520
24521// ListProcessesSender sends the ListProcesses request. The method will close the
24522// http.Response Body if it receives an error.
24523func (client AppsClient) ListProcessesSender(req *http.Request) (*http.Response, error) {
24524	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24525}
24526
24527// ListProcessesResponder handles the response to the ListProcesses request. The method always
24528// closes the http.Response Body.
24529func (client AppsClient) ListProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
24530	err = autorest.Respond(
24531		resp,
24532		azure.WithErrorUnlessStatusCode(http.StatusOK),
24533		autorest.ByUnmarshallingJSON(&result),
24534		autorest.ByClosing())
24535	result.Response = autorest.Response{Response: resp}
24536	return
24537}
24538
24539// listProcessesNextResults retrieves the next set of results, if any.
24540func (client AppsClient) listProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
24541	req, err := lastResults.processInfoCollectionPreparer(ctx)
24542	if err != nil {
24543		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", nil, "Failure preparing next results request")
24544	}
24545	if req == nil {
24546		return
24547	}
24548	resp, err := client.ListProcessesSender(req)
24549	if err != nil {
24550		result.Response = autorest.Response{Response: resp}
24551		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure sending next results request")
24552	}
24553	result, err = client.ListProcessesResponder(resp)
24554	if err != nil {
24555		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure responding to next results request")
24556	}
24557	return
24558}
24559
24560// ListProcessesComplete enumerates all values, automatically crossing page boundaries as required.
24561func (client AppsClient) ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionIterator, err error) {
24562	if tracing.IsEnabled() {
24563		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses")
24564		defer func() {
24565			sc := -1
24566			if result.Response().Response.Response != nil {
24567				sc = result.page.Response().Response.Response.StatusCode
24568			}
24569			tracing.EndSpan(ctx, sc, err)
24570		}()
24571	}
24572	result.page, err = client.ListProcesses(ctx, resourceGroupName, name)
24573	return
24574}
24575
24576// ListProcessesSlot description for Get list of processes for a web site, or a deployment slot, or for a specific
24577// scaled-out instance in a web site.
24578// Parameters:
24579// resourceGroupName - name of the resource group to which the resource belongs.
24580// name - site name.
24581// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
24582// production slot.
24583func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionPage, err error) {
24584	if tracing.IsEnabled() {
24585		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot")
24586		defer func() {
24587			sc := -1
24588			if result.pic.Response.Response != nil {
24589				sc = result.pic.Response.Response.StatusCode
24590			}
24591			tracing.EndSpan(ctx, sc, err)
24592		}()
24593	}
24594	if err := validation.Validate([]validation.Validation{
24595		{TargetValue: resourceGroupName,
24596			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24597				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24598				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24599		return result, validation.NewError("web.AppsClient", "ListProcessesSlot", err.Error())
24600	}
24601
24602	result.fn = client.listProcessesSlotNextResults
24603	req, err := client.ListProcessesSlotPreparer(ctx, resourceGroupName, name, slot)
24604	if err != nil {
24605		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing request")
24606		return
24607	}
24608
24609	resp, err := client.ListProcessesSlotSender(req)
24610	if err != nil {
24611		result.pic.Response = autorest.Response{Response: resp}
24612		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending request")
24613		return
24614	}
24615
24616	result.pic, err = client.ListProcessesSlotResponder(resp)
24617	if err != nil {
24618		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to request")
24619		return
24620	}
24621	if result.pic.hasNextLink() && result.pic.IsEmpty() {
24622		err = result.NextWithContext(ctx)
24623		return
24624	}
24625
24626	return
24627}
24628
24629// ListProcessesSlotPreparer prepares the ListProcessesSlot request.
24630func (client AppsClient) ListProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24631	pathParameters := map[string]interface{}{
24632		"name":              autorest.Encode("path", name),
24633		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24634		"slot":              autorest.Encode("path", slot),
24635		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24636	}
24637
24638	const APIVersion = "2021-01-15"
24639	queryParameters := map[string]interface{}{
24640		"api-version": APIVersion,
24641	}
24642
24643	preparer := autorest.CreatePreparer(
24644		autorest.AsGet(),
24645		autorest.WithBaseURL(client.BaseURI),
24646		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", pathParameters),
24647		autorest.WithQueryParameters(queryParameters))
24648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24649}
24650
24651// ListProcessesSlotSender sends the ListProcessesSlot request. The method will close the
24652// http.Response Body if it receives an error.
24653func (client AppsClient) ListProcessesSlotSender(req *http.Request) (*http.Response, error) {
24654	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24655}
24656
24657// ListProcessesSlotResponder handles the response to the ListProcessesSlot request. The method always
24658// closes the http.Response Body.
24659func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
24660	err = autorest.Respond(
24661		resp,
24662		azure.WithErrorUnlessStatusCode(http.StatusOK),
24663		autorest.ByUnmarshallingJSON(&result),
24664		autorest.ByClosing())
24665	result.Response = autorest.Response{Response: resp}
24666	return
24667}
24668
24669// listProcessesSlotNextResults retrieves the next set of results, if any.
24670func (client AppsClient) listProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
24671	req, err := lastResults.processInfoCollectionPreparer(ctx)
24672	if err != nil {
24673		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", nil, "Failure preparing next results request")
24674	}
24675	if req == nil {
24676		return
24677	}
24678	resp, err := client.ListProcessesSlotSender(req)
24679	if err != nil {
24680		result.Response = autorest.Response{Response: resp}
24681		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure sending next results request")
24682	}
24683	result, err = client.ListProcessesSlotResponder(resp)
24684	if err != nil {
24685		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure responding to next results request")
24686	}
24687	return
24688}
24689
24690// ListProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required.
24691func (client AppsClient) ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionIterator, err error) {
24692	if tracing.IsEnabled() {
24693		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot")
24694		defer func() {
24695			sc := -1
24696			if result.Response().Response.Response != nil {
24697				sc = result.page.Response().Response.Response.StatusCode
24698			}
24699			tracing.EndSpan(ctx, sc, err)
24700		}()
24701	}
24702	result.page, err = client.ListProcessesSlot(ctx, resourceGroupName, name, slot)
24703	return
24704}
24705
24706// ListProcessModules description for List module information for a process by its ID for a specific scaled-out
24707// instance in a web site.
24708// Parameters:
24709// resourceGroupName - name of the resource group to which the resource belongs.
24710// name - site name.
24711// processID - pID.
24712func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionPage, err error) {
24713	if tracing.IsEnabled() {
24714		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules")
24715		defer func() {
24716			sc := -1
24717			if result.pmic.Response.Response != nil {
24718				sc = result.pmic.Response.Response.StatusCode
24719			}
24720			tracing.EndSpan(ctx, sc, err)
24721		}()
24722	}
24723	if err := validation.Validate([]validation.Validation{
24724		{TargetValue: resourceGroupName,
24725			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24726				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24727				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24728		return result, validation.NewError("web.AppsClient", "ListProcessModules", err.Error())
24729	}
24730
24731	result.fn = client.listProcessModulesNextResults
24732	req, err := client.ListProcessModulesPreparer(ctx, resourceGroupName, name, processID)
24733	if err != nil {
24734		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing request")
24735		return
24736	}
24737
24738	resp, err := client.ListProcessModulesSender(req)
24739	if err != nil {
24740		result.pmic.Response = autorest.Response{Response: resp}
24741		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending request")
24742		return
24743	}
24744
24745	result.pmic, err = client.ListProcessModulesResponder(resp)
24746	if err != nil {
24747		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to request")
24748		return
24749	}
24750	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
24751		err = result.NextWithContext(ctx)
24752		return
24753	}
24754
24755	return
24756}
24757
24758// ListProcessModulesPreparer prepares the ListProcessModules request.
24759func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
24760	pathParameters := map[string]interface{}{
24761		"name":              autorest.Encode("path", name),
24762		"processId":         autorest.Encode("path", processID),
24763		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24764		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24765	}
24766
24767	const APIVersion = "2021-01-15"
24768	queryParameters := map[string]interface{}{
24769		"api-version": APIVersion,
24770	}
24771
24772	preparer := autorest.CreatePreparer(
24773		autorest.AsGet(),
24774		autorest.WithBaseURL(client.BaseURI),
24775		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules", pathParameters),
24776		autorest.WithQueryParameters(queryParameters))
24777	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24778}
24779
24780// ListProcessModulesSender sends the ListProcessModules request. The method will close the
24781// http.Response Body if it receives an error.
24782func (client AppsClient) ListProcessModulesSender(req *http.Request) (*http.Response, error) {
24783	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24784}
24785
24786// ListProcessModulesResponder handles the response to the ListProcessModules request. The method always
24787// closes the http.Response Body.
24788func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
24789	err = autorest.Respond(
24790		resp,
24791		azure.WithErrorUnlessStatusCode(http.StatusOK),
24792		autorest.ByUnmarshallingJSON(&result),
24793		autorest.ByClosing())
24794	result.Response = autorest.Response{Response: resp}
24795	return
24796}
24797
24798// listProcessModulesNextResults retrieves the next set of results, if any.
24799func (client AppsClient) listProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
24800	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
24801	if err != nil {
24802		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", nil, "Failure preparing next results request")
24803	}
24804	if req == nil {
24805		return
24806	}
24807	resp, err := client.ListProcessModulesSender(req)
24808	if err != nil {
24809		result.Response = autorest.Response{Response: resp}
24810		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure sending next results request")
24811	}
24812	result, err = client.ListProcessModulesResponder(resp)
24813	if err != nil {
24814		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure responding to next results request")
24815	}
24816	return
24817}
24818
24819// ListProcessModulesComplete enumerates all values, automatically crossing page boundaries as required.
24820func (client AppsClient) ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionIterator, err error) {
24821	if tracing.IsEnabled() {
24822		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules")
24823		defer func() {
24824			sc := -1
24825			if result.Response().Response.Response != nil {
24826				sc = result.page.Response().Response.Response.StatusCode
24827			}
24828			tracing.EndSpan(ctx, sc, err)
24829		}()
24830	}
24831	result.page, err = client.ListProcessModules(ctx, resourceGroupName, name, processID)
24832	return
24833}
24834
24835// ListProcessModulesSlot description for List module information for a process by its ID for a specific scaled-out
24836// instance in a web site.
24837// Parameters:
24838// resourceGroupName - name of the resource group to which the resource belongs.
24839// name - site name.
24840// processID - pID.
24841// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
24842// production slot.
24843func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionPage, err error) {
24844	if tracing.IsEnabled() {
24845		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot")
24846		defer func() {
24847			sc := -1
24848			if result.pmic.Response.Response != nil {
24849				sc = result.pmic.Response.Response.StatusCode
24850			}
24851			tracing.EndSpan(ctx, sc, err)
24852		}()
24853	}
24854	if err := validation.Validate([]validation.Validation{
24855		{TargetValue: resourceGroupName,
24856			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24857				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24858				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24859		return result, validation.NewError("web.AppsClient", "ListProcessModulesSlot", err.Error())
24860	}
24861
24862	result.fn = client.listProcessModulesSlotNextResults
24863	req, err := client.ListProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot)
24864	if err != nil {
24865		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing request")
24866		return
24867	}
24868
24869	resp, err := client.ListProcessModulesSlotSender(req)
24870	if err != nil {
24871		result.pmic.Response = autorest.Response{Response: resp}
24872		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending request")
24873		return
24874	}
24875
24876	result.pmic, err = client.ListProcessModulesSlotResponder(resp)
24877	if err != nil {
24878		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to request")
24879		return
24880	}
24881	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
24882		err = result.NextWithContext(ctx)
24883		return
24884	}
24885
24886	return
24887}
24888
24889// ListProcessModulesSlotPreparer prepares the ListProcessModulesSlot request.
24890func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
24891	pathParameters := map[string]interface{}{
24892		"name":              autorest.Encode("path", name),
24893		"processId":         autorest.Encode("path", processID),
24894		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24895		"slot":              autorest.Encode("path", slot),
24896		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24897	}
24898
24899	const APIVersion = "2021-01-15"
24900	queryParameters := map[string]interface{}{
24901		"api-version": APIVersion,
24902	}
24903
24904	preparer := autorest.CreatePreparer(
24905		autorest.AsGet(),
24906		autorest.WithBaseURL(client.BaseURI),
24907		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules", pathParameters),
24908		autorest.WithQueryParameters(queryParameters))
24909	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24910}
24911
24912// ListProcessModulesSlotSender sends the ListProcessModulesSlot request. The method will close the
24913// http.Response Body if it receives an error.
24914func (client AppsClient) ListProcessModulesSlotSender(req *http.Request) (*http.Response, error) {
24915	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24916}
24917
24918// ListProcessModulesSlotResponder handles the response to the ListProcessModulesSlot request. The method always
24919// closes the http.Response Body.
24920func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
24921	err = autorest.Respond(
24922		resp,
24923		azure.WithErrorUnlessStatusCode(http.StatusOK),
24924		autorest.ByUnmarshallingJSON(&result),
24925		autorest.ByClosing())
24926	result.Response = autorest.Response{Response: resp}
24927	return
24928}
24929
24930// listProcessModulesSlotNextResults retrieves the next set of results, if any.
24931func (client AppsClient) listProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
24932	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
24933	if err != nil {
24934		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", nil, "Failure preparing next results request")
24935	}
24936	if req == nil {
24937		return
24938	}
24939	resp, err := client.ListProcessModulesSlotSender(req)
24940	if err != nil {
24941		result.Response = autorest.Response{Response: resp}
24942		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure sending next results request")
24943	}
24944	result, err = client.ListProcessModulesSlotResponder(resp)
24945	if err != nil {
24946		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure responding to next results request")
24947	}
24948	return
24949}
24950
24951// ListProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required.
24952func (client AppsClient) ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionIterator, err error) {
24953	if tracing.IsEnabled() {
24954		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot")
24955		defer func() {
24956			sc := -1
24957			if result.Response().Response.Response != nil {
24958				sc = result.page.Response().Response.Response.StatusCode
24959			}
24960			tracing.EndSpan(ctx, sc, err)
24961		}()
24962	}
24963	result.page, err = client.ListProcessModulesSlot(ctx, resourceGroupName, name, processID, slot)
24964	return
24965}
24966
24967// ListProcessThreads description for List the threads in a process by its ID for a specific scaled-out instance in a
24968// web site.
24969// Parameters:
24970// resourceGroupName - name of the resource group to which the resource belongs.
24971// name - site name.
24972// processID - pID.
24973func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionPage, err error) {
24974	if tracing.IsEnabled() {
24975		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads")
24976		defer func() {
24977			sc := -1
24978			if result.ptic.Response.Response != nil {
24979				sc = result.ptic.Response.Response.StatusCode
24980			}
24981			tracing.EndSpan(ctx, sc, err)
24982		}()
24983	}
24984	if err := validation.Validate([]validation.Validation{
24985		{TargetValue: resourceGroupName,
24986			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24987				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24988				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24989		return result, validation.NewError("web.AppsClient", "ListProcessThreads", err.Error())
24990	}
24991
24992	result.fn = client.listProcessThreadsNextResults
24993	req, err := client.ListProcessThreadsPreparer(ctx, resourceGroupName, name, processID)
24994	if err != nil {
24995		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing request")
24996		return
24997	}
24998
24999	resp, err := client.ListProcessThreadsSender(req)
25000	if err != nil {
25001		result.ptic.Response = autorest.Response{Response: resp}
25002		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending request")
25003		return
25004	}
25005
25006	result.ptic, err = client.ListProcessThreadsResponder(resp)
25007	if err != nil {
25008		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to request")
25009		return
25010	}
25011	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
25012		err = result.NextWithContext(ctx)
25013		return
25014	}
25015
25016	return
25017}
25018
25019// ListProcessThreadsPreparer prepares the ListProcessThreads request.
25020func (client AppsClient) ListProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
25021	pathParameters := map[string]interface{}{
25022		"name":              autorest.Encode("path", name),
25023		"processId":         autorest.Encode("path", processID),
25024		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25025		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25026	}
25027
25028	const APIVersion = "2021-01-15"
25029	queryParameters := map[string]interface{}{
25030		"api-version": APIVersion,
25031	}
25032
25033	preparer := autorest.CreatePreparer(
25034		autorest.AsGet(),
25035		autorest.WithBaseURL(client.BaseURI),
25036		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads", pathParameters),
25037		autorest.WithQueryParameters(queryParameters))
25038	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25039}
25040
25041// ListProcessThreadsSender sends the ListProcessThreads request. The method will close the
25042// http.Response Body if it receives an error.
25043func (client AppsClient) ListProcessThreadsSender(req *http.Request) (*http.Response, error) {
25044	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25045}
25046
25047// ListProcessThreadsResponder handles the response to the ListProcessThreads request. The method always
25048// closes the http.Response Body.
25049func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
25050	err = autorest.Respond(
25051		resp,
25052		azure.WithErrorUnlessStatusCode(http.StatusOK),
25053		autorest.ByUnmarshallingJSON(&result),
25054		autorest.ByClosing())
25055	result.Response = autorest.Response{Response: resp}
25056	return
25057}
25058
25059// listProcessThreadsNextResults retrieves the next set of results, if any.
25060func (client AppsClient) listProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
25061	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
25062	if err != nil {
25063		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", nil, "Failure preparing next results request")
25064	}
25065	if req == nil {
25066		return
25067	}
25068	resp, err := client.ListProcessThreadsSender(req)
25069	if err != nil {
25070		result.Response = autorest.Response{Response: resp}
25071		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure sending next results request")
25072	}
25073	result, err = client.ListProcessThreadsResponder(resp)
25074	if err != nil {
25075		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure responding to next results request")
25076	}
25077	return
25078}
25079
25080// ListProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required.
25081func (client AppsClient) ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionIterator, err error) {
25082	if tracing.IsEnabled() {
25083		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads")
25084		defer func() {
25085			sc := -1
25086			if result.Response().Response.Response != nil {
25087				sc = result.page.Response().Response.Response.StatusCode
25088			}
25089			tracing.EndSpan(ctx, sc, err)
25090		}()
25091	}
25092	result.page, err = client.ListProcessThreads(ctx, resourceGroupName, name, processID)
25093	return
25094}
25095
25096// ListProcessThreadsSlot description for List the threads in a process by its ID for a specific scaled-out instance in
25097// a web site.
25098// Parameters:
25099// resourceGroupName - name of the resource group to which the resource belongs.
25100// name - site name.
25101// processID - pID.
25102// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
25103// production slot.
25104func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionPage, err error) {
25105	if tracing.IsEnabled() {
25106		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot")
25107		defer func() {
25108			sc := -1
25109			if result.ptic.Response.Response != nil {
25110				sc = result.ptic.Response.Response.StatusCode
25111			}
25112			tracing.EndSpan(ctx, sc, err)
25113		}()
25114	}
25115	if err := validation.Validate([]validation.Validation{
25116		{TargetValue: resourceGroupName,
25117			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25118				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25119				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25120		return result, validation.NewError("web.AppsClient", "ListProcessThreadsSlot", err.Error())
25121	}
25122
25123	result.fn = client.listProcessThreadsSlotNextResults
25124	req, err := client.ListProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot)
25125	if err != nil {
25126		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing request")
25127		return
25128	}
25129
25130	resp, err := client.ListProcessThreadsSlotSender(req)
25131	if err != nil {
25132		result.ptic.Response = autorest.Response{Response: resp}
25133		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending request")
25134		return
25135	}
25136
25137	result.ptic, err = client.ListProcessThreadsSlotResponder(resp)
25138	if err != nil {
25139		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to request")
25140		return
25141	}
25142	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
25143		err = result.NextWithContext(ctx)
25144		return
25145	}
25146
25147	return
25148}
25149
25150// ListProcessThreadsSlotPreparer prepares the ListProcessThreadsSlot request.
25151func (client AppsClient) ListProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
25152	pathParameters := map[string]interface{}{
25153		"name":              autorest.Encode("path", name),
25154		"processId":         autorest.Encode("path", processID),
25155		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25156		"slot":              autorest.Encode("path", slot),
25157		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25158	}
25159
25160	const APIVersion = "2021-01-15"
25161	queryParameters := map[string]interface{}{
25162		"api-version": APIVersion,
25163	}
25164
25165	preparer := autorest.CreatePreparer(
25166		autorest.AsGet(),
25167		autorest.WithBaseURL(client.BaseURI),
25168		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads", pathParameters),
25169		autorest.WithQueryParameters(queryParameters))
25170	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25171}
25172
25173// ListProcessThreadsSlotSender sends the ListProcessThreadsSlot request. The method will close the
25174// http.Response Body if it receives an error.
25175func (client AppsClient) ListProcessThreadsSlotSender(req *http.Request) (*http.Response, error) {
25176	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25177}
25178
25179// ListProcessThreadsSlotResponder handles the response to the ListProcessThreadsSlot request. The method always
25180// closes the http.Response Body.
25181func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
25182	err = autorest.Respond(
25183		resp,
25184		azure.WithErrorUnlessStatusCode(http.StatusOK),
25185		autorest.ByUnmarshallingJSON(&result),
25186		autorest.ByClosing())
25187	result.Response = autorest.Response{Response: resp}
25188	return
25189}
25190
25191// listProcessThreadsSlotNextResults retrieves the next set of results, if any.
25192func (client AppsClient) listProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
25193	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
25194	if err != nil {
25195		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", nil, "Failure preparing next results request")
25196	}
25197	if req == nil {
25198		return
25199	}
25200	resp, err := client.ListProcessThreadsSlotSender(req)
25201	if err != nil {
25202		result.Response = autorest.Response{Response: resp}
25203		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure sending next results request")
25204	}
25205	result, err = client.ListProcessThreadsSlotResponder(resp)
25206	if err != nil {
25207		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure responding to next results request")
25208	}
25209	return
25210}
25211
25212// ListProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required.
25213func (client AppsClient) ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionIterator, err error) {
25214	if tracing.IsEnabled() {
25215		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot")
25216		defer func() {
25217			sc := -1
25218			if result.Response().Response.Response != nil {
25219				sc = result.page.Response().Response.Response.StatusCode
25220			}
25221			tracing.EndSpan(ctx, sc, err)
25222		}()
25223	}
25224	result.page, err = client.ListProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot)
25225	return
25226}
25227
25228// ListPublicCertificates description for Get public certificates for an app or a deployment slot.
25229// Parameters:
25230// resourceGroupName - name of the resource group to which the resource belongs.
25231// name - name of the app.
25232func (client AppsClient) ListPublicCertificates(ctx context.Context, resourceGroupName string, name string) (result PublicCertificateCollectionPage, err error) {
25233	if tracing.IsEnabled() {
25234		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificates")
25235		defer func() {
25236			sc := -1
25237			if result.pcc.Response.Response != nil {
25238				sc = result.pcc.Response.Response.StatusCode
25239			}
25240			tracing.EndSpan(ctx, sc, err)
25241		}()
25242	}
25243	if err := validation.Validate([]validation.Validation{
25244		{TargetValue: resourceGroupName,
25245			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25246				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25247				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25248		return result, validation.NewError("web.AppsClient", "ListPublicCertificates", err.Error())
25249	}
25250
25251	result.fn = client.listPublicCertificatesNextResults
25252	req, err := client.ListPublicCertificatesPreparer(ctx, resourceGroupName, name)
25253	if err != nil {
25254		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", nil, "Failure preparing request")
25255		return
25256	}
25257
25258	resp, err := client.ListPublicCertificatesSender(req)
25259	if err != nil {
25260		result.pcc.Response = autorest.Response{Response: resp}
25261		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure sending request")
25262		return
25263	}
25264
25265	result.pcc, err = client.ListPublicCertificatesResponder(resp)
25266	if err != nil {
25267		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure responding to request")
25268		return
25269	}
25270	if result.pcc.hasNextLink() && result.pcc.IsEmpty() {
25271		err = result.NextWithContext(ctx)
25272		return
25273	}
25274
25275	return
25276}
25277
25278// ListPublicCertificatesPreparer prepares the ListPublicCertificates request.
25279func (client AppsClient) ListPublicCertificatesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25280	pathParameters := map[string]interface{}{
25281		"name":              autorest.Encode("path", name),
25282		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25283		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25284	}
25285
25286	const APIVersion = "2021-01-15"
25287	queryParameters := map[string]interface{}{
25288		"api-version": APIVersion,
25289	}
25290
25291	preparer := autorest.CreatePreparer(
25292		autorest.AsGet(),
25293		autorest.WithBaseURL(client.BaseURI),
25294		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates", pathParameters),
25295		autorest.WithQueryParameters(queryParameters))
25296	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25297}
25298
25299// ListPublicCertificatesSender sends the ListPublicCertificates request. The method will close the
25300// http.Response Body if it receives an error.
25301func (client AppsClient) ListPublicCertificatesSender(req *http.Request) (*http.Response, error) {
25302	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25303}
25304
25305// ListPublicCertificatesResponder handles the response to the ListPublicCertificates request. The method always
25306// closes the http.Response Body.
25307func (client AppsClient) ListPublicCertificatesResponder(resp *http.Response) (result PublicCertificateCollection, err error) {
25308	err = autorest.Respond(
25309		resp,
25310		azure.WithErrorUnlessStatusCode(http.StatusOK),
25311		autorest.ByUnmarshallingJSON(&result),
25312		autorest.ByClosing())
25313	result.Response = autorest.Response{Response: resp}
25314	return
25315}
25316
25317// listPublicCertificatesNextResults retrieves the next set of results, if any.
25318func (client AppsClient) listPublicCertificatesNextResults(ctx context.Context, lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) {
25319	req, err := lastResults.publicCertificateCollectionPreparer(ctx)
25320	if err != nil {
25321		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", nil, "Failure preparing next results request")
25322	}
25323	if req == nil {
25324		return
25325	}
25326	resp, err := client.ListPublicCertificatesSender(req)
25327	if err != nil {
25328		result.Response = autorest.Response{Response: resp}
25329		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", resp, "Failure sending next results request")
25330	}
25331	result, err = client.ListPublicCertificatesResponder(resp)
25332	if err != nil {
25333		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", resp, "Failure responding to next results request")
25334	}
25335	return
25336}
25337
25338// ListPublicCertificatesComplete enumerates all values, automatically crossing page boundaries as required.
25339func (client AppsClient) ListPublicCertificatesComplete(ctx context.Context, resourceGroupName string, name string) (result PublicCertificateCollectionIterator, err error) {
25340	if tracing.IsEnabled() {
25341		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificates")
25342		defer func() {
25343			sc := -1
25344			if result.Response().Response.Response != nil {
25345				sc = result.page.Response().Response.Response.StatusCode
25346			}
25347			tracing.EndSpan(ctx, sc, err)
25348		}()
25349	}
25350	result.page, err = client.ListPublicCertificates(ctx, resourceGroupName, name)
25351	return
25352}
25353
25354// ListPublicCertificatesSlot description for Get public certificates for an app or a deployment slot.
25355// Parameters:
25356// resourceGroupName - name of the resource group to which the resource belongs.
25357// name - name of the app.
25358// slot - name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the
25359// production slot.
25360func (client AppsClient) ListPublicCertificatesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PublicCertificateCollectionPage, err error) {
25361	if tracing.IsEnabled() {
25362		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificatesSlot")
25363		defer func() {
25364			sc := -1
25365			if result.pcc.Response.Response != nil {
25366				sc = result.pcc.Response.Response.StatusCode
25367			}
25368			tracing.EndSpan(ctx, sc, err)
25369		}()
25370	}
25371	if err := validation.Validate([]validation.Validation{
25372		{TargetValue: resourceGroupName,
25373			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25374				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25375				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25376		return result, validation.NewError("web.AppsClient", "ListPublicCertificatesSlot", err.Error())
25377	}
25378
25379	result.fn = client.listPublicCertificatesSlotNextResults
25380	req, err := client.ListPublicCertificatesSlotPreparer(ctx, resourceGroupName, name, slot)
25381	if err != nil {
25382		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", nil, "Failure preparing request")
25383		return
25384	}
25385
25386	resp, err := client.ListPublicCertificatesSlotSender(req)
25387	if err != nil {
25388		result.pcc.Response = autorest.Response{Response: resp}
25389		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure sending request")
25390		return
25391	}
25392
25393	result.pcc, err = client.ListPublicCertificatesSlotResponder(resp)
25394	if err != nil {
25395		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure responding to request")
25396		return
25397	}
25398	if result.pcc.hasNextLink() && result.pcc.IsEmpty() {
25399		err = result.NextWithContext(ctx)
25400		return
25401	}
25402
25403	return
25404}
25405
25406// ListPublicCertificatesSlotPreparer prepares the ListPublicCertificatesSlot request.
25407func (client AppsClient) ListPublicCertificatesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25408	pathParameters := map[string]interface{}{
25409		"name":              autorest.Encode("path", name),
25410		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25411		"slot":              autorest.Encode("path", slot),
25412		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25413	}
25414
25415	const APIVersion = "2021-01-15"
25416	queryParameters := map[string]interface{}{
25417		"api-version": APIVersion,
25418	}
25419
25420	preparer := autorest.CreatePreparer(
25421		autorest.AsGet(),
25422		autorest.WithBaseURL(client.BaseURI),
25423		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates", pathParameters),
25424		autorest.WithQueryParameters(queryParameters))
25425	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25426}
25427
25428// ListPublicCertificatesSlotSender sends the ListPublicCertificatesSlot request. The method will close the
25429// http.Response Body if it receives an error.
25430func (client AppsClient) ListPublicCertificatesSlotSender(req *http.Request) (*http.Response, error) {
25431	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25432}
25433
25434// ListPublicCertificatesSlotResponder handles the response to the ListPublicCertificatesSlot request. The method always
25435// closes the http.Response Body.
25436func (client AppsClient) ListPublicCertificatesSlotResponder(resp *http.Response) (result PublicCertificateCollection, err error) {
25437	err = autorest.Respond(
25438		resp,
25439		azure.WithErrorUnlessStatusCode(http.StatusOK),
25440		autorest.ByUnmarshallingJSON(&result),
25441		autorest.ByClosing())
25442	result.Response = autorest.Response{Response: resp}
25443	return
25444}
25445
25446// listPublicCertificatesSlotNextResults retrieves the next set of results, if any.
25447func (client AppsClient) listPublicCertificatesSlotNextResults(ctx context.Context, lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) {
25448	req, err := lastResults.publicCertificateCollectionPreparer(ctx)
25449	if err != nil {
25450		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", nil, "Failure preparing next results request")
25451	}
25452	if req == nil {
25453		return
25454	}
25455	resp, err := client.ListPublicCertificatesSlotSender(req)
25456	if err != nil {
25457		result.Response = autorest.Response{Response: resp}
25458		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", resp, "Failure sending next results request")
25459	}
25460	result, err = client.ListPublicCertificatesSlotResponder(resp)
25461	if err != nil {
25462		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", resp, "Failure responding to next results request")
25463	}
25464	return
25465}
25466
25467// ListPublicCertificatesSlotComplete enumerates all values, automatically crossing page boundaries as required.
25468func (client AppsClient) ListPublicCertificatesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result PublicCertificateCollectionIterator, err error) {
25469	if tracing.IsEnabled() {
25470		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificatesSlot")
25471		defer func() {
25472			sc := -1
25473			if result.Response().Response.Response != nil {
25474				sc = result.page.Response().Response.Response.StatusCode
25475			}
25476			tracing.EndSpan(ctx, sc, err)
25477		}()
25478	}
25479	result.page, err = client.ListPublicCertificatesSlot(ctx, resourceGroupName, name, slot)
25480	return
25481}
25482
25483// ListPublishingCredentials description for Gets the Git/FTP publishing credentials of an app.
25484// Parameters:
25485// resourceGroupName - name of the resource group to which the resource belongs.
25486// name - name of the app.
25487func (client AppsClient) ListPublishingCredentials(ctx context.Context, resourceGroupName string, name string) (result AppsListPublishingCredentialsFuture, err error) {
25488	if tracing.IsEnabled() {
25489		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingCredentials")
25490		defer func() {
25491			sc := -1
25492			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
25493				sc = result.FutureAPI.Response().StatusCode
25494			}
25495			tracing.EndSpan(ctx, sc, err)
25496		}()
25497	}
25498	if err := validation.Validate([]validation.Validation{
25499		{TargetValue: resourceGroupName,
25500			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25501				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25502				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25503		return result, validation.NewError("web.AppsClient", "ListPublishingCredentials", err.Error())
25504	}
25505
25506	req, err := client.ListPublishingCredentialsPreparer(ctx, resourceGroupName, name)
25507	if err != nil {
25508		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentials", nil, "Failure preparing request")
25509		return
25510	}
25511
25512	result, err = client.ListPublishingCredentialsSender(req)
25513	if err != nil {
25514		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentials", nil, "Failure sending request")
25515		return
25516	}
25517
25518	return
25519}
25520
25521// ListPublishingCredentialsPreparer prepares the ListPublishingCredentials request.
25522func (client AppsClient) ListPublishingCredentialsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25523	pathParameters := map[string]interface{}{
25524		"name":              autorest.Encode("path", name),
25525		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25526		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25527	}
25528
25529	const APIVersion = "2021-01-15"
25530	queryParameters := map[string]interface{}{
25531		"api-version": APIVersion,
25532	}
25533
25534	preparer := autorest.CreatePreparer(
25535		autorest.AsPost(),
25536		autorest.WithBaseURL(client.BaseURI),
25537		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list", pathParameters),
25538		autorest.WithQueryParameters(queryParameters))
25539	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25540}
25541
25542// ListPublishingCredentialsSender sends the ListPublishingCredentials request. The method will close the
25543// http.Response Body if it receives an error.
25544func (client AppsClient) ListPublishingCredentialsSender(req *http.Request) (future AppsListPublishingCredentialsFuture, err error) {
25545	var resp *http.Response
25546	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
25547	if err != nil {
25548		return
25549	}
25550	var azf azure.Future
25551	azf, err = azure.NewFutureFromResponse(resp)
25552	future.FutureAPI = &azf
25553	future.Result = future.result
25554	return
25555}
25556
25557// ListPublishingCredentialsResponder handles the response to the ListPublishingCredentials request. The method always
25558// closes the http.Response Body.
25559func (client AppsClient) ListPublishingCredentialsResponder(resp *http.Response) (result User, err error) {
25560	err = autorest.Respond(
25561		resp,
25562		azure.WithErrorUnlessStatusCode(http.StatusOK),
25563		autorest.ByUnmarshallingJSON(&result),
25564		autorest.ByClosing())
25565	result.Response = autorest.Response{Response: resp}
25566	return
25567}
25568
25569// ListPublishingCredentialsSlot description for Gets the Git/FTP publishing credentials of an app.
25570// Parameters:
25571// resourceGroupName - name of the resource group to which the resource belongs.
25572// name - name of the app.
25573// slot - name of the deployment slot. If a slot is not specified, the API will get the publishing credentials
25574// for the production slot.
25575func (client AppsClient) ListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AppsListPublishingCredentialsSlotFuture, err error) {
25576	if tracing.IsEnabled() {
25577		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingCredentialsSlot")
25578		defer func() {
25579			sc := -1
25580			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
25581				sc = result.FutureAPI.Response().StatusCode
25582			}
25583			tracing.EndSpan(ctx, sc, err)
25584		}()
25585	}
25586	if err := validation.Validate([]validation.Validation{
25587		{TargetValue: resourceGroupName,
25588			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25589				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25590				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25591		return result, validation.NewError("web.AppsClient", "ListPublishingCredentialsSlot", err.Error())
25592	}
25593
25594	req, err := client.ListPublishingCredentialsSlotPreparer(ctx, resourceGroupName, name, slot)
25595	if err != nil {
25596		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentialsSlot", nil, "Failure preparing request")
25597		return
25598	}
25599
25600	result, err = client.ListPublishingCredentialsSlotSender(req)
25601	if err != nil {
25602		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentialsSlot", nil, "Failure sending request")
25603		return
25604	}
25605
25606	return
25607}
25608
25609// ListPublishingCredentialsSlotPreparer prepares the ListPublishingCredentialsSlot request.
25610func (client AppsClient) ListPublishingCredentialsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25611	pathParameters := map[string]interface{}{
25612		"name":              autorest.Encode("path", name),
25613		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25614		"slot":              autorest.Encode("path", slot),
25615		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25616	}
25617
25618	const APIVersion = "2021-01-15"
25619	queryParameters := map[string]interface{}{
25620		"api-version": APIVersion,
25621	}
25622
25623	preparer := autorest.CreatePreparer(
25624		autorest.AsPost(),
25625		autorest.WithBaseURL(client.BaseURI),
25626		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list", pathParameters),
25627		autorest.WithQueryParameters(queryParameters))
25628	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25629}
25630
25631// ListPublishingCredentialsSlotSender sends the ListPublishingCredentialsSlot request. The method will close the
25632// http.Response Body if it receives an error.
25633func (client AppsClient) ListPublishingCredentialsSlotSender(req *http.Request) (future AppsListPublishingCredentialsSlotFuture, err error) {
25634	var resp *http.Response
25635	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
25636	if err != nil {
25637		return
25638	}
25639	var azf azure.Future
25640	azf, err = azure.NewFutureFromResponse(resp)
25641	future.FutureAPI = &azf
25642	future.Result = future.result
25643	return
25644}
25645
25646// ListPublishingCredentialsSlotResponder handles the response to the ListPublishingCredentialsSlot request. The method always
25647// closes the http.Response Body.
25648func (client AppsClient) ListPublishingCredentialsSlotResponder(resp *http.Response) (result User, err error) {
25649	err = autorest.Respond(
25650		resp,
25651		azure.WithErrorUnlessStatusCode(http.StatusOK),
25652		autorest.ByUnmarshallingJSON(&result),
25653		autorest.ByClosing())
25654	result.Response = autorest.Response{Response: resp}
25655	return
25656}
25657
25658// ListPublishingProfileXMLWithSecrets description for Gets the publishing profile for an app (or deployment slot, if
25659// specified).
25660// Parameters:
25661// resourceGroupName - name of the resource group to which the resource belongs.
25662// name - name of the app.
25663// publishingProfileOptions - specifies publishingProfileOptions for publishing profile. For example, use
25664// {"format": "FileZilla3"} to get a FileZilla publishing profile.
25665func (client AppsClient) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (result ReadCloser, err error) {
25666	if tracing.IsEnabled() {
25667		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingProfileXMLWithSecrets")
25668		defer func() {
25669			sc := -1
25670			if result.Response.Response != nil {
25671				sc = result.Response.Response.StatusCode
25672			}
25673			tracing.EndSpan(ctx, sc, err)
25674		}()
25675	}
25676	if err := validation.Validate([]validation.Validation{
25677		{TargetValue: resourceGroupName,
25678			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25679				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25680				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25681		return result, validation.NewError("web.AppsClient", "ListPublishingProfileXMLWithSecrets", err.Error())
25682	}
25683
25684	req, err := client.ListPublishingProfileXMLWithSecretsPreparer(ctx, resourceGroupName, name, publishingProfileOptions)
25685	if err != nil {
25686		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", nil, "Failure preparing request")
25687		return
25688	}
25689
25690	resp, err := client.ListPublishingProfileXMLWithSecretsSender(req)
25691	if err != nil {
25692		result.Response = autorest.Response{Response: resp}
25693		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", resp, "Failure sending request")
25694		return
25695	}
25696
25697	result, err = client.ListPublishingProfileXMLWithSecretsResponder(resp)
25698	if err != nil {
25699		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", resp, "Failure responding to request")
25700		return
25701	}
25702
25703	return
25704}
25705
25706// ListPublishingProfileXMLWithSecretsPreparer prepares the ListPublishingProfileXMLWithSecrets request.
25707func (client AppsClient) ListPublishingProfileXMLWithSecretsPreparer(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (*http.Request, error) {
25708	pathParameters := map[string]interface{}{
25709		"name":              autorest.Encode("path", name),
25710		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25711		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25712	}
25713
25714	const APIVersion = "2021-01-15"
25715	queryParameters := map[string]interface{}{
25716		"api-version": APIVersion,
25717	}
25718
25719	preparer := autorest.CreatePreparer(
25720		autorest.AsContentType("application/json; charset=utf-8"),
25721		autorest.AsPost(),
25722		autorest.WithBaseURL(client.BaseURI),
25723		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml", pathParameters),
25724		autorest.WithJSON(publishingProfileOptions),
25725		autorest.WithQueryParameters(queryParameters))
25726	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25727}
25728
25729// ListPublishingProfileXMLWithSecretsSender sends the ListPublishingProfileXMLWithSecrets request. The method will close the
25730// http.Response Body if it receives an error.
25731func (client AppsClient) ListPublishingProfileXMLWithSecretsSender(req *http.Request) (*http.Response, error) {
25732	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25733}
25734
25735// ListPublishingProfileXMLWithSecretsResponder handles the response to the ListPublishingProfileXMLWithSecrets request. The method always
25736// closes the http.Response Body.
25737func (client AppsClient) ListPublishingProfileXMLWithSecretsResponder(resp *http.Response) (result ReadCloser, err error) {
25738	result.Value = &resp.Body
25739	err = autorest.Respond(
25740		resp,
25741		azure.WithErrorUnlessStatusCode(http.StatusOK))
25742	result.Response = autorest.Response{Response: resp}
25743	return
25744}
25745
25746// ListPublishingProfileXMLWithSecretsSlot description for Gets the publishing profile for an app (or deployment slot,
25747// if specified).
25748// Parameters:
25749// resourceGroupName - name of the resource group to which the resource belongs.
25750// name - name of the app.
25751// publishingProfileOptions - specifies publishingProfileOptions for publishing profile. For example, use
25752// {"format": "FileZilla3"} to get a FileZilla publishing profile.
25753// slot - name of the deployment slot. If a slot is not specified, the API will get the publishing profile for
25754// the production slot.
25755func (client AppsClient) ListPublishingProfileXMLWithSecretsSlot(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (result ReadCloser, err error) {
25756	if tracing.IsEnabled() {
25757		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingProfileXMLWithSecretsSlot")
25758		defer func() {
25759			sc := -1
25760			if result.Response.Response != nil {
25761				sc = result.Response.Response.StatusCode
25762			}
25763			tracing.EndSpan(ctx, sc, err)
25764		}()
25765	}
25766	if err := validation.Validate([]validation.Validation{
25767		{TargetValue: resourceGroupName,
25768			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25769				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25770				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25771		return result, validation.NewError("web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", err.Error())
25772	}
25773
25774	req, err := client.ListPublishingProfileXMLWithSecretsSlotPreparer(ctx, resourceGroupName, name, publishingProfileOptions, slot)
25775	if err != nil {
25776		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", nil, "Failure preparing request")
25777		return
25778	}
25779
25780	resp, err := client.ListPublishingProfileXMLWithSecretsSlotSender(req)
25781	if err != nil {
25782		result.Response = autorest.Response{Response: resp}
25783		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", resp, "Failure sending request")
25784		return
25785	}
25786
25787	result, err = client.ListPublishingProfileXMLWithSecretsSlotResponder(resp)
25788	if err != nil {
25789		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", resp, "Failure responding to request")
25790		return
25791	}
25792
25793	return
25794}
25795
25796// ListPublishingProfileXMLWithSecretsSlotPreparer prepares the ListPublishingProfileXMLWithSecretsSlot request.
25797func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (*http.Request, error) {
25798	pathParameters := map[string]interface{}{
25799		"name":              autorest.Encode("path", name),
25800		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25801		"slot":              autorest.Encode("path", slot),
25802		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25803	}
25804
25805	const APIVersion = "2021-01-15"
25806	queryParameters := map[string]interface{}{
25807		"api-version": APIVersion,
25808	}
25809
25810	preparer := autorest.CreatePreparer(
25811		autorest.AsContentType("application/json; charset=utf-8"),
25812		autorest.AsPost(),
25813		autorest.WithBaseURL(client.BaseURI),
25814		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml", pathParameters),
25815		autorest.WithJSON(publishingProfileOptions),
25816		autorest.WithQueryParameters(queryParameters))
25817	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25818}
25819
25820// ListPublishingProfileXMLWithSecretsSlotSender sends the ListPublishingProfileXMLWithSecretsSlot request. The method will close the
25821// http.Response Body if it receives an error.
25822func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotSender(req *http.Request) (*http.Response, error) {
25823	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25824}
25825
25826// ListPublishingProfileXMLWithSecretsSlotResponder handles the response to the ListPublishingProfileXMLWithSecretsSlot request. The method always
25827// closes the http.Response Body.
25828func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotResponder(resp *http.Response) (result ReadCloser, err error) {
25829	result.Value = &resp.Body
25830	err = autorest.Respond(
25831		resp,
25832		azure.WithErrorUnlessStatusCode(http.StatusOK))
25833	result.Response = autorest.Response{Response: resp}
25834	return
25835}
25836
25837// ListRelayServiceConnections description for Gets hybrid connections configured for an app (or deployment slot, if
25838// specified).
25839// Parameters:
25840// resourceGroupName - name of the resource group to which the resource belongs.
25841// name - name of the app.
25842func (client AppsClient) ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string) (result RelayServiceConnectionEntity, err error) {
25843	if tracing.IsEnabled() {
25844		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListRelayServiceConnections")
25845		defer func() {
25846			sc := -1
25847			if result.Response.Response != nil {
25848				sc = result.Response.Response.StatusCode
25849			}
25850			tracing.EndSpan(ctx, sc, err)
25851		}()
25852	}
25853	if err := validation.Validate([]validation.Validation{
25854		{TargetValue: resourceGroupName,
25855			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25856				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25857				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25858		return result, validation.NewError("web.AppsClient", "ListRelayServiceConnections", err.Error())
25859	}
25860
25861	req, err := client.ListRelayServiceConnectionsPreparer(ctx, resourceGroupName, name)
25862	if err != nil {
25863		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", nil, "Failure preparing request")
25864		return
25865	}
25866
25867	resp, err := client.ListRelayServiceConnectionsSender(req)
25868	if err != nil {
25869		result.Response = autorest.Response{Response: resp}
25870		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", resp, "Failure sending request")
25871		return
25872	}
25873
25874	result, err = client.ListRelayServiceConnectionsResponder(resp)
25875	if err != nil {
25876		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", resp, "Failure responding to request")
25877		return
25878	}
25879
25880	return
25881}
25882
25883// ListRelayServiceConnectionsPreparer prepares the ListRelayServiceConnections request.
25884func (client AppsClient) ListRelayServiceConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25885	pathParameters := map[string]interface{}{
25886		"name":              autorest.Encode("path", name),
25887		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25888		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25889	}
25890
25891	const APIVersion = "2021-01-15"
25892	queryParameters := map[string]interface{}{
25893		"api-version": APIVersion,
25894	}
25895
25896	preparer := autorest.CreatePreparer(
25897		autorest.AsGet(),
25898		autorest.WithBaseURL(client.BaseURI),
25899		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection", pathParameters),
25900		autorest.WithQueryParameters(queryParameters))
25901	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25902}
25903
25904// ListRelayServiceConnectionsSender sends the ListRelayServiceConnections request. The method will close the
25905// http.Response Body if it receives an error.
25906func (client AppsClient) ListRelayServiceConnectionsSender(req *http.Request) (*http.Response, error) {
25907	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25908}
25909
25910// ListRelayServiceConnectionsResponder handles the response to the ListRelayServiceConnections request. The method always
25911// closes the http.Response Body.
25912func (client AppsClient) ListRelayServiceConnectionsResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
25913	err = autorest.Respond(
25914		resp,
25915		azure.WithErrorUnlessStatusCode(http.StatusOK),
25916		autorest.ByUnmarshallingJSON(&result),
25917		autorest.ByClosing())
25918	result.Response = autorest.Response{Response: resp}
25919	return
25920}
25921
25922// ListRelayServiceConnectionsSlot description for Gets hybrid connections configured for an app (or deployment slot,
25923// if specified).
25924// Parameters:
25925// resourceGroupName - name of the resource group to which the resource belongs.
25926// name - name of the app.
25927// slot - name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the
25928// production slot.
25929func (client AppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result RelayServiceConnectionEntity, err error) {
25930	if tracing.IsEnabled() {
25931		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListRelayServiceConnectionsSlot")
25932		defer func() {
25933			sc := -1
25934			if result.Response.Response != nil {
25935				sc = result.Response.Response.StatusCode
25936			}
25937			tracing.EndSpan(ctx, sc, err)
25938		}()
25939	}
25940	if err := validation.Validate([]validation.Validation{
25941		{TargetValue: resourceGroupName,
25942			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25943				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25944				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25945		return result, validation.NewError("web.AppsClient", "ListRelayServiceConnectionsSlot", err.Error())
25946	}
25947
25948	req, err := client.ListRelayServiceConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
25949	if err != nil {
25950		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", nil, "Failure preparing request")
25951		return
25952	}
25953
25954	resp, err := client.ListRelayServiceConnectionsSlotSender(req)
25955	if err != nil {
25956		result.Response = autorest.Response{Response: resp}
25957		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", resp, "Failure sending request")
25958		return
25959	}
25960
25961	result, err = client.ListRelayServiceConnectionsSlotResponder(resp)
25962	if err != nil {
25963		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", resp, "Failure responding to request")
25964		return
25965	}
25966
25967	return
25968}
25969
25970// ListRelayServiceConnectionsSlotPreparer prepares the ListRelayServiceConnectionsSlot request.
25971func (client AppsClient) ListRelayServiceConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25972	pathParameters := map[string]interface{}{
25973		"name":              autorest.Encode("path", name),
25974		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25975		"slot":              autorest.Encode("path", slot),
25976		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25977	}
25978
25979	const APIVersion = "2021-01-15"
25980	queryParameters := map[string]interface{}{
25981		"api-version": APIVersion,
25982	}
25983
25984	preparer := autorest.CreatePreparer(
25985		autorest.AsGet(),
25986		autorest.WithBaseURL(client.BaseURI),
25987		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection", pathParameters),
25988		autorest.WithQueryParameters(queryParameters))
25989	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25990}
25991
25992// ListRelayServiceConnectionsSlotSender sends the ListRelayServiceConnectionsSlot request. The method will close the
25993// http.Response Body if it receives an error.
25994func (client AppsClient) ListRelayServiceConnectionsSlotSender(req *http.Request) (*http.Response, error) {
25995	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25996}
25997
25998// ListRelayServiceConnectionsSlotResponder handles the response to the ListRelayServiceConnectionsSlot request. The method always
25999// closes the http.Response Body.
26000func (client AppsClient) ListRelayServiceConnectionsSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
26001	err = autorest.Respond(
26002		resp,
26003		azure.WithErrorUnlessStatusCode(http.StatusOK),
26004		autorest.ByUnmarshallingJSON(&result),
26005		autorest.ByClosing())
26006	result.Response = autorest.Response{Response: resp}
26007	return
26008}
26009
26010// ListSiteBackups description for Gets existing backups of an app.
26011// Parameters:
26012// resourceGroupName - name of the resource group to which the resource belongs.
26013// name - name of the app.
26014func (client AppsClient) ListSiteBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) {
26015	if tracing.IsEnabled() {
26016		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackups")
26017		defer func() {
26018			sc := -1
26019			if result.bic.Response.Response != nil {
26020				sc = result.bic.Response.Response.StatusCode
26021			}
26022			tracing.EndSpan(ctx, sc, err)
26023		}()
26024	}
26025	if err := validation.Validate([]validation.Validation{
26026		{TargetValue: resourceGroupName,
26027			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26028				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26029				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26030		return result, validation.NewError("web.AppsClient", "ListSiteBackups", err.Error())
26031	}
26032
26033	result.fn = client.listSiteBackupsNextResults
26034	req, err := client.ListSiteBackupsPreparer(ctx, resourceGroupName, name)
26035	if err != nil {
26036		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackups", nil, "Failure preparing request")
26037		return
26038	}
26039
26040	resp, err := client.ListSiteBackupsSender(req)
26041	if err != nil {
26042		result.bic.Response = autorest.Response{Response: resp}
26043		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackups", resp, "Failure sending request")
26044		return
26045	}
26046
26047	result.bic, err = client.ListSiteBackupsResponder(resp)
26048	if err != nil {
26049		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackups", resp, "Failure responding to request")
26050		return
26051	}
26052	if result.bic.hasNextLink() && result.bic.IsEmpty() {
26053		err = result.NextWithContext(ctx)
26054		return
26055	}
26056
26057	return
26058}
26059
26060// ListSiteBackupsPreparer prepares the ListSiteBackups request.
26061func (client AppsClient) ListSiteBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26062	pathParameters := map[string]interface{}{
26063		"name":              autorest.Encode("path", name),
26064		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26065		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26066	}
26067
26068	const APIVersion = "2021-01-15"
26069	queryParameters := map[string]interface{}{
26070		"api-version": APIVersion,
26071	}
26072
26073	preparer := autorest.CreatePreparer(
26074		autorest.AsPost(),
26075		autorest.WithBaseURL(client.BaseURI),
26076		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups", pathParameters),
26077		autorest.WithQueryParameters(queryParameters))
26078	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26079}
26080
26081// ListSiteBackupsSender sends the ListSiteBackups request. The method will close the
26082// http.Response Body if it receives an error.
26083func (client AppsClient) ListSiteBackupsSender(req *http.Request) (*http.Response, error) {
26084	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26085}
26086
26087// ListSiteBackupsResponder handles the response to the ListSiteBackups request. The method always
26088// closes the http.Response Body.
26089func (client AppsClient) ListSiteBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) {
26090	err = autorest.Respond(
26091		resp,
26092		azure.WithErrorUnlessStatusCode(http.StatusOK),
26093		autorest.ByUnmarshallingJSON(&result),
26094		autorest.ByClosing())
26095	result.Response = autorest.Response{Response: resp}
26096	return
26097}
26098
26099// listSiteBackupsNextResults retrieves the next set of results, if any.
26100func (client AppsClient) listSiteBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
26101	req, err := lastResults.backupItemCollectionPreparer(ctx)
26102	if err != nil {
26103		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsNextResults", nil, "Failure preparing next results request")
26104	}
26105	if req == nil {
26106		return
26107	}
26108	resp, err := client.ListSiteBackupsSender(req)
26109	if err != nil {
26110		result.Response = autorest.Response{Response: resp}
26111		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsNextResults", resp, "Failure sending next results request")
26112	}
26113	result, err = client.ListSiteBackupsResponder(resp)
26114	if err != nil {
26115		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsNextResults", resp, "Failure responding to next results request")
26116	}
26117	return
26118}
26119
26120// ListSiteBackupsComplete enumerates all values, automatically crossing page boundaries as required.
26121func (client AppsClient) ListSiteBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) {
26122	if tracing.IsEnabled() {
26123		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackups")
26124		defer func() {
26125			sc := -1
26126			if result.Response().Response.Response != nil {
26127				sc = result.page.Response().Response.Response.StatusCode
26128			}
26129			tracing.EndSpan(ctx, sc, err)
26130		}()
26131	}
26132	result.page, err = client.ListSiteBackups(ctx, resourceGroupName, name)
26133	return
26134}
26135
26136// ListSiteBackupsSlot description for Gets existing backups of an app.
26137// Parameters:
26138// resourceGroupName - name of the resource group to which the resource belongs.
26139// name - name of the app.
26140// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production
26141// slot.
26142func (client AppsClient) ListSiteBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) {
26143	if tracing.IsEnabled() {
26144		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackupsSlot")
26145		defer func() {
26146			sc := -1
26147			if result.bic.Response.Response != nil {
26148				sc = result.bic.Response.Response.StatusCode
26149			}
26150			tracing.EndSpan(ctx, sc, err)
26151		}()
26152	}
26153	if err := validation.Validate([]validation.Validation{
26154		{TargetValue: resourceGroupName,
26155			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26156				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26157				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26158		return result, validation.NewError("web.AppsClient", "ListSiteBackupsSlot", err.Error())
26159	}
26160
26161	result.fn = client.listSiteBackupsSlotNextResults
26162	req, err := client.ListSiteBackupsSlotPreparer(ctx, resourceGroupName, name, slot)
26163	if err != nil {
26164		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackupsSlot", nil, "Failure preparing request")
26165		return
26166	}
26167
26168	resp, err := client.ListSiteBackupsSlotSender(req)
26169	if err != nil {
26170		result.bic.Response = autorest.Response{Response: resp}
26171		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackupsSlot", resp, "Failure sending request")
26172		return
26173	}
26174
26175	result.bic, err = client.ListSiteBackupsSlotResponder(resp)
26176	if err != nil {
26177		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackupsSlot", resp, "Failure responding to request")
26178		return
26179	}
26180	if result.bic.hasNextLink() && result.bic.IsEmpty() {
26181		err = result.NextWithContext(ctx)
26182		return
26183	}
26184
26185	return
26186}
26187
26188// ListSiteBackupsSlotPreparer prepares the ListSiteBackupsSlot request.
26189func (client AppsClient) ListSiteBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26190	pathParameters := map[string]interface{}{
26191		"name":              autorest.Encode("path", name),
26192		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26193		"slot":              autorest.Encode("path", slot),
26194		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26195	}
26196
26197	const APIVersion = "2021-01-15"
26198	queryParameters := map[string]interface{}{
26199		"api-version": APIVersion,
26200	}
26201
26202	preparer := autorest.CreatePreparer(
26203		autorest.AsPost(),
26204		autorest.WithBaseURL(client.BaseURI),
26205		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups", pathParameters),
26206		autorest.WithQueryParameters(queryParameters))
26207	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26208}
26209
26210// ListSiteBackupsSlotSender sends the ListSiteBackupsSlot request. The method will close the
26211// http.Response Body if it receives an error.
26212func (client AppsClient) ListSiteBackupsSlotSender(req *http.Request) (*http.Response, error) {
26213	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26214}
26215
26216// ListSiteBackupsSlotResponder handles the response to the ListSiteBackupsSlot request. The method always
26217// closes the http.Response Body.
26218func (client AppsClient) ListSiteBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) {
26219	err = autorest.Respond(
26220		resp,
26221		azure.WithErrorUnlessStatusCode(http.StatusOK),
26222		autorest.ByUnmarshallingJSON(&result),
26223		autorest.ByClosing())
26224	result.Response = autorest.Response{Response: resp}
26225	return
26226}
26227
26228// listSiteBackupsSlotNextResults retrieves the next set of results, if any.
26229func (client AppsClient) listSiteBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
26230	req, err := lastResults.backupItemCollectionPreparer(ctx)
26231	if err != nil {
26232		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsSlotNextResults", nil, "Failure preparing next results request")
26233	}
26234	if req == nil {
26235		return
26236	}
26237	resp, err := client.ListSiteBackupsSlotSender(req)
26238	if err != nil {
26239		result.Response = autorest.Response{Response: resp}
26240		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsSlotNextResults", resp, "Failure sending next results request")
26241	}
26242	result, err = client.ListSiteBackupsSlotResponder(resp)
26243	if err != nil {
26244		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsSlotNextResults", resp, "Failure responding to next results request")
26245	}
26246	return
26247}
26248
26249// ListSiteBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required.
26250func (client AppsClient) ListSiteBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) {
26251	if tracing.IsEnabled() {
26252		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackupsSlot")
26253		defer func() {
26254			sc := -1
26255			if result.Response().Response.Response != nil {
26256				sc = result.page.Response().Response.Response.StatusCode
26257			}
26258			tracing.EndSpan(ctx, sc, err)
26259		}()
26260	}
26261	result.page, err = client.ListSiteBackupsSlot(ctx, resourceGroupName, name, slot)
26262	return
26263}
26264
26265// ListSiteExtensions description for Get list of siteextensions for a web site, or a deployment slot.
26266// Parameters:
26267// resourceGroupName - name of the resource group to which the resource belongs.
26268// name - site name.
26269func (client AppsClient) ListSiteExtensions(ctx context.Context, resourceGroupName string, name string) (result SiteExtensionInfoCollectionPage, err error) {
26270	if tracing.IsEnabled() {
26271		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensions")
26272		defer func() {
26273			sc := -1
26274			if result.seic.Response.Response != nil {
26275				sc = result.seic.Response.Response.StatusCode
26276			}
26277			tracing.EndSpan(ctx, sc, err)
26278		}()
26279	}
26280	if err := validation.Validate([]validation.Validation{
26281		{TargetValue: resourceGroupName,
26282			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26283				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26284				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26285		return result, validation.NewError("web.AppsClient", "ListSiteExtensions", err.Error())
26286	}
26287
26288	result.fn = client.listSiteExtensionsNextResults
26289	req, err := client.ListSiteExtensionsPreparer(ctx, resourceGroupName, name)
26290	if err != nil {
26291		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", nil, "Failure preparing request")
26292		return
26293	}
26294
26295	resp, err := client.ListSiteExtensionsSender(req)
26296	if err != nil {
26297		result.seic.Response = autorest.Response{Response: resp}
26298		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure sending request")
26299		return
26300	}
26301
26302	result.seic, err = client.ListSiteExtensionsResponder(resp)
26303	if err != nil {
26304		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure responding to request")
26305		return
26306	}
26307	if result.seic.hasNextLink() && result.seic.IsEmpty() {
26308		err = result.NextWithContext(ctx)
26309		return
26310	}
26311
26312	return
26313}
26314
26315// ListSiteExtensionsPreparer prepares the ListSiteExtensions request.
26316func (client AppsClient) ListSiteExtensionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26317	pathParameters := map[string]interface{}{
26318		"name":              autorest.Encode("path", name),
26319		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26320		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26321	}
26322
26323	const APIVersion = "2021-01-15"
26324	queryParameters := map[string]interface{}{
26325		"api-version": APIVersion,
26326	}
26327
26328	preparer := autorest.CreatePreparer(
26329		autorest.AsGet(),
26330		autorest.WithBaseURL(client.BaseURI),
26331		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions", pathParameters),
26332		autorest.WithQueryParameters(queryParameters))
26333	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26334}
26335
26336// ListSiteExtensionsSender sends the ListSiteExtensions request. The method will close the
26337// http.Response Body if it receives an error.
26338func (client AppsClient) ListSiteExtensionsSender(req *http.Request) (*http.Response, error) {
26339	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26340}
26341
26342// ListSiteExtensionsResponder handles the response to the ListSiteExtensions request. The method always
26343// closes the http.Response Body.
26344func (client AppsClient) ListSiteExtensionsResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) {
26345	err = autorest.Respond(
26346		resp,
26347		azure.WithErrorUnlessStatusCode(http.StatusOK),
26348		autorest.ByUnmarshallingJSON(&result),
26349		autorest.ByClosing())
26350	result.Response = autorest.Response{Response: resp}
26351	return
26352}
26353
26354// listSiteExtensionsNextResults retrieves the next set of results, if any.
26355func (client AppsClient) listSiteExtensionsNextResults(ctx context.Context, lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) {
26356	req, err := lastResults.siteExtensionInfoCollectionPreparer(ctx)
26357	if err != nil {
26358		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", nil, "Failure preparing next results request")
26359	}
26360	if req == nil {
26361		return
26362	}
26363	resp, err := client.ListSiteExtensionsSender(req)
26364	if err != nil {
26365		result.Response = autorest.Response{Response: resp}
26366		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", resp, "Failure sending next results request")
26367	}
26368	result, err = client.ListSiteExtensionsResponder(resp)
26369	if err != nil {
26370		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", resp, "Failure responding to next results request")
26371	}
26372	return
26373}
26374
26375// ListSiteExtensionsComplete enumerates all values, automatically crossing page boundaries as required.
26376func (client AppsClient) ListSiteExtensionsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteExtensionInfoCollectionIterator, err error) {
26377	if tracing.IsEnabled() {
26378		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensions")
26379		defer func() {
26380			sc := -1
26381			if result.Response().Response.Response != nil {
26382				sc = result.page.Response().Response.Response.StatusCode
26383			}
26384			tracing.EndSpan(ctx, sc, err)
26385		}()
26386	}
26387	result.page, err = client.ListSiteExtensions(ctx, resourceGroupName, name)
26388	return
26389}
26390
26391// ListSiteExtensionsSlot description for Get list of siteextensions for a web site, or a deployment slot.
26392// Parameters:
26393// resourceGroupName - name of the resource group to which the resource belongs.
26394// name - site name.
26395// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
26396func (client AppsClient) ListSiteExtensionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollectionPage, err error) {
26397	if tracing.IsEnabled() {
26398		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensionsSlot")
26399		defer func() {
26400			sc := -1
26401			if result.seic.Response.Response != nil {
26402				sc = result.seic.Response.Response.StatusCode
26403			}
26404			tracing.EndSpan(ctx, sc, err)
26405		}()
26406	}
26407	if err := validation.Validate([]validation.Validation{
26408		{TargetValue: resourceGroupName,
26409			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26410				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26411				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26412		return result, validation.NewError("web.AppsClient", "ListSiteExtensionsSlot", err.Error())
26413	}
26414
26415	result.fn = client.listSiteExtensionsSlotNextResults
26416	req, err := client.ListSiteExtensionsSlotPreparer(ctx, resourceGroupName, name, slot)
26417	if err != nil {
26418		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", nil, "Failure preparing request")
26419		return
26420	}
26421
26422	resp, err := client.ListSiteExtensionsSlotSender(req)
26423	if err != nil {
26424		result.seic.Response = autorest.Response{Response: resp}
26425		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure sending request")
26426		return
26427	}
26428
26429	result.seic, err = client.ListSiteExtensionsSlotResponder(resp)
26430	if err != nil {
26431		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure responding to request")
26432		return
26433	}
26434	if result.seic.hasNextLink() && result.seic.IsEmpty() {
26435		err = result.NextWithContext(ctx)
26436		return
26437	}
26438
26439	return
26440}
26441
26442// ListSiteExtensionsSlotPreparer prepares the ListSiteExtensionsSlot request.
26443func (client AppsClient) ListSiteExtensionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26444	pathParameters := map[string]interface{}{
26445		"name":              autorest.Encode("path", name),
26446		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26447		"slot":              autorest.Encode("path", slot),
26448		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26449	}
26450
26451	const APIVersion = "2021-01-15"
26452	queryParameters := map[string]interface{}{
26453		"api-version": APIVersion,
26454	}
26455
26456	preparer := autorest.CreatePreparer(
26457		autorest.AsGet(),
26458		autorest.WithBaseURL(client.BaseURI),
26459		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions", pathParameters),
26460		autorest.WithQueryParameters(queryParameters))
26461	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26462}
26463
26464// ListSiteExtensionsSlotSender sends the ListSiteExtensionsSlot request. The method will close the
26465// http.Response Body if it receives an error.
26466func (client AppsClient) ListSiteExtensionsSlotSender(req *http.Request) (*http.Response, error) {
26467	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26468}
26469
26470// ListSiteExtensionsSlotResponder handles the response to the ListSiteExtensionsSlot request. The method always
26471// closes the http.Response Body.
26472func (client AppsClient) ListSiteExtensionsSlotResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) {
26473	err = autorest.Respond(
26474		resp,
26475		azure.WithErrorUnlessStatusCode(http.StatusOK),
26476		autorest.ByUnmarshallingJSON(&result),
26477		autorest.ByClosing())
26478	result.Response = autorest.Response{Response: resp}
26479	return
26480}
26481
26482// listSiteExtensionsSlotNextResults retrieves the next set of results, if any.
26483func (client AppsClient) listSiteExtensionsSlotNextResults(ctx context.Context, lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) {
26484	req, err := lastResults.siteExtensionInfoCollectionPreparer(ctx)
26485	if err != nil {
26486		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", nil, "Failure preparing next results request")
26487	}
26488	if req == nil {
26489		return
26490	}
26491	resp, err := client.ListSiteExtensionsSlotSender(req)
26492	if err != nil {
26493		result.Response = autorest.Response{Response: resp}
26494		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", resp, "Failure sending next results request")
26495	}
26496	result, err = client.ListSiteExtensionsSlotResponder(resp)
26497	if err != nil {
26498		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", resp, "Failure responding to next results request")
26499	}
26500	return
26501}
26502
26503// ListSiteExtensionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
26504func (client AppsClient) ListSiteExtensionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollectionIterator, err error) {
26505	if tracing.IsEnabled() {
26506		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensionsSlot")
26507		defer func() {
26508			sc := -1
26509			if result.Response().Response.Response != nil {
26510				sc = result.page.Response().Response.Response.StatusCode
26511			}
26512			tracing.EndSpan(ctx, sc, err)
26513		}()
26514	}
26515	result.page, err = client.ListSiteExtensionsSlot(ctx, resourceGroupName, name, slot)
26516	return
26517}
26518
26519// ListSitePushSettings description for Gets the Push settings associated with web app.
26520// Parameters:
26521// resourceGroupName - name of the resource group to which the resource belongs.
26522// name - name of web app.
26523func (client AppsClient) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string) (result PushSettings, err error) {
26524	if tracing.IsEnabled() {
26525		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSitePushSettings")
26526		defer func() {
26527			sc := -1
26528			if result.Response.Response != nil {
26529				sc = result.Response.Response.StatusCode
26530			}
26531			tracing.EndSpan(ctx, sc, err)
26532		}()
26533	}
26534	if err := validation.Validate([]validation.Validation{
26535		{TargetValue: resourceGroupName,
26536			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26537				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26538				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26539		return result, validation.NewError("web.AppsClient", "ListSitePushSettings", err.Error())
26540	}
26541
26542	req, err := client.ListSitePushSettingsPreparer(ctx, resourceGroupName, name)
26543	if err != nil {
26544		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", nil, "Failure preparing request")
26545		return
26546	}
26547
26548	resp, err := client.ListSitePushSettingsSender(req)
26549	if err != nil {
26550		result.Response = autorest.Response{Response: resp}
26551		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", resp, "Failure sending request")
26552		return
26553	}
26554
26555	result, err = client.ListSitePushSettingsResponder(resp)
26556	if err != nil {
26557		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", resp, "Failure responding to request")
26558		return
26559	}
26560
26561	return
26562}
26563
26564// ListSitePushSettingsPreparer prepares the ListSitePushSettings request.
26565func (client AppsClient) ListSitePushSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26566	pathParameters := map[string]interface{}{
26567		"name":              autorest.Encode("path", name),
26568		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26569		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26570	}
26571
26572	const APIVersion = "2021-01-15"
26573	queryParameters := map[string]interface{}{
26574		"api-version": APIVersion,
26575	}
26576
26577	preparer := autorest.CreatePreparer(
26578		autorest.AsPost(),
26579		autorest.WithBaseURL(client.BaseURI),
26580		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list", pathParameters),
26581		autorest.WithQueryParameters(queryParameters))
26582	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26583}
26584
26585// ListSitePushSettingsSender sends the ListSitePushSettings request. The method will close the
26586// http.Response Body if it receives an error.
26587func (client AppsClient) ListSitePushSettingsSender(req *http.Request) (*http.Response, error) {
26588	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26589}
26590
26591// ListSitePushSettingsResponder handles the response to the ListSitePushSettings request. The method always
26592// closes the http.Response Body.
26593func (client AppsClient) ListSitePushSettingsResponder(resp *http.Response) (result PushSettings, err error) {
26594	err = autorest.Respond(
26595		resp,
26596		azure.WithErrorUnlessStatusCode(http.StatusOK),
26597		autorest.ByUnmarshallingJSON(&result),
26598		autorest.ByClosing())
26599	result.Response = autorest.Response{Response: resp}
26600	return
26601}
26602
26603// ListSitePushSettingsSlot description for Gets the Push settings associated with web app.
26604// Parameters:
26605// resourceGroupName - name of the resource group to which the resource belongs.
26606// name - name of web app.
26607// slot - name of web app slot. If not specified then will default to production slot.
26608func (client AppsClient) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PushSettings, err error) {
26609	if tracing.IsEnabled() {
26610		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSitePushSettingsSlot")
26611		defer func() {
26612			sc := -1
26613			if result.Response.Response != nil {
26614				sc = result.Response.Response.StatusCode
26615			}
26616			tracing.EndSpan(ctx, sc, err)
26617		}()
26618	}
26619	if err := validation.Validate([]validation.Validation{
26620		{TargetValue: resourceGroupName,
26621			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26622				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26623				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26624		return result, validation.NewError("web.AppsClient", "ListSitePushSettingsSlot", err.Error())
26625	}
26626
26627	req, err := client.ListSitePushSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
26628	if err != nil {
26629		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", nil, "Failure preparing request")
26630		return
26631	}
26632
26633	resp, err := client.ListSitePushSettingsSlotSender(req)
26634	if err != nil {
26635		result.Response = autorest.Response{Response: resp}
26636		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", resp, "Failure sending request")
26637		return
26638	}
26639
26640	result, err = client.ListSitePushSettingsSlotResponder(resp)
26641	if err != nil {
26642		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", resp, "Failure responding to request")
26643		return
26644	}
26645
26646	return
26647}
26648
26649// ListSitePushSettingsSlotPreparer prepares the ListSitePushSettingsSlot request.
26650func (client AppsClient) ListSitePushSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26651	pathParameters := map[string]interface{}{
26652		"name":              autorest.Encode("path", name),
26653		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26654		"slot":              autorest.Encode("path", slot),
26655		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26656	}
26657
26658	const APIVersion = "2021-01-15"
26659	queryParameters := map[string]interface{}{
26660		"api-version": APIVersion,
26661	}
26662
26663	preparer := autorest.CreatePreparer(
26664		autorest.AsPost(),
26665		autorest.WithBaseURL(client.BaseURI),
26666		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list", pathParameters),
26667		autorest.WithQueryParameters(queryParameters))
26668	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26669}
26670
26671// ListSitePushSettingsSlotSender sends the ListSitePushSettingsSlot request. The method will close the
26672// http.Response Body if it receives an error.
26673func (client AppsClient) ListSitePushSettingsSlotSender(req *http.Request) (*http.Response, error) {
26674	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26675}
26676
26677// ListSitePushSettingsSlotResponder handles the response to the ListSitePushSettingsSlot request. The method always
26678// closes the http.Response Body.
26679func (client AppsClient) ListSitePushSettingsSlotResponder(resp *http.Response) (result PushSettings, err error) {
26680	err = autorest.Respond(
26681		resp,
26682		azure.WithErrorUnlessStatusCode(http.StatusOK),
26683		autorest.ByUnmarshallingJSON(&result),
26684		autorest.ByClosing())
26685	result.Response = autorest.Response{Response: resp}
26686	return
26687}
26688
26689// ListSlotConfigurationNames description for Gets the names of app settings and connection strings that stick to the
26690// slot (not swapped).
26691// Parameters:
26692// resourceGroupName - name of the resource group to which the resource belongs.
26693// name - name of the app.
26694func (client AppsClient) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string) (result SlotConfigNamesResource, err error) {
26695	if tracing.IsEnabled() {
26696		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotConfigurationNames")
26697		defer func() {
26698			sc := -1
26699			if result.Response.Response != nil {
26700				sc = result.Response.Response.StatusCode
26701			}
26702			tracing.EndSpan(ctx, sc, err)
26703		}()
26704	}
26705	if err := validation.Validate([]validation.Validation{
26706		{TargetValue: resourceGroupName,
26707			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26708				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26709				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26710		return result, validation.NewError("web.AppsClient", "ListSlotConfigurationNames", err.Error())
26711	}
26712
26713	req, err := client.ListSlotConfigurationNamesPreparer(ctx, resourceGroupName, name)
26714	if err != nil {
26715		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", nil, "Failure preparing request")
26716		return
26717	}
26718
26719	resp, err := client.ListSlotConfigurationNamesSender(req)
26720	if err != nil {
26721		result.Response = autorest.Response{Response: resp}
26722		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", resp, "Failure sending request")
26723		return
26724	}
26725
26726	result, err = client.ListSlotConfigurationNamesResponder(resp)
26727	if err != nil {
26728		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", resp, "Failure responding to request")
26729		return
26730	}
26731
26732	return
26733}
26734
26735// ListSlotConfigurationNamesPreparer prepares the ListSlotConfigurationNames request.
26736func (client AppsClient) ListSlotConfigurationNamesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26737	pathParameters := map[string]interface{}{
26738		"name":              autorest.Encode("path", name),
26739		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26740		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26741	}
26742
26743	const APIVersion = "2021-01-15"
26744	queryParameters := map[string]interface{}{
26745		"api-version": APIVersion,
26746	}
26747
26748	preparer := autorest.CreatePreparer(
26749		autorest.AsGet(),
26750		autorest.WithBaseURL(client.BaseURI),
26751		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames", pathParameters),
26752		autorest.WithQueryParameters(queryParameters))
26753	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26754}
26755
26756// ListSlotConfigurationNamesSender sends the ListSlotConfigurationNames request. The method will close the
26757// http.Response Body if it receives an error.
26758func (client AppsClient) ListSlotConfigurationNamesSender(req *http.Request) (*http.Response, error) {
26759	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26760}
26761
26762// ListSlotConfigurationNamesResponder handles the response to the ListSlotConfigurationNames request. The method always
26763// closes the http.Response Body.
26764func (client AppsClient) ListSlotConfigurationNamesResponder(resp *http.Response) (result SlotConfigNamesResource, err error) {
26765	err = autorest.Respond(
26766		resp,
26767		azure.WithErrorUnlessStatusCode(http.StatusOK),
26768		autorest.ByUnmarshallingJSON(&result),
26769		autorest.ByClosing())
26770	result.Response = autorest.Response{Response: resp}
26771	return
26772}
26773
26774// ListSlotDifferencesFromProduction description for Get the difference in configuration settings between two web app
26775// slots.
26776// Parameters:
26777// resourceGroupName - name of the resource group to which the resource belongs.
26778// name - name of the app.
26779// slotSwapEntity - JSON object that contains the target slot name. See example.
26780func (client AppsClient) ListSlotDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollectionPage, err error) {
26781	if tracing.IsEnabled() {
26782		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesFromProduction")
26783		defer func() {
26784			sc := -1
26785			if result.sdc.Response.Response != nil {
26786				sc = result.sdc.Response.Response.StatusCode
26787			}
26788			tracing.EndSpan(ctx, sc, err)
26789		}()
26790	}
26791	if err := validation.Validate([]validation.Validation{
26792		{TargetValue: resourceGroupName,
26793			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26794				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26795				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
26796		{TargetValue: slotSwapEntity,
26797			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
26798				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
26799		return result, validation.NewError("web.AppsClient", "ListSlotDifferencesFromProduction", err.Error())
26800	}
26801
26802	result.fn = client.listSlotDifferencesFromProductionNextResults
26803	req, err := client.ListSlotDifferencesFromProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
26804	if err != nil {
26805		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", nil, "Failure preparing request")
26806		return
26807	}
26808
26809	resp, err := client.ListSlotDifferencesFromProductionSender(req)
26810	if err != nil {
26811		result.sdc.Response = autorest.Response{Response: resp}
26812		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", resp, "Failure sending request")
26813		return
26814	}
26815
26816	result.sdc, err = client.ListSlotDifferencesFromProductionResponder(resp)
26817	if err != nil {
26818		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", resp, "Failure responding to request")
26819		return
26820	}
26821	if result.sdc.hasNextLink() && result.sdc.IsEmpty() {
26822		err = result.NextWithContext(ctx)
26823		return
26824	}
26825
26826	return
26827}
26828
26829// ListSlotDifferencesFromProductionPreparer prepares the ListSlotDifferencesFromProduction request.
26830func (client AppsClient) ListSlotDifferencesFromProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
26831	pathParameters := map[string]interface{}{
26832		"name":              autorest.Encode("path", name),
26833		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26834		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26835	}
26836
26837	const APIVersion = "2021-01-15"
26838	queryParameters := map[string]interface{}{
26839		"api-version": APIVersion,
26840	}
26841
26842	preparer := autorest.CreatePreparer(
26843		autorest.AsContentType("application/json; charset=utf-8"),
26844		autorest.AsPost(),
26845		autorest.WithBaseURL(client.BaseURI),
26846		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs", pathParameters),
26847		autorest.WithJSON(slotSwapEntity),
26848		autorest.WithQueryParameters(queryParameters))
26849	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26850}
26851
26852// ListSlotDifferencesFromProductionSender sends the ListSlotDifferencesFromProduction request. The method will close the
26853// http.Response Body if it receives an error.
26854func (client AppsClient) ListSlotDifferencesFromProductionSender(req *http.Request) (*http.Response, error) {
26855	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26856}
26857
26858// ListSlotDifferencesFromProductionResponder handles the response to the ListSlotDifferencesFromProduction request. The method always
26859// closes the http.Response Body.
26860func (client AppsClient) ListSlotDifferencesFromProductionResponder(resp *http.Response) (result SlotDifferenceCollection, err error) {
26861	err = autorest.Respond(
26862		resp,
26863		azure.WithErrorUnlessStatusCode(http.StatusOK),
26864		autorest.ByUnmarshallingJSON(&result),
26865		autorest.ByClosing())
26866	result.Response = autorest.Response{Response: resp}
26867	return
26868}
26869
26870// listSlotDifferencesFromProductionNextResults retrieves the next set of results, if any.
26871func (client AppsClient) listSlotDifferencesFromProductionNextResults(ctx context.Context, lastResults SlotDifferenceCollection) (result SlotDifferenceCollection, err error) {
26872	req, err := lastResults.slotDifferenceCollectionPreparer(ctx)
26873	if err != nil {
26874		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", nil, "Failure preparing next results request")
26875	}
26876	if req == nil {
26877		return
26878	}
26879	resp, err := client.ListSlotDifferencesFromProductionSender(req)
26880	if err != nil {
26881		result.Response = autorest.Response{Response: resp}
26882		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", resp, "Failure sending next results request")
26883	}
26884	result, err = client.ListSlotDifferencesFromProductionResponder(resp)
26885	if err != nil {
26886		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", resp, "Failure responding to next results request")
26887	}
26888	return
26889}
26890
26891// ListSlotDifferencesFromProductionComplete enumerates all values, automatically crossing page boundaries as required.
26892func (client AppsClient) ListSlotDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollectionIterator, err error) {
26893	if tracing.IsEnabled() {
26894		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesFromProduction")
26895		defer func() {
26896			sc := -1
26897			if result.Response().Response.Response != nil {
26898				sc = result.page.Response().Response.Response.StatusCode
26899			}
26900			tracing.EndSpan(ctx, sc, err)
26901		}()
26902	}
26903	result.page, err = client.ListSlotDifferencesFromProduction(ctx, resourceGroupName, name, slotSwapEntity)
26904	return
26905}
26906
26907// ListSlotDifferencesSlot description for Get the difference in configuration settings between two web app slots.
26908// Parameters:
26909// resourceGroupName - name of the resource group to which the resource belongs.
26910// name - name of the app.
26911// slotSwapEntity - JSON object that contains the target slot name. See example.
26912// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
26913func (client AppsClient) ListSlotDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollectionPage, err error) {
26914	if tracing.IsEnabled() {
26915		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesSlot")
26916		defer func() {
26917			sc := -1
26918			if result.sdc.Response.Response != nil {
26919				sc = result.sdc.Response.Response.StatusCode
26920			}
26921			tracing.EndSpan(ctx, sc, err)
26922		}()
26923	}
26924	if err := validation.Validate([]validation.Validation{
26925		{TargetValue: resourceGroupName,
26926			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26927				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26928				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
26929		{TargetValue: slotSwapEntity,
26930			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
26931				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
26932		return result, validation.NewError("web.AppsClient", "ListSlotDifferencesSlot", err.Error())
26933	}
26934
26935	result.fn = client.listSlotDifferencesSlotNextResults
26936	req, err := client.ListSlotDifferencesSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
26937	if err != nil {
26938		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", nil, "Failure preparing request")
26939		return
26940	}
26941
26942	resp, err := client.ListSlotDifferencesSlotSender(req)
26943	if err != nil {
26944		result.sdc.Response = autorest.Response{Response: resp}
26945		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", resp, "Failure sending request")
26946		return
26947	}
26948
26949	result.sdc, err = client.ListSlotDifferencesSlotResponder(resp)
26950	if err != nil {
26951		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", resp, "Failure responding to request")
26952		return
26953	}
26954	if result.sdc.hasNextLink() && result.sdc.IsEmpty() {
26955		err = result.NextWithContext(ctx)
26956		return
26957	}
26958
26959	return
26960}
26961
26962// ListSlotDifferencesSlotPreparer prepares the ListSlotDifferencesSlot request.
26963func (client AppsClient) ListSlotDifferencesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
26964	pathParameters := map[string]interface{}{
26965		"name":              autorest.Encode("path", name),
26966		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26967		"slot":              autorest.Encode("path", slot),
26968		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26969	}
26970
26971	const APIVersion = "2021-01-15"
26972	queryParameters := map[string]interface{}{
26973		"api-version": APIVersion,
26974	}
26975
26976	preparer := autorest.CreatePreparer(
26977		autorest.AsContentType("application/json; charset=utf-8"),
26978		autorest.AsPost(),
26979		autorest.WithBaseURL(client.BaseURI),
26980		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs", pathParameters),
26981		autorest.WithJSON(slotSwapEntity),
26982		autorest.WithQueryParameters(queryParameters))
26983	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26984}
26985
26986// ListSlotDifferencesSlotSender sends the ListSlotDifferencesSlot request. The method will close the
26987// http.Response Body if it receives an error.
26988func (client AppsClient) ListSlotDifferencesSlotSender(req *http.Request) (*http.Response, error) {
26989	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26990}
26991
26992// ListSlotDifferencesSlotResponder handles the response to the ListSlotDifferencesSlot request. The method always
26993// closes the http.Response Body.
26994func (client AppsClient) ListSlotDifferencesSlotResponder(resp *http.Response) (result SlotDifferenceCollection, err error) {
26995	err = autorest.Respond(
26996		resp,
26997		azure.WithErrorUnlessStatusCode(http.StatusOK),
26998		autorest.ByUnmarshallingJSON(&result),
26999		autorest.ByClosing())
27000	result.Response = autorest.Response{Response: resp}
27001	return
27002}
27003
27004// listSlotDifferencesSlotNextResults retrieves the next set of results, if any.
27005func (client AppsClient) listSlotDifferencesSlotNextResults(ctx context.Context, lastResults SlotDifferenceCollection) (result SlotDifferenceCollection, err error) {
27006	req, err := lastResults.slotDifferenceCollectionPreparer(ctx)
27007	if err != nil {
27008		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", nil, "Failure preparing next results request")
27009	}
27010	if req == nil {
27011		return
27012	}
27013	resp, err := client.ListSlotDifferencesSlotSender(req)
27014	if err != nil {
27015		result.Response = autorest.Response{Response: resp}
27016		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", resp, "Failure sending next results request")
27017	}
27018	result, err = client.ListSlotDifferencesSlotResponder(resp)
27019	if err != nil {
27020		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", resp, "Failure responding to next results request")
27021	}
27022	return
27023}
27024
27025// ListSlotDifferencesSlotComplete enumerates all values, automatically crossing page boundaries as required.
27026func (client AppsClient) ListSlotDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollectionIterator, err error) {
27027	if tracing.IsEnabled() {
27028		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesSlot")
27029		defer func() {
27030			sc := -1
27031			if result.Response().Response.Response != nil {
27032				sc = result.page.Response().Response.Response.StatusCode
27033			}
27034			tracing.EndSpan(ctx, sc, err)
27035		}()
27036	}
27037	result.page, err = client.ListSlotDifferencesSlot(ctx, resourceGroupName, name, slotSwapEntity, slot)
27038	return
27039}
27040
27041// ListSlots description for Gets an app's deployment slots.
27042// Parameters:
27043// resourceGroupName - name of the resource group to which the resource belongs.
27044// name - name of the app.
27045func (client AppsClient) ListSlots(ctx context.Context, resourceGroupName string, name string) (result AppCollectionPage, err error) {
27046	if tracing.IsEnabled() {
27047		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlots")
27048		defer func() {
27049			sc := -1
27050			if result.ac.Response.Response != nil {
27051				sc = result.ac.Response.Response.StatusCode
27052			}
27053			tracing.EndSpan(ctx, sc, err)
27054		}()
27055	}
27056	if err := validation.Validate([]validation.Validation{
27057		{TargetValue: resourceGroupName,
27058			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27059				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27060				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27061		return result, validation.NewError("web.AppsClient", "ListSlots", err.Error())
27062	}
27063
27064	result.fn = client.listSlotsNextResults
27065	req, err := client.ListSlotsPreparer(ctx, resourceGroupName, name)
27066	if err != nil {
27067		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", nil, "Failure preparing request")
27068		return
27069	}
27070
27071	resp, err := client.ListSlotsSender(req)
27072	if err != nil {
27073		result.ac.Response = autorest.Response{Response: resp}
27074		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", resp, "Failure sending request")
27075		return
27076	}
27077
27078	result.ac, err = client.ListSlotsResponder(resp)
27079	if err != nil {
27080		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", resp, "Failure responding to request")
27081		return
27082	}
27083	if result.ac.hasNextLink() && result.ac.IsEmpty() {
27084		err = result.NextWithContext(ctx)
27085		return
27086	}
27087
27088	return
27089}
27090
27091// ListSlotsPreparer prepares the ListSlots request.
27092func (client AppsClient) ListSlotsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27093	pathParameters := map[string]interface{}{
27094		"name":              autorest.Encode("path", name),
27095		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27096		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27097	}
27098
27099	const APIVersion = "2021-01-15"
27100	queryParameters := map[string]interface{}{
27101		"api-version": APIVersion,
27102	}
27103
27104	preparer := autorest.CreatePreparer(
27105		autorest.AsGet(),
27106		autorest.WithBaseURL(client.BaseURI),
27107		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots", pathParameters),
27108		autorest.WithQueryParameters(queryParameters))
27109	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27110}
27111
27112// ListSlotsSender sends the ListSlots request. The method will close the
27113// http.Response Body if it receives an error.
27114func (client AppsClient) ListSlotsSender(req *http.Request) (*http.Response, error) {
27115	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27116}
27117
27118// ListSlotsResponder handles the response to the ListSlots request. The method always
27119// closes the http.Response Body.
27120func (client AppsClient) ListSlotsResponder(resp *http.Response) (result AppCollection, err error) {
27121	err = autorest.Respond(
27122		resp,
27123		azure.WithErrorUnlessStatusCode(http.StatusOK),
27124		autorest.ByUnmarshallingJSON(&result),
27125		autorest.ByClosing())
27126	result.Response = autorest.Response{Response: resp}
27127	return
27128}
27129
27130// listSlotsNextResults retrieves the next set of results, if any.
27131func (client AppsClient) listSlotsNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
27132	req, err := lastResults.appCollectionPreparer(ctx)
27133	if err != nil {
27134		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", nil, "Failure preparing next results request")
27135	}
27136	if req == nil {
27137		return
27138	}
27139	resp, err := client.ListSlotsSender(req)
27140	if err != nil {
27141		result.Response = autorest.Response{Response: resp}
27142		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", resp, "Failure sending next results request")
27143	}
27144	result, err = client.ListSlotsResponder(resp)
27145	if err != nil {
27146		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", resp, "Failure responding to next results request")
27147	}
27148	return
27149}
27150
27151// ListSlotsComplete enumerates all values, automatically crossing page boundaries as required.
27152func (client AppsClient) ListSlotsComplete(ctx context.Context, resourceGroupName string, name string) (result AppCollectionIterator, err error) {
27153	if tracing.IsEnabled() {
27154		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlots")
27155		defer func() {
27156			sc := -1
27157			if result.Response().Response.Response != nil {
27158				sc = result.page.Response().Response.Response.StatusCode
27159			}
27160			tracing.EndSpan(ctx, sc, err)
27161		}()
27162	}
27163	result.page, err = client.ListSlots(ctx, resourceGroupName, name)
27164	return
27165}
27166
27167// ListSnapshots description for Returns all Snapshots to the user.
27168// Parameters:
27169// resourceGroupName - name of the resource group to which the resource belongs.
27170// name - website Name.
27171func (client AppsClient) ListSnapshots(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionPage, err error) {
27172	if tracing.IsEnabled() {
27173		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshots")
27174		defer func() {
27175			sc := -1
27176			if result.sc.Response.Response != nil {
27177				sc = result.sc.Response.Response.StatusCode
27178			}
27179			tracing.EndSpan(ctx, sc, err)
27180		}()
27181	}
27182	if err := validation.Validate([]validation.Validation{
27183		{TargetValue: resourceGroupName,
27184			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27185				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27186				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27187		return result, validation.NewError("web.AppsClient", "ListSnapshots", err.Error())
27188	}
27189
27190	result.fn = client.listSnapshotsNextResults
27191	req, err := client.ListSnapshotsPreparer(ctx, resourceGroupName, name)
27192	if err != nil {
27193		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", nil, "Failure preparing request")
27194		return
27195	}
27196
27197	resp, err := client.ListSnapshotsSender(req)
27198	if err != nil {
27199		result.sc.Response = autorest.Response{Response: resp}
27200		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", resp, "Failure sending request")
27201		return
27202	}
27203
27204	result.sc, err = client.ListSnapshotsResponder(resp)
27205	if err != nil {
27206		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", resp, "Failure responding to request")
27207		return
27208	}
27209	if result.sc.hasNextLink() && result.sc.IsEmpty() {
27210		err = result.NextWithContext(ctx)
27211		return
27212	}
27213
27214	return
27215}
27216
27217// ListSnapshotsPreparer prepares the ListSnapshots request.
27218func (client AppsClient) ListSnapshotsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27219	pathParameters := map[string]interface{}{
27220		"name":              autorest.Encode("path", name),
27221		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27222		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27223	}
27224
27225	const APIVersion = "2021-01-15"
27226	queryParameters := map[string]interface{}{
27227		"api-version": APIVersion,
27228	}
27229
27230	preparer := autorest.CreatePreparer(
27231		autorest.AsGet(),
27232		autorest.WithBaseURL(client.BaseURI),
27233		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots", pathParameters),
27234		autorest.WithQueryParameters(queryParameters))
27235	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27236}
27237
27238// ListSnapshotsSender sends the ListSnapshots request. The method will close the
27239// http.Response Body if it receives an error.
27240func (client AppsClient) ListSnapshotsSender(req *http.Request) (*http.Response, error) {
27241	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27242}
27243
27244// ListSnapshotsResponder handles the response to the ListSnapshots request. The method always
27245// closes the http.Response Body.
27246func (client AppsClient) ListSnapshotsResponder(resp *http.Response) (result SnapshotCollection, err error) {
27247	err = autorest.Respond(
27248		resp,
27249		azure.WithErrorUnlessStatusCode(http.StatusOK),
27250		autorest.ByUnmarshallingJSON(&result),
27251		autorest.ByClosing())
27252	result.Response = autorest.Response{Response: resp}
27253	return
27254}
27255
27256// listSnapshotsNextResults retrieves the next set of results, if any.
27257func (client AppsClient) listSnapshotsNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
27258	req, err := lastResults.snapshotCollectionPreparer(ctx)
27259	if err != nil {
27260		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", nil, "Failure preparing next results request")
27261	}
27262	if req == nil {
27263		return
27264	}
27265	resp, err := client.ListSnapshotsSender(req)
27266	if err != nil {
27267		result.Response = autorest.Response{Response: resp}
27268		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", resp, "Failure sending next results request")
27269	}
27270	result, err = client.ListSnapshotsResponder(resp)
27271	if err != nil {
27272		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", resp, "Failure responding to next results request")
27273	}
27274	return
27275}
27276
27277// ListSnapshotsComplete enumerates all values, automatically crossing page boundaries as required.
27278func (client AppsClient) ListSnapshotsComplete(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionIterator, err error) {
27279	if tracing.IsEnabled() {
27280		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshots")
27281		defer func() {
27282			sc := -1
27283			if result.Response().Response.Response != nil {
27284				sc = result.page.Response().Response.Response.StatusCode
27285			}
27286			tracing.EndSpan(ctx, sc, err)
27287		}()
27288	}
27289	result.page, err = client.ListSnapshots(ctx, resourceGroupName, name)
27290	return
27291}
27292
27293// ListSnapshotsFromDRSecondary description for Returns all Snapshots to the user from DRSecondary endpoint.
27294// Parameters:
27295// resourceGroupName - name of the resource group to which the resource belongs.
27296// name - website Name.
27297func (client AppsClient) ListSnapshotsFromDRSecondary(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionPage, err error) {
27298	if tracing.IsEnabled() {
27299		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondary")
27300		defer func() {
27301			sc := -1
27302			if result.sc.Response.Response != nil {
27303				sc = result.sc.Response.Response.StatusCode
27304			}
27305			tracing.EndSpan(ctx, sc, err)
27306		}()
27307	}
27308	if err := validation.Validate([]validation.Validation{
27309		{TargetValue: resourceGroupName,
27310			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27311				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27312				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27313		return result, validation.NewError("web.AppsClient", "ListSnapshotsFromDRSecondary", err.Error())
27314	}
27315
27316	result.fn = client.listSnapshotsFromDRSecondaryNextResults
27317	req, err := client.ListSnapshotsFromDRSecondaryPreparer(ctx, resourceGroupName, name)
27318	if err != nil {
27319		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", nil, "Failure preparing request")
27320		return
27321	}
27322
27323	resp, err := client.ListSnapshotsFromDRSecondarySender(req)
27324	if err != nil {
27325		result.sc.Response = autorest.Response{Response: resp}
27326		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", resp, "Failure sending request")
27327		return
27328	}
27329
27330	result.sc, err = client.ListSnapshotsFromDRSecondaryResponder(resp)
27331	if err != nil {
27332		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", resp, "Failure responding to request")
27333		return
27334	}
27335	if result.sc.hasNextLink() && result.sc.IsEmpty() {
27336		err = result.NextWithContext(ctx)
27337		return
27338	}
27339
27340	return
27341}
27342
27343// ListSnapshotsFromDRSecondaryPreparer prepares the ListSnapshotsFromDRSecondary request.
27344func (client AppsClient) ListSnapshotsFromDRSecondaryPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27345	pathParameters := map[string]interface{}{
27346		"name":              autorest.Encode("path", name),
27347		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27348		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27349	}
27350
27351	const APIVersion = "2021-01-15"
27352	queryParameters := map[string]interface{}{
27353		"api-version": APIVersion,
27354	}
27355
27356	preparer := autorest.CreatePreparer(
27357		autorest.AsGet(),
27358		autorest.WithBaseURL(client.BaseURI),
27359		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr", pathParameters),
27360		autorest.WithQueryParameters(queryParameters))
27361	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27362}
27363
27364// ListSnapshotsFromDRSecondarySender sends the ListSnapshotsFromDRSecondary request. The method will close the
27365// http.Response Body if it receives an error.
27366func (client AppsClient) ListSnapshotsFromDRSecondarySender(req *http.Request) (*http.Response, error) {
27367	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27368}
27369
27370// ListSnapshotsFromDRSecondaryResponder handles the response to the ListSnapshotsFromDRSecondary request. The method always
27371// closes the http.Response Body.
27372func (client AppsClient) ListSnapshotsFromDRSecondaryResponder(resp *http.Response) (result SnapshotCollection, err error) {
27373	err = autorest.Respond(
27374		resp,
27375		azure.WithErrorUnlessStatusCode(http.StatusOK),
27376		autorest.ByUnmarshallingJSON(&result),
27377		autorest.ByClosing())
27378	result.Response = autorest.Response{Response: resp}
27379	return
27380}
27381
27382// listSnapshotsFromDRSecondaryNextResults retrieves the next set of results, if any.
27383func (client AppsClient) listSnapshotsFromDRSecondaryNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
27384	req, err := lastResults.snapshotCollectionPreparer(ctx)
27385	if err != nil {
27386		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", nil, "Failure preparing next results request")
27387	}
27388	if req == nil {
27389		return
27390	}
27391	resp, err := client.ListSnapshotsFromDRSecondarySender(req)
27392	if err != nil {
27393		result.Response = autorest.Response{Response: resp}
27394		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", resp, "Failure sending next results request")
27395	}
27396	result, err = client.ListSnapshotsFromDRSecondaryResponder(resp)
27397	if err != nil {
27398		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", resp, "Failure responding to next results request")
27399	}
27400	return
27401}
27402
27403// ListSnapshotsFromDRSecondaryComplete enumerates all values, automatically crossing page boundaries as required.
27404func (client AppsClient) ListSnapshotsFromDRSecondaryComplete(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionIterator, err error) {
27405	if tracing.IsEnabled() {
27406		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondary")
27407		defer func() {
27408			sc := -1
27409			if result.Response().Response.Response != nil {
27410				sc = result.page.Response().Response.Response.StatusCode
27411			}
27412			tracing.EndSpan(ctx, sc, err)
27413		}()
27414	}
27415	result.page, err = client.ListSnapshotsFromDRSecondary(ctx, resourceGroupName, name)
27416	return
27417}
27418
27419// ListSnapshotsFromDRSecondarySlot description for Returns all Snapshots to the user from DRSecondary endpoint.
27420// Parameters:
27421// resourceGroupName - name of the resource group to which the resource belongs.
27422// name - website Name.
27423// slot - website Slot.
27424func (client AppsClient) ListSnapshotsFromDRSecondarySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionPage, err error) {
27425	if tracing.IsEnabled() {
27426		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondarySlot")
27427		defer func() {
27428			sc := -1
27429			if result.sc.Response.Response != nil {
27430				sc = result.sc.Response.Response.StatusCode
27431			}
27432			tracing.EndSpan(ctx, sc, err)
27433		}()
27434	}
27435	if err := validation.Validate([]validation.Validation{
27436		{TargetValue: resourceGroupName,
27437			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27438				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27439				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27440		return result, validation.NewError("web.AppsClient", "ListSnapshotsFromDRSecondarySlot", err.Error())
27441	}
27442
27443	result.fn = client.listSnapshotsFromDRSecondarySlotNextResults
27444	req, err := client.ListSnapshotsFromDRSecondarySlotPreparer(ctx, resourceGroupName, name, slot)
27445	if err != nil {
27446		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", nil, "Failure preparing request")
27447		return
27448	}
27449
27450	resp, err := client.ListSnapshotsFromDRSecondarySlotSender(req)
27451	if err != nil {
27452		result.sc.Response = autorest.Response{Response: resp}
27453		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", resp, "Failure sending request")
27454		return
27455	}
27456
27457	result.sc, err = client.ListSnapshotsFromDRSecondarySlotResponder(resp)
27458	if err != nil {
27459		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", resp, "Failure responding to request")
27460		return
27461	}
27462	if result.sc.hasNextLink() && result.sc.IsEmpty() {
27463		err = result.NextWithContext(ctx)
27464		return
27465	}
27466
27467	return
27468}
27469
27470// ListSnapshotsFromDRSecondarySlotPreparer prepares the ListSnapshotsFromDRSecondarySlot request.
27471func (client AppsClient) ListSnapshotsFromDRSecondarySlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27472	pathParameters := map[string]interface{}{
27473		"name":              autorest.Encode("path", name),
27474		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27475		"slot":              autorest.Encode("path", slot),
27476		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27477	}
27478
27479	const APIVersion = "2021-01-15"
27480	queryParameters := map[string]interface{}{
27481		"api-version": APIVersion,
27482	}
27483
27484	preparer := autorest.CreatePreparer(
27485		autorest.AsGet(),
27486		autorest.WithBaseURL(client.BaseURI),
27487		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr", pathParameters),
27488		autorest.WithQueryParameters(queryParameters))
27489	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27490}
27491
27492// ListSnapshotsFromDRSecondarySlotSender sends the ListSnapshotsFromDRSecondarySlot request. The method will close the
27493// http.Response Body if it receives an error.
27494func (client AppsClient) ListSnapshotsFromDRSecondarySlotSender(req *http.Request) (*http.Response, error) {
27495	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27496}
27497
27498// ListSnapshotsFromDRSecondarySlotResponder handles the response to the ListSnapshotsFromDRSecondarySlot request. The method always
27499// closes the http.Response Body.
27500func (client AppsClient) ListSnapshotsFromDRSecondarySlotResponder(resp *http.Response) (result SnapshotCollection, err error) {
27501	err = autorest.Respond(
27502		resp,
27503		azure.WithErrorUnlessStatusCode(http.StatusOK),
27504		autorest.ByUnmarshallingJSON(&result),
27505		autorest.ByClosing())
27506	result.Response = autorest.Response{Response: resp}
27507	return
27508}
27509
27510// listSnapshotsFromDRSecondarySlotNextResults retrieves the next set of results, if any.
27511func (client AppsClient) listSnapshotsFromDRSecondarySlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
27512	req, err := lastResults.snapshotCollectionPreparer(ctx)
27513	if err != nil {
27514		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", nil, "Failure preparing next results request")
27515	}
27516	if req == nil {
27517		return
27518	}
27519	resp, err := client.ListSnapshotsFromDRSecondarySlotSender(req)
27520	if err != nil {
27521		result.Response = autorest.Response{Response: resp}
27522		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", resp, "Failure sending next results request")
27523	}
27524	result, err = client.ListSnapshotsFromDRSecondarySlotResponder(resp)
27525	if err != nil {
27526		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", resp, "Failure responding to next results request")
27527	}
27528	return
27529}
27530
27531// ListSnapshotsFromDRSecondarySlotComplete enumerates all values, automatically crossing page boundaries as required.
27532func (client AppsClient) ListSnapshotsFromDRSecondarySlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) {
27533	if tracing.IsEnabled() {
27534		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondarySlot")
27535		defer func() {
27536			sc := -1
27537			if result.Response().Response.Response != nil {
27538				sc = result.page.Response().Response.Response.StatusCode
27539			}
27540			tracing.EndSpan(ctx, sc, err)
27541		}()
27542	}
27543	result.page, err = client.ListSnapshotsFromDRSecondarySlot(ctx, resourceGroupName, name, slot)
27544	return
27545}
27546
27547// ListSnapshotsSlot description for Returns all Snapshots to the user.
27548// Parameters:
27549// resourceGroupName - name of the resource group to which the resource belongs.
27550// name - website Name.
27551// slot - website Slot.
27552func (client AppsClient) ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionPage, err error) {
27553	if tracing.IsEnabled() {
27554		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot")
27555		defer func() {
27556			sc := -1
27557			if result.sc.Response.Response != nil {
27558				sc = result.sc.Response.Response.StatusCode
27559			}
27560			tracing.EndSpan(ctx, sc, err)
27561		}()
27562	}
27563	if err := validation.Validate([]validation.Validation{
27564		{TargetValue: resourceGroupName,
27565			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27566				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27567				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27568		return result, validation.NewError("web.AppsClient", "ListSnapshotsSlot", err.Error())
27569	}
27570
27571	result.fn = client.listSnapshotsSlotNextResults
27572	req, err := client.ListSnapshotsSlotPreparer(ctx, resourceGroupName, name, slot)
27573	if err != nil {
27574		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", nil, "Failure preparing request")
27575		return
27576	}
27577
27578	resp, err := client.ListSnapshotsSlotSender(req)
27579	if err != nil {
27580		result.sc.Response = autorest.Response{Response: resp}
27581		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request")
27582		return
27583	}
27584
27585	result.sc, err = client.ListSnapshotsSlotResponder(resp)
27586	if err != nil {
27587		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request")
27588		return
27589	}
27590	if result.sc.hasNextLink() && result.sc.IsEmpty() {
27591		err = result.NextWithContext(ctx)
27592		return
27593	}
27594
27595	return
27596}
27597
27598// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request.
27599func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27600	pathParameters := map[string]interface{}{
27601		"name":              autorest.Encode("path", name),
27602		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27603		"slot":              autorest.Encode("path", slot),
27604		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27605	}
27606
27607	const APIVersion = "2021-01-15"
27608	queryParameters := map[string]interface{}{
27609		"api-version": APIVersion,
27610	}
27611
27612	preparer := autorest.CreatePreparer(
27613		autorest.AsGet(),
27614		autorest.WithBaseURL(client.BaseURI),
27615		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots", pathParameters),
27616		autorest.WithQueryParameters(queryParameters))
27617	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27618}
27619
27620// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the
27621// http.Response Body if it receives an error.
27622func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) {
27623	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27624}
27625
27626// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always
27627// closes the http.Response Body.
27628func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) {
27629	err = autorest.Respond(
27630		resp,
27631		azure.WithErrorUnlessStatusCode(http.StatusOK),
27632		autorest.ByUnmarshallingJSON(&result),
27633		autorest.ByClosing())
27634	result.Response = autorest.Response{Response: resp}
27635	return
27636}
27637
27638// listSnapshotsSlotNextResults retrieves the next set of results, if any.
27639func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
27640	req, err := lastResults.snapshotCollectionPreparer(ctx)
27641	if err != nil {
27642		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request")
27643	}
27644	if req == nil {
27645		return
27646	}
27647	resp, err := client.ListSnapshotsSlotSender(req)
27648	if err != nil {
27649		result.Response = autorest.Response{Response: resp}
27650		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request")
27651	}
27652	result, err = client.ListSnapshotsSlotResponder(resp)
27653	if err != nil {
27654		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request")
27655	}
27656	return
27657}
27658
27659// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required.
27660func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) {
27661	if tracing.IsEnabled() {
27662		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot")
27663		defer func() {
27664			sc := -1
27665			if result.Response().Response.Response != nil {
27666				sc = result.page.Response().Response.Response.StatusCode
27667			}
27668			tracing.EndSpan(ctx, sc, err)
27669		}()
27670	}
27671	result.page, err = client.ListSnapshotsSlot(ctx, resourceGroupName, name, slot)
27672	return
27673}
27674
27675// ListSyncFunctionTriggers description for This is to allow calling via powershell and ARM template.
27676// Parameters:
27677// resourceGroupName - name of the resource group to which the resource belongs.
27678// name - name of the app.
27679func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) {
27680	if tracing.IsEnabled() {
27681		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers")
27682		defer func() {
27683			sc := -1
27684			if result.Response.Response != nil {
27685				sc = result.Response.Response.StatusCode
27686			}
27687			tracing.EndSpan(ctx, sc, err)
27688		}()
27689	}
27690	if err := validation.Validate([]validation.Validation{
27691		{TargetValue: resourceGroupName,
27692			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27693				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27694				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27695		return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggers", err.Error())
27696	}
27697
27698	req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name)
27699	if err != nil {
27700		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request")
27701		return
27702	}
27703
27704	resp, err := client.ListSyncFunctionTriggersSender(req)
27705	if err != nil {
27706		result.Response = autorest.Response{Response: resp}
27707		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request")
27708		return
27709	}
27710
27711	result, err = client.ListSyncFunctionTriggersResponder(resp)
27712	if err != nil {
27713		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request")
27714		return
27715	}
27716
27717	return
27718}
27719
27720// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request.
27721func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27722	pathParameters := map[string]interface{}{
27723		"name":              autorest.Encode("path", name),
27724		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27725		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27726	}
27727
27728	const APIVersion = "2021-01-15"
27729	queryParameters := map[string]interface{}{
27730		"api-version": APIVersion,
27731	}
27732
27733	preparer := autorest.CreatePreparer(
27734		autorest.AsPost(),
27735		autorest.WithBaseURL(client.BaseURI),
27736		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters),
27737		autorest.WithQueryParameters(queryParameters))
27738	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27739}
27740
27741// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the
27742// http.Response Body if it receives an error.
27743func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) {
27744	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27745}
27746
27747// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always
27748// closes the http.Response Body.
27749func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) {
27750	err = autorest.Respond(
27751		resp,
27752		azure.WithErrorUnlessStatusCode(http.StatusOK),
27753		autorest.ByUnmarshallingJSON(&result),
27754		autorest.ByClosing())
27755	result.Response = autorest.Response{Response: resp}
27756	return
27757}
27758
27759// ListSyncFunctionTriggersSlot description for This is to allow calling via powershell and ARM template.
27760// Parameters:
27761// resourceGroupName - name of the resource group to which the resource belongs.
27762// name - name of the app.
27763// slot - name of the deployment slot.
27764func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) {
27765	if tracing.IsEnabled() {
27766		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot")
27767		defer func() {
27768			sc := -1
27769			if result.Response.Response != nil {
27770				sc = result.Response.Response.StatusCode
27771			}
27772			tracing.EndSpan(ctx, sc, err)
27773		}()
27774	}
27775	if err := validation.Validate([]validation.Validation{
27776		{TargetValue: resourceGroupName,
27777			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27778				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27779				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27780		return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggersSlot", err.Error())
27781	}
27782
27783	req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot)
27784	if err != nil {
27785		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request")
27786		return
27787	}
27788
27789	resp, err := client.ListSyncFunctionTriggersSlotSender(req)
27790	if err != nil {
27791		result.Response = autorest.Response{Response: resp}
27792		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request")
27793		return
27794	}
27795
27796	result, err = client.ListSyncFunctionTriggersSlotResponder(resp)
27797	if err != nil {
27798		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request")
27799		return
27800	}
27801
27802	return
27803}
27804
27805// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request.
27806func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27807	pathParameters := map[string]interface{}{
27808		"name":              autorest.Encode("path", name),
27809		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27810		"slot":              autorest.Encode("path", slot),
27811		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27812	}
27813
27814	const APIVersion = "2021-01-15"
27815	queryParameters := map[string]interface{}{
27816		"api-version": APIVersion,
27817	}
27818
27819	preparer := autorest.CreatePreparer(
27820		autorest.AsPost(),
27821		autorest.WithBaseURL(client.BaseURI),
27822		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters),
27823		autorest.WithQueryParameters(queryParameters))
27824	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27825}
27826
27827// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the
27828// http.Response Body if it receives an error.
27829func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) {
27830	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27831}
27832
27833// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always
27834// closes the http.Response Body.
27835func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) {
27836	err = autorest.Respond(
27837		resp,
27838		azure.WithErrorUnlessStatusCode(http.StatusOK),
27839		autorest.ByUnmarshallingJSON(&result),
27840		autorest.ByClosing())
27841	result.Response = autorest.Response{Response: resp}
27842	return
27843}
27844
27845// ListSyncStatus description for This is to allow calling via powershell and ARM template.
27846// Parameters:
27847// resourceGroupName - name of the resource group to which the resource belongs.
27848// name - name of the app.
27849func (client AppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
27850	if tracing.IsEnabled() {
27851		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatus")
27852		defer func() {
27853			sc := -1
27854			if result.Response != nil {
27855				sc = result.Response.StatusCode
27856			}
27857			tracing.EndSpan(ctx, sc, err)
27858		}()
27859	}
27860	if err := validation.Validate([]validation.Validation{
27861		{TargetValue: resourceGroupName,
27862			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27863				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27864				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27865		return result, validation.NewError("web.AppsClient", "ListSyncStatus", err.Error())
27866	}
27867
27868	req, err := client.ListSyncStatusPreparer(ctx, resourceGroupName, name)
27869	if err != nil {
27870		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", nil, "Failure preparing request")
27871		return
27872	}
27873
27874	resp, err := client.ListSyncStatusSender(req)
27875	if err != nil {
27876		result.Response = resp
27877		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure sending request")
27878		return
27879	}
27880
27881	result, err = client.ListSyncStatusResponder(resp)
27882	if err != nil {
27883		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure responding to request")
27884		return
27885	}
27886
27887	return
27888}
27889
27890// ListSyncStatusPreparer prepares the ListSyncStatus request.
27891func (client AppsClient) ListSyncStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27892	pathParameters := map[string]interface{}{
27893		"name":              autorest.Encode("path", name),
27894		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27895		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27896	}
27897
27898	const APIVersion = "2021-01-15"
27899	queryParameters := map[string]interface{}{
27900		"api-version": APIVersion,
27901	}
27902
27903	preparer := autorest.CreatePreparer(
27904		autorest.AsPost(),
27905		autorest.WithBaseURL(client.BaseURI),
27906		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus", pathParameters),
27907		autorest.WithQueryParameters(queryParameters))
27908	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27909}
27910
27911// ListSyncStatusSender sends the ListSyncStatus request. The method will close the
27912// http.Response Body if it receives an error.
27913func (client AppsClient) ListSyncStatusSender(req *http.Request) (*http.Response, error) {
27914	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27915}
27916
27917// ListSyncStatusResponder handles the response to the ListSyncStatus request. The method always
27918// closes the http.Response Body.
27919func (client AppsClient) ListSyncStatusResponder(resp *http.Response) (result autorest.Response, err error) {
27920	err = autorest.Respond(
27921		resp,
27922		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
27923		autorest.ByClosing())
27924	result.Response = resp
27925	return
27926}
27927
27928// ListSyncStatusSlot description for This is to allow calling via powershell and ARM template.
27929// Parameters:
27930// resourceGroupName - name of the resource group to which the resource belongs.
27931// name - name of the app.
27932// slot - name of the deployment slot.
27933func (client AppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
27934	if tracing.IsEnabled() {
27935		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatusSlot")
27936		defer func() {
27937			sc := -1
27938			if result.Response != nil {
27939				sc = result.Response.StatusCode
27940			}
27941			tracing.EndSpan(ctx, sc, err)
27942		}()
27943	}
27944	if err := validation.Validate([]validation.Validation{
27945		{TargetValue: resourceGroupName,
27946			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27947				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27948				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27949		return result, validation.NewError("web.AppsClient", "ListSyncStatusSlot", err.Error())
27950	}
27951
27952	req, err := client.ListSyncStatusSlotPreparer(ctx, resourceGroupName, name, slot)
27953	if err != nil {
27954		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", nil, "Failure preparing request")
27955		return
27956	}
27957
27958	resp, err := client.ListSyncStatusSlotSender(req)
27959	if err != nil {
27960		result.Response = resp
27961		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure sending request")
27962		return
27963	}
27964
27965	result, err = client.ListSyncStatusSlotResponder(resp)
27966	if err != nil {
27967		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure responding to request")
27968		return
27969	}
27970
27971	return
27972}
27973
27974// ListSyncStatusSlotPreparer prepares the ListSyncStatusSlot request.
27975func (client AppsClient) ListSyncStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27976	pathParameters := map[string]interface{}{
27977		"name":              autorest.Encode("path", name),
27978		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27979		"slot":              autorest.Encode("path", slot),
27980		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27981	}
27982
27983	const APIVersion = "2021-01-15"
27984	queryParameters := map[string]interface{}{
27985		"api-version": APIVersion,
27986	}
27987
27988	preparer := autorest.CreatePreparer(
27989		autorest.AsPost(),
27990		autorest.WithBaseURL(client.BaseURI),
27991		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus", pathParameters),
27992		autorest.WithQueryParameters(queryParameters))
27993	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27994}
27995
27996// ListSyncStatusSlotSender sends the ListSyncStatusSlot request. The method will close the
27997// http.Response Body if it receives an error.
27998func (client AppsClient) ListSyncStatusSlotSender(req *http.Request) (*http.Response, error) {
27999	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28000}
28001
28002// ListSyncStatusSlotResponder handles the response to the ListSyncStatusSlot request. The method always
28003// closes the http.Response Body.
28004func (client AppsClient) ListSyncStatusSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28005	err = autorest.Respond(
28006		resp,
28007		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
28008		autorest.ByClosing())
28009	result.Response = resp
28010	return
28011}
28012
28013// ListTriggeredWebJobHistory description for List a triggered web job's history for an app, or a deployment slot.
28014// Parameters:
28015// resourceGroupName - name of the resource group to which the resource belongs.
28016// name - site name.
28017// webJobName - name of Web Job.
28018func (client AppsClient) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredJobHistoryCollectionPage, err error) {
28019	if tracing.IsEnabled() {
28020		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistory")
28021		defer func() {
28022			sc := -1
28023			if result.tjhc.Response.Response != nil {
28024				sc = result.tjhc.Response.Response.StatusCode
28025			}
28026			tracing.EndSpan(ctx, sc, err)
28027		}()
28028	}
28029	if err := validation.Validate([]validation.Validation{
28030		{TargetValue: resourceGroupName,
28031			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28032				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28033				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28034		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobHistory", err.Error())
28035	}
28036
28037	result.fn = client.listTriggeredWebJobHistoryNextResults
28038	req, err := client.ListTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName)
28039	if err != nil {
28040		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", nil, "Failure preparing request")
28041		return
28042	}
28043
28044	resp, err := client.ListTriggeredWebJobHistorySender(req)
28045	if err != nil {
28046		result.tjhc.Response = autorest.Response{Response: resp}
28047		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure sending request")
28048		return
28049	}
28050
28051	result.tjhc, err = client.ListTriggeredWebJobHistoryResponder(resp)
28052	if err != nil {
28053		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure responding to request")
28054		return
28055	}
28056	if result.tjhc.hasNextLink() && result.tjhc.IsEmpty() {
28057		err = result.NextWithContext(ctx)
28058		return
28059	}
28060
28061	return
28062}
28063
28064// ListTriggeredWebJobHistoryPreparer prepares the ListTriggeredWebJobHistory request.
28065func (client AppsClient) ListTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
28066	pathParameters := map[string]interface{}{
28067		"name":              autorest.Encode("path", name),
28068		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28069		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28070		"webJobName":        autorest.Encode("path", webJobName),
28071	}
28072
28073	const APIVersion = "2021-01-15"
28074	queryParameters := map[string]interface{}{
28075		"api-version": APIVersion,
28076	}
28077
28078	preparer := autorest.CreatePreparer(
28079		autorest.AsGet(),
28080		autorest.WithBaseURL(client.BaseURI),
28081		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history", pathParameters),
28082		autorest.WithQueryParameters(queryParameters))
28083	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28084}
28085
28086// ListTriggeredWebJobHistorySender sends the ListTriggeredWebJobHistory request. The method will close the
28087// http.Response Body if it receives an error.
28088func (client AppsClient) ListTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) {
28089	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28090}
28091
28092// ListTriggeredWebJobHistoryResponder handles the response to the ListTriggeredWebJobHistory request. The method always
28093// closes the http.Response Body.
28094func (client AppsClient) ListTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) {
28095	err = autorest.Respond(
28096		resp,
28097		azure.WithErrorUnlessStatusCode(http.StatusOK),
28098		autorest.ByUnmarshallingJSON(&result),
28099		autorest.ByClosing())
28100	result.Response = autorest.Response{Response: resp}
28101	return
28102}
28103
28104// listTriggeredWebJobHistoryNextResults retrieves the next set of results, if any.
28105func (client AppsClient) listTriggeredWebJobHistoryNextResults(ctx context.Context, lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) {
28106	req, err := lastResults.triggeredJobHistoryCollectionPreparer(ctx)
28107	if err != nil {
28108		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", nil, "Failure preparing next results request")
28109	}
28110	if req == nil {
28111		return
28112	}
28113	resp, err := client.ListTriggeredWebJobHistorySender(req)
28114	if err != nil {
28115		result.Response = autorest.Response{Response: resp}
28116		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", resp, "Failure sending next results request")
28117	}
28118	result, err = client.ListTriggeredWebJobHistoryResponder(resp)
28119	if err != nil {
28120		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", resp, "Failure responding to next results request")
28121	}
28122	return
28123}
28124
28125// ListTriggeredWebJobHistoryComplete enumerates all values, automatically crossing page boundaries as required.
28126func (client AppsClient) ListTriggeredWebJobHistoryComplete(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredJobHistoryCollectionIterator, err error) {
28127	if tracing.IsEnabled() {
28128		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistory")
28129		defer func() {
28130			sc := -1
28131			if result.Response().Response.Response != nil {
28132				sc = result.page.Response().Response.Response.StatusCode
28133			}
28134			tracing.EndSpan(ctx, sc, err)
28135		}()
28136	}
28137	result.page, err = client.ListTriggeredWebJobHistory(ctx, resourceGroupName, name, webJobName)
28138	return
28139}
28140
28141// ListTriggeredWebJobHistorySlot description for List a triggered web job's history for an app, or a deployment slot.
28142// Parameters:
28143// resourceGroupName - name of the resource group to which the resource belongs.
28144// name - site name.
28145// webJobName - name of Web Job.
28146// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
28147func (client AppsClient) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredJobHistoryCollectionPage, err error) {
28148	if tracing.IsEnabled() {
28149		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistorySlot")
28150		defer func() {
28151			sc := -1
28152			if result.tjhc.Response.Response != nil {
28153				sc = result.tjhc.Response.Response.StatusCode
28154			}
28155			tracing.EndSpan(ctx, sc, err)
28156		}()
28157	}
28158	if err := validation.Validate([]validation.Validation{
28159		{TargetValue: resourceGroupName,
28160			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28161				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28162				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28163		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobHistorySlot", err.Error())
28164	}
28165
28166	result.fn = client.listTriggeredWebJobHistorySlotNextResults
28167	req, err := client.ListTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
28168	if err != nil {
28169		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", nil, "Failure preparing request")
28170		return
28171	}
28172
28173	resp, err := client.ListTriggeredWebJobHistorySlotSender(req)
28174	if err != nil {
28175		result.tjhc.Response = autorest.Response{Response: resp}
28176		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure sending request")
28177		return
28178	}
28179
28180	result.tjhc, err = client.ListTriggeredWebJobHistorySlotResponder(resp)
28181	if err != nil {
28182		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure responding to request")
28183		return
28184	}
28185	if result.tjhc.hasNextLink() && result.tjhc.IsEmpty() {
28186		err = result.NextWithContext(ctx)
28187		return
28188	}
28189
28190	return
28191}
28192
28193// ListTriggeredWebJobHistorySlotPreparer prepares the ListTriggeredWebJobHistorySlot request.
28194func (client AppsClient) ListTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
28195	pathParameters := map[string]interface{}{
28196		"name":              autorest.Encode("path", name),
28197		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28198		"slot":              autorest.Encode("path", slot),
28199		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28200		"webJobName":        autorest.Encode("path", webJobName),
28201	}
28202
28203	const APIVersion = "2021-01-15"
28204	queryParameters := map[string]interface{}{
28205		"api-version": APIVersion,
28206	}
28207
28208	preparer := autorest.CreatePreparer(
28209		autorest.AsGet(),
28210		autorest.WithBaseURL(client.BaseURI),
28211		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history", pathParameters),
28212		autorest.WithQueryParameters(queryParameters))
28213	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28214}
28215
28216// ListTriggeredWebJobHistorySlotSender sends the ListTriggeredWebJobHistorySlot request. The method will close the
28217// http.Response Body if it receives an error.
28218func (client AppsClient) ListTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) {
28219	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28220}
28221
28222// ListTriggeredWebJobHistorySlotResponder handles the response to the ListTriggeredWebJobHistorySlot request. The method always
28223// closes the http.Response Body.
28224func (client AppsClient) ListTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) {
28225	err = autorest.Respond(
28226		resp,
28227		azure.WithErrorUnlessStatusCode(http.StatusOK),
28228		autorest.ByUnmarshallingJSON(&result),
28229		autorest.ByClosing())
28230	result.Response = autorest.Response{Response: resp}
28231	return
28232}
28233
28234// listTriggeredWebJobHistorySlotNextResults retrieves the next set of results, if any.
28235func (client AppsClient) listTriggeredWebJobHistorySlotNextResults(ctx context.Context, lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) {
28236	req, err := lastResults.triggeredJobHistoryCollectionPreparer(ctx)
28237	if err != nil {
28238		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", nil, "Failure preparing next results request")
28239	}
28240	if req == nil {
28241		return
28242	}
28243	resp, err := client.ListTriggeredWebJobHistorySlotSender(req)
28244	if err != nil {
28245		result.Response = autorest.Response{Response: resp}
28246		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", resp, "Failure sending next results request")
28247	}
28248	result, err = client.ListTriggeredWebJobHistorySlotResponder(resp)
28249	if err != nil {
28250		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", resp, "Failure responding to next results request")
28251	}
28252	return
28253}
28254
28255// ListTriggeredWebJobHistorySlotComplete enumerates all values, automatically crossing page boundaries as required.
28256func (client AppsClient) ListTriggeredWebJobHistorySlotComplete(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredJobHistoryCollectionIterator, err error) {
28257	if tracing.IsEnabled() {
28258		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistorySlot")
28259		defer func() {
28260			sc := -1
28261			if result.Response().Response.Response != nil {
28262				sc = result.page.Response().Response.Response.StatusCode
28263			}
28264			tracing.EndSpan(ctx, sc, err)
28265		}()
28266	}
28267	result.page, err = client.ListTriggeredWebJobHistorySlot(ctx, resourceGroupName, name, webJobName, slot)
28268	return
28269}
28270
28271// ListTriggeredWebJobs description for List triggered web jobs for an app, or a deployment slot.
28272// Parameters:
28273// resourceGroupName - name of the resource group to which the resource belongs.
28274// name - site name.
28275func (client AppsClient) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result TriggeredWebJobCollectionPage, err error) {
28276	if tracing.IsEnabled() {
28277		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobs")
28278		defer func() {
28279			sc := -1
28280			if result.twjc.Response.Response != nil {
28281				sc = result.twjc.Response.Response.StatusCode
28282			}
28283			tracing.EndSpan(ctx, sc, err)
28284		}()
28285	}
28286	if err := validation.Validate([]validation.Validation{
28287		{TargetValue: resourceGroupName,
28288			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28289				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28290				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28291		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobs", err.Error())
28292	}
28293
28294	result.fn = client.listTriggeredWebJobsNextResults
28295	req, err := client.ListTriggeredWebJobsPreparer(ctx, resourceGroupName, name)
28296	if err != nil {
28297		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", nil, "Failure preparing request")
28298		return
28299	}
28300
28301	resp, err := client.ListTriggeredWebJobsSender(req)
28302	if err != nil {
28303		result.twjc.Response = autorest.Response{Response: resp}
28304		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure sending request")
28305		return
28306	}
28307
28308	result.twjc, err = client.ListTriggeredWebJobsResponder(resp)
28309	if err != nil {
28310		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure responding to request")
28311		return
28312	}
28313	if result.twjc.hasNextLink() && result.twjc.IsEmpty() {
28314		err = result.NextWithContext(ctx)
28315		return
28316	}
28317
28318	return
28319}
28320
28321// ListTriggeredWebJobsPreparer prepares the ListTriggeredWebJobs request.
28322func (client AppsClient) ListTriggeredWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
28323	pathParameters := map[string]interface{}{
28324		"name":              autorest.Encode("path", name),
28325		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28326		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28327	}
28328
28329	const APIVersion = "2021-01-15"
28330	queryParameters := map[string]interface{}{
28331		"api-version": APIVersion,
28332	}
28333
28334	preparer := autorest.CreatePreparer(
28335		autorest.AsGet(),
28336		autorest.WithBaseURL(client.BaseURI),
28337		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs", pathParameters),
28338		autorest.WithQueryParameters(queryParameters))
28339	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28340}
28341
28342// ListTriggeredWebJobsSender sends the ListTriggeredWebJobs request. The method will close the
28343// http.Response Body if it receives an error.
28344func (client AppsClient) ListTriggeredWebJobsSender(req *http.Request) (*http.Response, error) {
28345	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28346}
28347
28348// ListTriggeredWebJobsResponder handles the response to the ListTriggeredWebJobs request. The method always
28349// closes the http.Response Body.
28350func (client AppsClient) ListTriggeredWebJobsResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) {
28351	err = autorest.Respond(
28352		resp,
28353		azure.WithErrorUnlessStatusCode(http.StatusOK),
28354		autorest.ByUnmarshallingJSON(&result),
28355		autorest.ByClosing())
28356	result.Response = autorest.Response{Response: resp}
28357	return
28358}
28359
28360// listTriggeredWebJobsNextResults retrieves the next set of results, if any.
28361func (client AppsClient) listTriggeredWebJobsNextResults(ctx context.Context, lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) {
28362	req, err := lastResults.triggeredWebJobCollectionPreparer(ctx)
28363	if err != nil {
28364		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", nil, "Failure preparing next results request")
28365	}
28366	if req == nil {
28367		return
28368	}
28369	resp, err := client.ListTriggeredWebJobsSender(req)
28370	if err != nil {
28371		result.Response = autorest.Response{Response: resp}
28372		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", resp, "Failure sending next results request")
28373	}
28374	result, err = client.ListTriggeredWebJobsResponder(resp)
28375	if err != nil {
28376		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", resp, "Failure responding to next results request")
28377	}
28378	return
28379}
28380
28381// ListTriggeredWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
28382func (client AppsClient) ListTriggeredWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result TriggeredWebJobCollectionIterator, err error) {
28383	if tracing.IsEnabled() {
28384		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobs")
28385		defer func() {
28386			sc := -1
28387			if result.Response().Response.Response != nil {
28388				sc = result.page.Response().Response.Response.StatusCode
28389			}
28390			tracing.EndSpan(ctx, sc, err)
28391		}()
28392	}
28393	result.page, err = client.ListTriggeredWebJobs(ctx, resourceGroupName, name)
28394	return
28395}
28396
28397// ListTriggeredWebJobsSlot description for List triggered web jobs for an app, or a deployment slot.
28398// Parameters:
28399// resourceGroupName - name of the resource group to which the resource belongs.
28400// name - site name.
28401// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
28402// production slot.
28403func (client AppsClient) ListTriggeredWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result TriggeredWebJobCollectionPage, err error) {
28404	if tracing.IsEnabled() {
28405		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobsSlot")
28406		defer func() {
28407			sc := -1
28408			if result.twjc.Response.Response != nil {
28409				sc = result.twjc.Response.Response.StatusCode
28410			}
28411			tracing.EndSpan(ctx, sc, err)
28412		}()
28413	}
28414	if err := validation.Validate([]validation.Validation{
28415		{TargetValue: resourceGroupName,
28416			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28417				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28418				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28419		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobsSlot", err.Error())
28420	}
28421
28422	result.fn = client.listTriggeredWebJobsSlotNextResults
28423	req, err := client.ListTriggeredWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
28424	if err != nil {
28425		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", nil, "Failure preparing request")
28426		return
28427	}
28428
28429	resp, err := client.ListTriggeredWebJobsSlotSender(req)
28430	if err != nil {
28431		result.twjc.Response = autorest.Response{Response: resp}
28432		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure sending request")
28433		return
28434	}
28435
28436	result.twjc, err = client.ListTriggeredWebJobsSlotResponder(resp)
28437	if err != nil {
28438		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure responding to request")
28439		return
28440	}
28441	if result.twjc.hasNextLink() && result.twjc.IsEmpty() {
28442		err = result.NextWithContext(ctx)
28443		return
28444	}
28445
28446	return
28447}
28448
28449// ListTriggeredWebJobsSlotPreparer prepares the ListTriggeredWebJobsSlot request.
28450func (client AppsClient) ListTriggeredWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
28451	pathParameters := map[string]interface{}{
28452		"name":              autorest.Encode("path", name),
28453		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28454		"slot":              autorest.Encode("path", slot),
28455		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28456	}
28457
28458	const APIVersion = "2021-01-15"
28459	queryParameters := map[string]interface{}{
28460		"api-version": APIVersion,
28461	}
28462
28463	preparer := autorest.CreatePreparer(
28464		autorest.AsGet(),
28465		autorest.WithBaseURL(client.BaseURI),
28466		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs", pathParameters),
28467		autorest.WithQueryParameters(queryParameters))
28468	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28469}
28470
28471// ListTriggeredWebJobsSlotSender sends the ListTriggeredWebJobsSlot request. The method will close the
28472// http.Response Body if it receives an error.
28473func (client AppsClient) ListTriggeredWebJobsSlotSender(req *http.Request) (*http.Response, error) {
28474	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28475}
28476
28477// ListTriggeredWebJobsSlotResponder handles the response to the ListTriggeredWebJobsSlot request. The method always
28478// closes the http.Response Body.
28479func (client AppsClient) ListTriggeredWebJobsSlotResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) {
28480	err = autorest.Respond(
28481		resp,
28482		azure.WithErrorUnlessStatusCode(http.StatusOK),
28483		autorest.ByUnmarshallingJSON(&result),
28484		autorest.ByClosing())
28485	result.Response = autorest.Response{Response: resp}
28486	return
28487}
28488
28489// listTriggeredWebJobsSlotNextResults retrieves the next set of results, if any.
28490func (client AppsClient) listTriggeredWebJobsSlotNextResults(ctx context.Context, lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) {
28491	req, err := lastResults.triggeredWebJobCollectionPreparer(ctx)
28492	if err != nil {
28493		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", nil, "Failure preparing next results request")
28494	}
28495	if req == nil {
28496		return
28497	}
28498	resp, err := client.ListTriggeredWebJobsSlotSender(req)
28499	if err != nil {
28500		result.Response = autorest.Response{Response: resp}
28501		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", resp, "Failure sending next results request")
28502	}
28503	result, err = client.ListTriggeredWebJobsSlotResponder(resp)
28504	if err != nil {
28505		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", resp, "Failure responding to next results request")
28506	}
28507	return
28508}
28509
28510// ListTriggeredWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
28511func (client AppsClient) ListTriggeredWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result TriggeredWebJobCollectionIterator, err error) {
28512	if tracing.IsEnabled() {
28513		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobsSlot")
28514		defer func() {
28515			sc := -1
28516			if result.Response().Response.Response != nil {
28517				sc = result.page.Response().Response.Response.StatusCode
28518			}
28519			tracing.EndSpan(ctx, sc, err)
28520		}()
28521	}
28522	result.page, err = client.ListTriggeredWebJobsSlot(ctx, resourceGroupName, name, slot)
28523	return
28524}
28525
28526// ListUsages description for Gets the quota usage information of an app (or deployment slot, if specified).
28527// Parameters:
28528// resourceGroupName - name of the resource group to which the resource belongs.
28529// name - name of the app.
28530// filter - return only information specified in the filter (using OData syntax). For example:
28531// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and
28532// endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
28533func (client AppsClient) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollectionPage, err error) {
28534	if tracing.IsEnabled() {
28535		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsages")
28536		defer func() {
28537			sc := -1
28538			if result.cuqc.Response.Response != nil {
28539				sc = result.cuqc.Response.Response.StatusCode
28540			}
28541			tracing.EndSpan(ctx, sc, err)
28542		}()
28543	}
28544	if err := validation.Validate([]validation.Validation{
28545		{TargetValue: resourceGroupName,
28546			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28547				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28548				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28549		return result, validation.NewError("web.AppsClient", "ListUsages", err.Error())
28550	}
28551
28552	result.fn = client.listUsagesNextResults
28553	req, err := client.ListUsagesPreparer(ctx, resourceGroupName, name, filter)
28554	if err != nil {
28555		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", nil, "Failure preparing request")
28556		return
28557	}
28558
28559	resp, err := client.ListUsagesSender(req)
28560	if err != nil {
28561		result.cuqc.Response = autorest.Response{Response: resp}
28562		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", resp, "Failure sending request")
28563		return
28564	}
28565
28566	result.cuqc, err = client.ListUsagesResponder(resp)
28567	if err != nil {
28568		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", resp, "Failure responding to request")
28569		return
28570	}
28571	if result.cuqc.hasNextLink() && result.cuqc.IsEmpty() {
28572		err = result.NextWithContext(ctx)
28573		return
28574	}
28575
28576	return
28577}
28578
28579// ListUsagesPreparer prepares the ListUsages request.
28580func (client AppsClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, name string, filter string) (*http.Request, error) {
28581	pathParameters := map[string]interface{}{
28582		"name":              autorest.Encode("path", name),
28583		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28584		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28585	}
28586
28587	const APIVersion = "2021-01-15"
28588	queryParameters := map[string]interface{}{
28589		"api-version": APIVersion,
28590	}
28591	if len(filter) > 0 {
28592		queryParameters["$filter"] = filter
28593	}
28594
28595	preparer := autorest.CreatePreparer(
28596		autorest.AsGet(),
28597		autorest.WithBaseURL(client.BaseURI),
28598		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages", pathParameters),
28599		autorest.WithQueryParameters(queryParameters))
28600	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28601}
28602
28603// ListUsagesSender sends the ListUsages request. The method will close the
28604// http.Response Body if it receives an error.
28605func (client AppsClient) ListUsagesSender(req *http.Request) (*http.Response, error) {
28606	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28607}
28608
28609// ListUsagesResponder handles the response to the ListUsages request. The method always
28610// closes the http.Response Body.
28611func (client AppsClient) ListUsagesResponder(resp *http.Response) (result CsmUsageQuotaCollection, err error) {
28612	err = autorest.Respond(
28613		resp,
28614		azure.WithErrorUnlessStatusCode(http.StatusOK),
28615		autorest.ByUnmarshallingJSON(&result),
28616		autorest.ByClosing())
28617	result.Response = autorest.Response{Response: resp}
28618	return
28619}
28620
28621// listUsagesNextResults retrieves the next set of results, if any.
28622func (client AppsClient) listUsagesNextResults(ctx context.Context, lastResults CsmUsageQuotaCollection) (result CsmUsageQuotaCollection, err error) {
28623	req, err := lastResults.csmUsageQuotaCollectionPreparer(ctx)
28624	if err != nil {
28625		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", nil, "Failure preparing next results request")
28626	}
28627	if req == nil {
28628		return
28629	}
28630	resp, err := client.ListUsagesSender(req)
28631	if err != nil {
28632		result.Response = autorest.Response{Response: resp}
28633		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", resp, "Failure sending next results request")
28634	}
28635	result, err = client.ListUsagesResponder(resp)
28636	if err != nil {
28637		err = autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", resp, "Failure responding to next results request")
28638	}
28639	return
28640}
28641
28642// ListUsagesComplete enumerates all values, automatically crossing page boundaries as required.
28643func (client AppsClient) ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollectionIterator, err error) {
28644	if tracing.IsEnabled() {
28645		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsages")
28646		defer func() {
28647			sc := -1
28648			if result.Response().Response.Response != nil {
28649				sc = result.page.Response().Response.Response.StatusCode
28650			}
28651			tracing.EndSpan(ctx, sc, err)
28652		}()
28653	}
28654	result.page, err = client.ListUsages(ctx, resourceGroupName, name, filter)
28655	return
28656}
28657
28658// ListUsagesSlot description for Gets the quota usage information of an app (or deployment slot, if specified).
28659// Parameters:
28660// resourceGroupName - name of the resource group to which the resource belongs.
28661// name - name of the app.
28662// slot - name of the deployment slot. If a slot is not specified, the API will get quota information of the
28663// production slot.
28664// filter - return only information specified in the filter (using OData syntax). For example:
28665// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and
28666// endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
28667func (client AppsClient) ListUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollectionPage, err error) {
28668	if tracing.IsEnabled() {
28669		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsagesSlot")
28670		defer func() {
28671			sc := -1
28672			if result.cuqc.Response.Response != nil {
28673				sc = result.cuqc.Response.Response.StatusCode
28674			}
28675			tracing.EndSpan(ctx, sc, err)
28676		}()
28677	}
28678	if err := validation.Validate([]validation.Validation{
28679		{TargetValue: resourceGroupName,
28680			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28681				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28682				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28683		return result, validation.NewError("web.AppsClient", "ListUsagesSlot", err.Error())
28684	}
28685
28686	result.fn = client.listUsagesSlotNextResults
28687	req, err := client.ListUsagesSlotPreparer(ctx, resourceGroupName, name, slot, filter)
28688	if err != nil {
28689		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", nil, "Failure preparing request")
28690		return
28691	}
28692
28693	resp, err := client.ListUsagesSlotSender(req)
28694	if err != nil {
28695		result.cuqc.Response = autorest.Response{Response: resp}
28696		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", resp, "Failure sending request")
28697		return
28698	}
28699
28700	result.cuqc, err = client.ListUsagesSlotResponder(resp)
28701	if err != nil {
28702		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", resp, "Failure responding to request")
28703		return
28704	}
28705	if result.cuqc.hasNextLink() && result.cuqc.IsEmpty() {
28706		err = result.NextWithContext(ctx)
28707		return
28708	}
28709
28710	return
28711}
28712
28713// ListUsagesSlotPreparer prepares the ListUsagesSlot request.
28714func (client AppsClient) ListUsagesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (*http.Request, error) {
28715	pathParameters := map[string]interface{}{
28716		"name":              autorest.Encode("path", name),
28717		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28718		"slot":              autorest.Encode("path", slot),
28719		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28720	}
28721
28722	const APIVersion = "2021-01-15"
28723	queryParameters := map[string]interface{}{
28724		"api-version": APIVersion,
28725	}
28726	if len(filter) > 0 {
28727		queryParameters["$filter"] = filter
28728	}
28729
28730	preparer := autorest.CreatePreparer(
28731		autorest.AsGet(),
28732		autorest.WithBaseURL(client.BaseURI),
28733		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages", pathParameters),
28734		autorest.WithQueryParameters(queryParameters))
28735	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28736}
28737
28738// ListUsagesSlotSender sends the ListUsagesSlot request. The method will close the
28739// http.Response Body if it receives an error.
28740func (client AppsClient) ListUsagesSlotSender(req *http.Request) (*http.Response, error) {
28741	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28742}
28743
28744// ListUsagesSlotResponder handles the response to the ListUsagesSlot request. The method always
28745// closes the http.Response Body.
28746func (client AppsClient) ListUsagesSlotResponder(resp *http.Response) (result CsmUsageQuotaCollection, err error) {
28747	err = autorest.Respond(
28748		resp,
28749		azure.WithErrorUnlessStatusCode(http.StatusOK),
28750		autorest.ByUnmarshallingJSON(&result),
28751		autorest.ByClosing())
28752	result.Response = autorest.Response{Response: resp}
28753	return
28754}
28755
28756// listUsagesSlotNextResults retrieves the next set of results, if any.
28757func (client AppsClient) listUsagesSlotNextResults(ctx context.Context, lastResults CsmUsageQuotaCollection) (result CsmUsageQuotaCollection, err error) {
28758	req, err := lastResults.csmUsageQuotaCollectionPreparer(ctx)
28759	if err != nil {
28760		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", nil, "Failure preparing next results request")
28761	}
28762	if req == nil {
28763		return
28764	}
28765	resp, err := client.ListUsagesSlotSender(req)
28766	if err != nil {
28767		result.Response = autorest.Response{Response: resp}
28768		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", resp, "Failure sending next results request")
28769	}
28770	result, err = client.ListUsagesSlotResponder(resp)
28771	if err != nil {
28772		err = autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", resp, "Failure responding to next results request")
28773	}
28774	return
28775}
28776
28777// ListUsagesSlotComplete enumerates all values, automatically crossing page boundaries as required.
28778func (client AppsClient) ListUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollectionIterator, err error) {
28779	if tracing.IsEnabled() {
28780		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsagesSlot")
28781		defer func() {
28782			sc := -1
28783			if result.Response().Response.Response != nil {
28784				sc = result.page.Response().Response.Response.StatusCode
28785			}
28786			tracing.EndSpan(ctx, sc, err)
28787		}()
28788	}
28789	result.page, err = client.ListUsagesSlot(ctx, resourceGroupName, name, slot, filter)
28790	return
28791}
28792
28793// ListVnetConnections description for Gets the virtual networks the app (or deployment slot) is connected to.
28794// Parameters:
28795// resourceGroupName - name of the resource group to which the resource belongs.
28796// name - name of the app.
28797func (client AppsClient) ListVnetConnections(ctx context.Context, resourceGroupName string, name string) (result ListVnetInfo, err error) {
28798	if tracing.IsEnabled() {
28799		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListVnetConnections")
28800		defer func() {
28801			sc := -1
28802			if result.Response.Response != nil {
28803				sc = result.Response.Response.StatusCode
28804			}
28805			tracing.EndSpan(ctx, sc, err)
28806		}()
28807	}
28808	if err := validation.Validate([]validation.Validation{
28809		{TargetValue: resourceGroupName,
28810			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28811				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28812				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28813		return result, validation.NewError("web.AppsClient", "ListVnetConnections", err.Error())
28814	}
28815
28816	req, err := client.ListVnetConnectionsPreparer(ctx, resourceGroupName, name)
28817	if err != nil {
28818		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", nil, "Failure preparing request")
28819		return
28820	}
28821
28822	resp, err := client.ListVnetConnectionsSender(req)
28823	if err != nil {
28824		result.Response = autorest.Response{Response: resp}
28825		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", resp, "Failure sending request")
28826		return
28827	}
28828
28829	result, err = client.ListVnetConnectionsResponder(resp)
28830	if err != nil {
28831		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", resp, "Failure responding to request")
28832		return
28833	}
28834
28835	return
28836}
28837
28838// ListVnetConnectionsPreparer prepares the ListVnetConnections request.
28839func (client AppsClient) ListVnetConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
28840	pathParameters := map[string]interface{}{
28841		"name":              autorest.Encode("path", name),
28842		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28843		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28844	}
28845
28846	const APIVersion = "2021-01-15"
28847	queryParameters := map[string]interface{}{
28848		"api-version": APIVersion,
28849	}
28850
28851	preparer := autorest.CreatePreparer(
28852		autorest.AsGet(),
28853		autorest.WithBaseURL(client.BaseURI),
28854		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections", pathParameters),
28855		autorest.WithQueryParameters(queryParameters))
28856	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28857}
28858
28859// ListVnetConnectionsSender sends the ListVnetConnections request. The method will close the
28860// http.Response Body if it receives an error.
28861func (client AppsClient) ListVnetConnectionsSender(req *http.Request) (*http.Response, error) {
28862	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28863}
28864
28865// ListVnetConnectionsResponder handles the response to the ListVnetConnections request. The method always
28866// closes the http.Response Body.
28867func (client AppsClient) ListVnetConnectionsResponder(resp *http.Response) (result ListVnetInfo, err error) {
28868	err = autorest.Respond(
28869		resp,
28870		azure.WithErrorUnlessStatusCode(http.StatusOK),
28871		autorest.ByUnmarshallingJSON(&result.Value),
28872		autorest.ByClosing())
28873	result.Response = autorest.Response{Response: resp}
28874	return
28875}
28876
28877// ListVnetConnectionsSlot description for Gets the virtual networks the app (or deployment slot) is connected to.
28878// Parameters:
28879// resourceGroupName - name of the resource group to which the resource belongs.
28880// name - name of the app.
28881// slot - name of the deployment slot. If a slot is not specified, the API will get virtual network connections
28882// for the production slot.
28883func (client AppsClient) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ListVnetInfo, err error) {
28884	if tracing.IsEnabled() {
28885		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListVnetConnectionsSlot")
28886		defer func() {
28887			sc := -1
28888			if result.Response.Response != nil {
28889				sc = result.Response.Response.StatusCode
28890			}
28891			tracing.EndSpan(ctx, sc, err)
28892		}()
28893	}
28894	if err := validation.Validate([]validation.Validation{
28895		{TargetValue: resourceGroupName,
28896			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28897				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28898				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28899		return result, validation.NewError("web.AppsClient", "ListVnetConnectionsSlot", err.Error())
28900	}
28901
28902	req, err := client.ListVnetConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
28903	if err != nil {
28904		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", nil, "Failure preparing request")
28905		return
28906	}
28907
28908	resp, err := client.ListVnetConnectionsSlotSender(req)
28909	if err != nil {
28910		result.Response = autorest.Response{Response: resp}
28911		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", resp, "Failure sending request")
28912		return
28913	}
28914
28915	result, err = client.ListVnetConnectionsSlotResponder(resp)
28916	if err != nil {
28917		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", resp, "Failure responding to request")
28918		return
28919	}
28920
28921	return
28922}
28923
28924// ListVnetConnectionsSlotPreparer prepares the ListVnetConnectionsSlot request.
28925func (client AppsClient) ListVnetConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
28926	pathParameters := map[string]interface{}{
28927		"name":              autorest.Encode("path", name),
28928		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28929		"slot":              autorest.Encode("path", slot),
28930		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28931	}
28932
28933	const APIVersion = "2021-01-15"
28934	queryParameters := map[string]interface{}{
28935		"api-version": APIVersion,
28936	}
28937
28938	preparer := autorest.CreatePreparer(
28939		autorest.AsGet(),
28940		autorest.WithBaseURL(client.BaseURI),
28941		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections", pathParameters),
28942		autorest.WithQueryParameters(queryParameters))
28943	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28944}
28945
28946// ListVnetConnectionsSlotSender sends the ListVnetConnectionsSlot request. The method will close the
28947// http.Response Body if it receives an error.
28948func (client AppsClient) ListVnetConnectionsSlotSender(req *http.Request) (*http.Response, error) {
28949	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28950}
28951
28952// ListVnetConnectionsSlotResponder handles the response to the ListVnetConnectionsSlot request. The method always
28953// closes the http.Response Body.
28954func (client AppsClient) ListVnetConnectionsSlotResponder(resp *http.Response) (result ListVnetInfo, err error) {
28955	err = autorest.Respond(
28956		resp,
28957		azure.WithErrorUnlessStatusCode(http.StatusOK),
28958		autorest.ByUnmarshallingJSON(&result.Value),
28959		autorest.ByClosing())
28960	result.Response = autorest.Response{Response: resp}
28961	return
28962}
28963
28964// ListWebJobs description for List webjobs for an app, or a deployment slot.
28965// Parameters:
28966// resourceGroupName - name of the resource group to which the resource belongs.
28967// name - site name.
28968func (client AppsClient) ListWebJobs(ctx context.Context, resourceGroupName string, name string) (result JobCollectionPage, err error) {
28969	if tracing.IsEnabled() {
28970		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobs")
28971		defer func() {
28972			sc := -1
28973			if result.jc.Response.Response != nil {
28974				sc = result.jc.Response.Response.StatusCode
28975			}
28976			tracing.EndSpan(ctx, sc, err)
28977		}()
28978	}
28979	if err := validation.Validate([]validation.Validation{
28980		{TargetValue: resourceGroupName,
28981			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28982				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28983				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28984		return result, validation.NewError("web.AppsClient", "ListWebJobs", err.Error())
28985	}
28986
28987	result.fn = client.listWebJobsNextResults
28988	req, err := client.ListWebJobsPreparer(ctx, resourceGroupName, name)
28989	if err != nil {
28990		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", nil, "Failure preparing request")
28991		return
28992	}
28993
28994	resp, err := client.ListWebJobsSender(req)
28995	if err != nil {
28996		result.jc.Response = autorest.Response{Response: resp}
28997		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure sending request")
28998		return
28999	}
29000
29001	result.jc, err = client.ListWebJobsResponder(resp)
29002	if err != nil {
29003		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure responding to request")
29004		return
29005	}
29006	if result.jc.hasNextLink() && result.jc.IsEmpty() {
29007		err = result.NextWithContext(ctx)
29008		return
29009	}
29010
29011	return
29012}
29013
29014// ListWebJobsPreparer prepares the ListWebJobs request.
29015func (client AppsClient) ListWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
29016	pathParameters := map[string]interface{}{
29017		"name":              autorest.Encode("path", name),
29018		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29019		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29020	}
29021
29022	const APIVersion = "2021-01-15"
29023	queryParameters := map[string]interface{}{
29024		"api-version": APIVersion,
29025	}
29026
29027	preparer := autorest.CreatePreparer(
29028		autorest.AsGet(),
29029		autorest.WithBaseURL(client.BaseURI),
29030		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs", pathParameters),
29031		autorest.WithQueryParameters(queryParameters))
29032	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29033}
29034
29035// ListWebJobsSender sends the ListWebJobs request. The method will close the
29036// http.Response Body if it receives an error.
29037func (client AppsClient) ListWebJobsSender(req *http.Request) (*http.Response, error) {
29038	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29039}
29040
29041// ListWebJobsResponder handles the response to the ListWebJobs request. The method always
29042// closes the http.Response Body.
29043func (client AppsClient) ListWebJobsResponder(resp *http.Response) (result JobCollection, err error) {
29044	err = autorest.Respond(
29045		resp,
29046		azure.WithErrorUnlessStatusCode(http.StatusOK),
29047		autorest.ByUnmarshallingJSON(&result),
29048		autorest.ByClosing())
29049	result.Response = autorest.Response{Response: resp}
29050	return
29051}
29052
29053// listWebJobsNextResults retrieves the next set of results, if any.
29054func (client AppsClient) listWebJobsNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) {
29055	req, err := lastResults.jobCollectionPreparer(ctx)
29056	if err != nil {
29057		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", nil, "Failure preparing next results request")
29058	}
29059	if req == nil {
29060		return
29061	}
29062	resp, err := client.ListWebJobsSender(req)
29063	if err != nil {
29064		result.Response = autorest.Response{Response: resp}
29065		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", resp, "Failure sending next results request")
29066	}
29067	result, err = client.ListWebJobsResponder(resp)
29068	if err != nil {
29069		err = autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", resp, "Failure responding to next results request")
29070	}
29071	return
29072}
29073
29074// ListWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
29075func (client AppsClient) ListWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result JobCollectionIterator, err error) {
29076	if tracing.IsEnabled() {
29077		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobs")
29078		defer func() {
29079			sc := -1
29080			if result.Response().Response.Response != nil {
29081				sc = result.page.Response().Response.Response.StatusCode
29082			}
29083			tracing.EndSpan(ctx, sc, err)
29084		}()
29085	}
29086	result.page, err = client.ListWebJobs(ctx, resourceGroupName, name)
29087	return
29088}
29089
29090// ListWebJobsSlot description for List webjobs for an app, or a deployment slot.
29091// Parameters:
29092// resourceGroupName - name of the resource group to which the resource belongs.
29093// name - site name.
29094// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
29095// production slot.
29096func (client AppsClient) ListWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result JobCollectionPage, err error) {
29097	if tracing.IsEnabled() {
29098		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobsSlot")
29099		defer func() {
29100			sc := -1
29101			if result.jc.Response.Response != nil {
29102				sc = result.jc.Response.Response.StatusCode
29103			}
29104			tracing.EndSpan(ctx, sc, err)
29105		}()
29106	}
29107	if err := validation.Validate([]validation.Validation{
29108		{TargetValue: resourceGroupName,
29109			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29110				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29111				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29112		return result, validation.NewError("web.AppsClient", "ListWebJobsSlot", err.Error())
29113	}
29114
29115	result.fn = client.listWebJobsSlotNextResults
29116	req, err := client.ListWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
29117	if err != nil {
29118		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", nil, "Failure preparing request")
29119		return
29120	}
29121
29122	resp, err := client.ListWebJobsSlotSender(req)
29123	if err != nil {
29124		result.jc.Response = autorest.Response{Response: resp}
29125		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure sending request")
29126		return
29127	}
29128
29129	result.jc, err = client.ListWebJobsSlotResponder(resp)
29130	if err != nil {
29131		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure responding to request")
29132		return
29133	}
29134	if result.jc.hasNextLink() && result.jc.IsEmpty() {
29135		err = result.NextWithContext(ctx)
29136		return
29137	}
29138
29139	return
29140}
29141
29142// ListWebJobsSlotPreparer prepares the ListWebJobsSlot request.
29143func (client AppsClient) ListWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
29144	pathParameters := map[string]interface{}{
29145		"name":              autorest.Encode("path", name),
29146		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29147		"slot":              autorest.Encode("path", slot),
29148		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29149	}
29150
29151	const APIVersion = "2021-01-15"
29152	queryParameters := map[string]interface{}{
29153		"api-version": APIVersion,
29154	}
29155
29156	preparer := autorest.CreatePreparer(
29157		autorest.AsGet(),
29158		autorest.WithBaseURL(client.BaseURI),
29159		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs", pathParameters),
29160		autorest.WithQueryParameters(queryParameters))
29161	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29162}
29163
29164// ListWebJobsSlotSender sends the ListWebJobsSlot request. The method will close the
29165// http.Response Body if it receives an error.
29166func (client AppsClient) ListWebJobsSlotSender(req *http.Request) (*http.Response, error) {
29167	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29168}
29169
29170// ListWebJobsSlotResponder handles the response to the ListWebJobsSlot request. The method always
29171// closes the http.Response Body.
29172func (client AppsClient) ListWebJobsSlotResponder(resp *http.Response) (result JobCollection, err error) {
29173	err = autorest.Respond(
29174		resp,
29175		azure.WithErrorUnlessStatusCode(http.StatusOK),
29176		autorest.ByUnmarshallingJSON(&result),
29177		autorest.ByClosing())
29178	result.Response = autorest.Response{Response: resp}
29179	return
29180}
29181
29182// listWebJobsSlotNextResults retrieves the next set of results, if any.
29183func (client AppsClient) listWebJobsSlotNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) {
29184	req, err := lastResults.jobCollectionPreparer(ctx)
29185	if err != nil {
29186		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", nil, "Failure preparing next results request")
29187	}
29188	if req == nil {
29189		return
29190	}
29191	resp, err := client.ListWebJobsSlotSender(req)
29192	if err != nil {
29193		result.Response = autorest.Response{Response: resp}
29194		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", resp, "Failure sending next results request")
29195	}
29196	result, err = client.ListWebJobsSlotResponder(resp)
29197	if err != nil {
29198		err = autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", resp, "Failure responding to next results request")
29199	}
29200	return
29201}
29202
29203// ListWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
29204func (client AppsClient) ListWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result JobCollectionIterator, err error) {
29205	if tracing.IsEnabled() {
29206		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobsSlot")
29207		defer func() {
29208			sc := -1
29209			if result.Response().Response.Response != nil {
29210				sc = result.page.Response().Response.Response.StatusCode
29211			}
29212			tracing.EndSpan(ctx, sc, err)
29213		}()
29214	}
29215	result.page, err = client.ListWebJobsSlot(ctx, resourceGroupName, name, slot)
29216	return
29217}
29218
29219// MigrateMySQL description for Migrates a local (in-app) MySql database to a remote MySql database.
29220// Parameters:
29221// resourceGroupName - name of the resource group to which the resource belongs.
29222// name - name of web app.
29223// migrationRequestEnvelope - mySql migration options.
29224func (client AppsClient) MigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest) (result AppsMigrateMySQLFuture, err error) {
29225	if tracing.IsEnabled() {
29226		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.MigrateMySQL")
29227		defer func() {
29228			sc := -1
29229			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29230				sc = result.FutureAPI.Response().StatusCode
29231			}
29232			tracing.EndSpan(ctx, sc, err)
29233		}()
29234	}
29235	if err := validation.Validate([]validation.Validation{
29236		{TargetValue: resourceGroupName,
29237			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29238				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29239				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29240		{TargetValue: migrationRequestEnvelope,
29241			Constraints: []validation.Constraint{{Target: "migrationRequestEnvelope.MigrateMySQLRequestProperties", Name: validation.Null, Rule: false,
29242				Chain: []validation.Constraint{{Target: "migrationRequestEnvelope.MigrateMySQLRequestProperties.ConnectionString", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
29243		return result, validation.NewError("web.AppsClient", "MigrateMySQL", err.Error())
29244	}
29245
29246	req, err := client.MigrateMySQLPreparer(ctx, resourceGroupName, name, migrationRequestEnvelope)
29247	if err != nil {
29248		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateMySQL", nil, "Failure preparing request")
29249		return
29250	}
29251
29252	result, err = client.MigrateMySQLSender(req)
29253	if err != nil {
29254		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateMySQL", nil, "Failure sending request")
29255		return
29256	}
29257
29258	return
29259}
29260
29261// MigrateMySQLPreparer prepares the MigrateMySQL request.
29262func (client AppsClient) MigrateMySQLPreparer(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest) (*http.Request, error) {
29263	pathParameters := map[string]interface{}{
29264		"name":              autorest.Encode("path", name),
29265		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29266		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29267	}
29268
29269	const APIVersion = "2021-01-15"
29270	queryParameters := map[string]interface{}{
29271		"api-version": APIVersion,
29272	}
29273
29274	preparer := autorest.CreatePreparer(
29275		autorest.AsContentType("application/json; charset=utf-8"),
29276		autorest.AsPost(),
29277		autorest.WithBaseURL(client.BaseURI),
29278		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql", pathParameters),
29279		autorest.WithJSON(migrationRequestEnvelope),
29280		autorest.WithQueryParameters(queryParameters))
29281	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29282}
29283
29284// MigrateMySQLSender sends the MigrateMySQL request. The method will close the
29285// http.Response Body if it receives an error.
29286func (client AppsClient) MigrateMySQLSender(req *http.Request) (future AppsMigrateMySQLFuture, err error) {
29287	var resp *http.Response
29288	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29289	if err != nil {
29290		return
29291	}
29292	var azf azure.Future
29293	azf, err = azure.NewFutureFromResponse(resp)
29294	future.FutureAPI = &azf
29295	future.Result = future.result
29296	return
29297}
29298
29299// MigrateMySQLResponder handles the response to the MigrateMySQL request. The method always
29300// closes the http.Response Body.
29301func (client AppsClient) MigrateMySQLResponder(resp *http.Response) (result Operation, err error) {
29302	err = autorest.Respond(
29303		resp,
29304		azure.WithErrorUnlessStatusCode(http.StatusOK),
29305		autorest.ByUnmarshallingJSON(&result),
29306		autorest.ByClosing())
29307	result.Response = autorest.Response{Response: resp}
29308	return
29309}
29310
29311// MigrateStorage description for Restores a web app.
29312// Parameters:
29313// subscriptionName - azure subscription.
29314// resourceGroupName - name of the resource group to which the resource belongs.
29315// name - name of web app.
29316// migrationOptions - migration migrationOptions.
29317func (client AppsClient) MigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions) (result AppsMigrateStorageFuture, err error) {
29318	if tracing.IsEnabled() {
29319		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.MigrateStorage")
29320		defer func() {
29321			sc := -1
29322			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29323				sc = result.FutureAPI.Response().StatusCode
29324			}
29325			tracing.EndSpan(ctx, sc, err)
29326		}()
29327	}
29328	if err := validation.Validate([]validation.Validation{
29329		{TargetValue: resourceGroupName,
29330			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29331				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29332				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29333		{TargetValue: migrationOptions,
29334			Constraints: []validation.Constraint{{Target: "migrationOptions.StorageMigrationOptionsProperties", Name: validation.Null, Rule: false,
29335				Chain: []validation.Constraint{{Target: "migrationOptions.StorageMigrationOptionsProperties.AzurefilesConnectionString", Name: validation.Null, Rule: true, Chain: nil},
29336					{Target: "migrationOptions.StorageMigrationOptionsProperties.AzurefilesShare", Name: validation.Null, Rule: true, Chain: nil},
29337				}}}}}); err != nil {
29338		return result, validation.NewError("web.AppsClient", "MigrateStorage", err.Error())
29339	}
29340
29341	req, err := client.MigrateStoragePreparer(ctx, subscriptionName, resourceGroupName, name, migrationOptions)
29342	if err != nil {
29343		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateStorage", nil, "Failure preparing request")
29344		return
29345	}
29346
29347	result, err = client.MigrateStorageSender(req)
29348	if err != nil {
29349		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateStorage", nil, "Failure sending request")
29350		return
29351	}
29352
29353	return
29354}
29355
29356// MigrateStoragePreparer prepares the MigrateStorage request.
29357func (client AppsClient) MigrateStoragePreparer(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions) (*http.Request, error) {
29358	pathParameters := map[string]interface{}{
29359		"name":              autorest.Encode("path", name),
29360		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29361		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29362	}
29363
29364	const APIVersion = "2021-01-15"
29365	queryParameters := map[string]interface{}{
29366		"api-version":      APIVersion,
29367		"subscriptionName": autorest.Encode("query", subscriptionName),
29368	}
29369
29370	preparer := autorest.CreatePreparer(
29371		autorest.AsContentType("application/json; charset=utf-8"),
29372		autorest.AsPut(),
29373		autorest.WithBaseURL(client.BaseURI),
29374		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate", pathParameters),
29375		autorest.WithJSON(migrationOptions),
29376		autorest.WithQueryParameters(queryParameters))
29377	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29378}
29379
29380// MigrateStorageSender sends the MigrateStorage request. The method will close the
29381// http.Response Body if it receives an error.
29382func (client AppsClient) MigrateStorageSender(req *http.Request) (future AppsMigrateStorageFuture, 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// MigrateStorageResponder handles the response to the MigrateStorage request. The method always
29396// closes the http.Response Body.
29397func (client AppsClient) MigrateStorageResponder(resp *http.Response) (result StorageMigrationResponse, err error) {
29398	err = autorest.Respond(
29399		resp,
29400		azure.WithErrorUnlessStatusCode(http.StatusOK),
29401		autorest.ByUnmarshallingJSON(&result),
29402		autorest.ByClosing())
29403	result.Response = autorest.Response{Response: resp}
29404	return
29405}
29406
29407// PutPrivateAccessVnet description for Sets data around private site access enablement and authorized Virtual Networks
29408// that can access the site.
29409// Parameters:
29410// resourceGroupName - name of the resource group to which the resource belongs.
29411// name - the name of the web app.
29412// access - the information for the private access
29413func (client AppsClient) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access PrivateAccess) (result PrivateAccess, err error) {
29414	if tracing.IsEnabled() {
29415		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PutPrivateAccessVnet")
29416		defer func() {
29417			sc := -1
29418			if result.Response.Response != nil {
29419				sc = result.Response.Response.StatusCode
29420			}
29421			tracing.EndSpan(ctx, sc, err)
29422		}()
29423	}
29424	if err := validation.Validate([]validation.Validation{
29425		{TargetValue: resourceGroupName,
29426			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29427				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29428				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29429		return result, validation.NewError("web.AppsClient", "PutPrivateAccessVnet", err.Error())
29430	}
29431
29432	req, err := client.PutPrivateAccessVnetPreparer(ctx, resourceGroupName, name, access)
29433	if err != nil {
29434		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", nil, "Failure preparing request")
29435		return
29436	}
29437
29438	resp, err := client.PutPrivateAccessVnetSender(req)
29439	if err != nil {
29440		result.Response = autorest.Response{Response: resp}
29441		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", resp, "Failure sending request")
29442		return
29443	}
29444
29445	result, err = client.PutPrivateAccessVnetResponder(resp)
29446	if err != nil {
29447		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", resp, "Failure responding to request")
29448		return
29449	}
29450
29451	return
29452}
29453
29454// PutPrivateAccessVnetPreparer prepares the PutPrivateAccessVnet request.
29455func (client AppsClient) PutPrivateAccessVnetPreparer(ctx context.Context, resourceGroupName string, name string, access PrivateAccess) (*http.Request, error) {
29456	pathParameters := map[string]interface{}{
29457		"name":              autorest.Encode("path", name),
29458		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29459		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29460	}
29461
29462	const APIVersion = "2021-01-15"
29463	queryParameters := map[string]interface{}{
29464		"api-version": APIVersion,
29465	}
29466
29467	preparer := autorest.CreatePreparer(
29468		autorest.AsContentType("application/json; charset=utf-8"),
29469		autorest.AsPut(),
29470		autorest.WithBaseURL(client.BaseURI),
29471		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters),
29472		autorest.WithJSON(access),
29473		autorest.WithQueryParameters(queryParameters))
29474	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29475}
29476
29477// PutPrivateAccessVnetSender sends the PutPrivateAccessVnet request. The method will close the
29478// http.Response Body if it receives an error.
29479func (client AppsClient) PutPrivateAccessVnetSender(req *http.Request) (*http.Response, error) {
29480	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29481}
29482
29483// PutPrivateAccessVnetResponder handles the response to the PutPrivateAccessVnet request. The method always
29484// closes the http.Response Body.
29485func (client AppsClient) PutPrivateAccessVnetResponder(resp *http.Response) (result PrivateAccess, err error) {
29486	err = autorest.Respond(
29487		resp,
29488		azure.WithErrorUnlessStatusCode(http.StatusOK),
29489		autorest.ByUnmarshallingJSON(&result),
29490		autorest.ByClosing())
29491	result.Response = autorest.Response{Response: resp}
29492	return
29493}
29494
29495// PutPrivateAccessVnetSlot description for Sets data around private site access enablement and authorized Virtual
29496// Networks that can access the site.
29497// Parameters:
29498// resourceGroupName - name of the resource group to which the resource belongs.
29499// name - the name of the web app.
29500// access - the information for the private access
29501// slot - the name of the slot for the web app.
29502func (client AppsClient) PutPrivateAccessVnetSlot(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, slot string) (result PrivateAccess, err error) {
29503	if tracing.IsEnabled() {
29504		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PutPrivateAccessVnetSlot")
29505		defer func() {
29506			sc := -1
29507			if result.Response.Response != nil {
29508				sc = result.Response.Response.StatusCode
29509			}
29510			tracing.EndSpan(ctx, sc, err)
29511		}()
29512	}
29513	if err := validation.Validate([]validation.Validation{
29514		{TargetValue: resourceGroupName,
29515			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29516				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29517				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29518		return result, validation.NewError("web.AppsClient", "PutPrivateAccessVnetSlot", err.Error())
29519	}
29520
29521	req, err := client.PutPrivateAccessVnetSlotPreparer(ctx, resourceGroupName, name, access, slot)
29522	if err != nil {
29523		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", nil, "Failure preparing request")
29524		return
29525	}
29526
29527	resp, err := client.PutPrivateAccessVnetSlotSender(req)
29528	if err != nil {
29529		result.Response = autorest.Response{Response: resp}
29530		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", resp, "Failure sending request")
29531		return
29532	}
29533
29534	result, err = client.PutPrivateAccessVnetSlotResponder(resp)
29535	if err != nil {
29536		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", resp, "Failure responding to request")
29537		return
29538	}
29539
29540	return
29541}
29542
29543// PutPrivateAccessVnetSlotPreparer prepares the PutPrivateAccessVnetSlot request.
29544func (client AppsClient) PutPrivateAccessVnetSlotPreparer(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, slot string) (*http.Request, error) {
29545	pathParameters := map[string]interface{}{
29546		"name":              autorest.Encode("path", name),
29547		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29548		"slot":              autorest.Encode("path", slot),
29549		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29550	}
29551
29552	const APIVersion = "2021-01-15"
29553	queryParameters := map[string]interface{}{
29554		"api-version": APIVersion,
29555	}
29556
29557	preparer := autorest.CreatePreparer(
29558		autorest.AsContentType("application/json; charset=utf-8"),
29559		autorest.AsPut(),
29560		autorest.WithBaseURL(client.BaseURI),
29561		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters),
29562		autorest.WithJSON(access),
29563		autorest.WithQueryParameters(queryParameters))
29564	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29565}
29566
29567// PutPrivateAccessVnetSlotSender sends the PutPrivateAccessVnetSlot request. The method will close the
29568// http.Response Body if it receives an error.
29569func (client AppsClient) PutPrivateAccessVnetSlotSender(req *http.Request) (*http.Response, error) {
29570	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29571}
29572
29573// PutPrivateAccessVnetSlotResponder handles the response to the PutPrivateAccessVnetSlot request. The method always
29574// closes the http.Response Body.
29575func (client AppsClient) PutPrivateAccessVnetSlotResponder(resp *http.Response) (result PrivateAccess, err error) {
29576	err = autorest.Respond(
29577		resp,
29578		azure.WithErrorUnlessStatusCode(http.StatusOK),
29579		autorest.ByUnmarshallingJSON(&result),
29580		autorest.ByClosing())
29581	result.Response = autorest.Response{Response: resp}
29582	return
29583}
29584
29585// RecoverSiteConfigurationSnapshot description for Reverts the configuration of an app to a previous snapshot.
29586// Parameters:
29587// resourceGroupName - name of the resource group to which the resource belongs.
29588// name - name of the app.
29589// snapshotID - the ID of the snapshot to read.
29590func (client AppsClient) RecoverSiteConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result autorest.Response, err error) {
29591	if tracing.IsEnabled() {
29592		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RecoverSiteConfigurationSnapshot")
29593		defer func() {
29594			sc := -1
29595			if result.Response != nil {
29596				sc = result.Response.StatusCode
29597			}
29598			tracing.EndSpan(ctx, sc, err)
29599		}()
29600	}
29601	if err := validation.Validate([]validation.Validation{
29602		{TargetValue: resourceGroupName,
29603			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29604				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29605				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29606		return result, validation.NewError("web.AppsClient", "RecoverSiteConfigurationSnapshot", err.Error())
29607	}
29608
29609	req, err := client.RecoverSiteConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID)
29610	if err != nil {
29611		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", nil, "Failure preparing request")
29612		return
29613	}
29614
29615	resp, err := client.RecoverSiteConfigurationSnapshotSender(req)
29616	if err != nil {
29617		result.Response = resp
29618		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", resp, "Failure sending request")
29619		return
29620	}
29621
29622	result, err = client.RecoverSiteConfigurationSnapshotResponder(resp)
29623	if err != nil {
29624		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", resp, "Failure responding to request")
29625		return
29626	}
29627
29628	return
29629}
29630
29631// RecoverSiteConfigurationSnapshotPreparer prepares the RecoverSiteConfigurationSnapshot request.
29632func (client AppsClient) RecoverSiteConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) {
29633	pathParameters := map[string]interface{}{
29634		"name":              autorest.Encode("path", name),
29635		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29636		"snapshotId":        autorest.Encode("path", snapshotID),
29637		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29638	}
29639
29640	const APIVersion = "2021-01-15"
29641	queryParameters := map[string]interface{}{
29642		"api-version": APIVersion,
29643	}
29644
29645	preparer := autorest.CreatePreparer(
29646		autorest.AsPost(),
29647		autorest.WithBaseURL(client.BaseURI),
29648		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover", pathParameters),
29649		autorest.WithQueryParameters(queryParameters))
29650	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29651}
29652
29653// RecoverSiteConfigurationSnapshotSender sends the RecoverSiteConfigurationSnapshot request. The method will close the
29654// http.Response Body if it receives an error.
29655func (client AppsClient) RecoverSiteConfigurationSnapshotSender(req *http.Request) (*http.Response, error) {
29656	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29657}
29658
29659// RecoverSiteConfigurationSnapshotResponder handles the response to the RecoverSiteConfigurationSnapshot request. The method always
29660// closes the http.Response Body.
29661func (client AppsClient) RecoverSiteConfigurationSnapshotResponder(resp *http.Response) (result autorest.Response, err error) {
29662	err = autorest.Respond(
29663		resp,
29664		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
29665		autorest.ByClosing())
29666	result.Response = resp
29667	return
29668}
29669
29670// RecoverSiteConfigurationSnapshotSlot description for Reverts the configuration of an app to a previous snapshot.
29671// Parameters:
29672// resourceGroupName - name of the resource group to which the resource belongs.
29673// name - name of the app.
29674// snapshotID - the ID of the snapshot to read.
29675// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
29676// production slot.
29677func (client AppsClient) RecoverSiteConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result autorest.Response, err error) {
29678	if tracing.IsEnabled() {
29679		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RecoverSiteConfigurationSnapshotSlot")
29680		defer func() {
29681			sc := -1
29682			if result.Response != nil {
29683				sc = result.Response.StatusCode
29684			}
29685			tracing.EndSpan(ctx, sc, err)
29686		}()
29687	}
29688	if err := validation.Validate([]validation.Validation{
29689		{TargetValue: resourceGroupName,
29690			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29691				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29692				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29693		return result, validation.NewError("web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", err.Error())
29694	}
29695
29696	req, err := client.RecoverSiteConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot)
29697	if err != nil {
29698		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", nil, "Failure preparing request")
29699		return
29700	}
29701
29702	resp, err := client.RecoverSiteConfigurationSnapshotSlotSender(req)
29703	if err != nil {
29704		result.Response = resp
29705		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", resp, "Failure sending request")
29706		return
29707	}
29708
29709	result, err = client.RecoverSiteConfigurationSnapshotSlotResponder(resp)
29710	if err != nil {
29711		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", resp, "Failure responding to request")
29712		return
29713	}
29714
29715	return
29716}
29717
29718// RecoverSiteConfigurationSnapshotSlotPreparer prepares the RecoverSiteConfigurationSnapshotSlot request.
29719func (client AppsClient) RecoverSiteConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) {
29720	pathParameters := map[string]interface{}{
29721		"name":              autorest.Encode("path", name),
29722		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29723		"slot":              autorest.Encode("path", slot),
29724		"snapshotId":        autorest.Encode("path", snapshotID),
29725		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29726	}
29727
29728	const APIVersion = "2021-01-15"
29729	queryParameters := map[string]interface{}{
29730		"api-version": APIVersion,
29731	}
29732
29733	preparer := autorest.CreatePreparer(
29734		autorest.AsPost(),
29735		autorest.WithBaseURL(client.BaseURI),
29736		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover", pathParameters),
29737		autorest.WithQueryParameters(queryParameters))
29738	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29739}
29740
29741// RecoverSiteConfigurationSnapshotSlotSender sends the RecoverSiteConfigurationSnapshotSlot request. The method will close the
29742// http.Response Body if it receives an error.
29743func (client AppsClient) RecoverSiteConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) {
29744	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29745}
29746
29747// RecoverSiteConfigurationSnapshotSlotResponder handles the response to the RecoverSiteConfigurationSnapshotSlot request. The method always
29748// closes the http.Response Body.
29749func (client AppsClient) RecoverSiteConfigurationSnapshotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29750	err = autorest.Respond(
29751		resp,
29752		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
29753		autorest.ByClosing())
29754	result.Response = resp
29755	return
29756}
29757
29758// ResetProductionSlotConfig description for Resets the configuration settings of the current slot if they were
29759// previously modified by calling the API with POST.
29760// Parameters:
29761// resourceGroupName - name of the resource group to which the resource belongs.
29762// name - name of the app.
29763func (client AppsClient) ResetProductionSlotConfig(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
29764	if tracing.IsEnabled() {
29765		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ResetProductionSlotConfig")
29766		defer func() {
29767			sc := -1
29768			if result.Response != nil {
29769				sc = result.Response.StatusCode
29770			}
29771			tracing.EndSpan(ctx, sc, err)
29772		}()
29773	}
29774	if err := validation.Validate([]validation.Validation{
29775		{TargetValue: resourceGroupName,
29776			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29777				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29778				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29779		return result, validation.NewError("web.AppsClient", "ResetProductionSlotConfig", err.Error())
29780	}
29781
29782	req, err := client.ResetProductionSlotConfigPreparer(ctx, resourceGroupName, name)
29783	if err != nil {
29784		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", nil, "Failure preparing request")
29785		return
29786	}
29787
29788	resp, err := client.ResetProductionSlotConfigSender(req)
29789	if err != nil {
29790		result.Response = resp
29791		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", resp, "Failure sending request")
29792		return
29793	}
29794
29795	result, err = client.ResetProductionSlotConfigResponder(resp)
29796	if err != nil {
29797		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", resp, "Failure responding to request")
29798		return
29799	}
29800
29801	return
29802}
29803
29804// ResetProductionSlotConfigPreparer prepares the ResetProductionSlotConfig request.
29805func (client AppsClient) ResetProductionSlotConfigPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
29806	pathParameters := map[string]interface{}{
29807		"name":              autorest.Encode("path", name),
29808		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29809		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29810	}
29811
29812	const APIVersion = "2021-01-15"
29813	queryParameters := map[string]interface{}{
29814		"api-version": APIVersion,
29815	}
29816
29817	preparer := autorest.CreatePreparer(
29818		autorest.AsPost(),
29819		autorest.WithBaseURL(client.BaseURI),
29820		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig", pathParameters),
29821		autorest.WithQueryParameters(queryParameters))
29822	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29823}
29824
29825// ResetProductionSlotConfigSender sends the ResetProductionSlotConfig request. The method will close the
29826// http.Response Body if it receives an error.
29827func (client AppsClient) ResetProductionSlotConfigSender(req *http.Request) (*http.Response, error) {
29828	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29829}
29830
29831// ResetProductionSlotConfigResponder handles the response to the ResetProductionSlotConfig request. The method always
29832// closes the http.Response Body.
29833func (client AppsClient) ResetProductionSlotConfigResponder(resp *http.Response) (result autorest.Response, err error) {
29834	err = autorest.Respond(
29835		resp,
29836		azure.WithErrorUnlessStatusCode(http.StatusOK),
29837		autorest.ByClosing())
29838	result.Response = resp
29839	return
29840}
29841
29842// ResetSlotConfigurationSlot description for Resets the configuration settings of the current slot if they were
29843// previously modified by calling the API with POST.
29844// Parameters:
29845// resourceGroupName - name of the resource group to which the resource belongs.
29846// name - name of the app.
29847// slot - name of the deployment slot. If a slot is not specified, the API resets configuration settings for
29848// the production slot.
29849func (client AppsClient) ResetSlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
29850	if tracing.IsEnabled() {
29851		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ResetSlotConfigurationSlot")
29852		defer func() {
29853			sc := -1
29854			if result.Response != nil {
29855				sc = result.Response.StatusCode
29856			}
29857			tracing.EndSpan(ctx, sc, err)
29858		}()
29859	}
29860	if err := validation.Validate([]validation.Validation{
29861		{TargetValue: resourceGroupName,
29862			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29863				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29864				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29865		return result, validation.NewError("web.AppsClient", "ResetSlotConfigurationSlot", err.Error())
29866	}
29867
29868	req, err := client.ResetSlotConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
29869	if err != nil {
29870		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", nil, "Failure preparing request")
29871		return
29872	}
29873
29874	resp, err := client.ResetSlotConfigurationSlotSender(req)
29875	if err != nil {
29876		result.Response = resp
29877		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", resp, "Failure sending request")
29878		return
29879	}
29880
29881	result, err = client.ResetSlotConfigurationSlotResponder(resp)
29882	if err != nil {
29883		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", resp, "Failure responding to request")
29884		return
29885	}
29886
29887	return
29888}
29889
29890// ResetSlotConfigurationSlotPreparer prepares the ResetSlotConfigurationSlot request.
29891func (client AppsClient) ResetSlotConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
29892	pathParameters := map[string]interface{}{
29893		"name":              autorest.Encode("path", name),
29894		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29895		"slot":              autorest.Encode("path", slot),
29896		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29897	}
29898
29899	const APIVersion = "2021-01-15"
29900	queryParameters := map[string]interface{}{
29901		"api-version": APIVersion,
29902	}
29903
29904	preparer := autorest.CreatePreparer(
29905		autorest.AsPost(),
29906		autorest.WithBaseURL(client.BaseURI),
29907		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig", pathParameters),
29908		autorest.WithQueryParameters(queryParameters))
29909	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29910}
29911
29912// ResetSlotConfigurationSlotSender sends the ResetSlotConfigurationSlot request. The method will close the
29913// http.Response Body if it receives an error.
29914func (client AppsClient) ResetSlotConfigurationSlotSender(req *http.Request) (*http.Response, error) {
29915	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29916}
29917
29918// ResetSlotConfigurationSlotResponder handles the response to the ResetSlotConfigurationSlot request. The method always
29919// closes the http.Response Body.
29920func (client AppsClient) ResetSlotConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29921	err = autorest.Respond(
29922		resp,
29923		azure.WithErrorUnlessStatusCode(http.StatusOK),
29924		autorest.ByClosing())
29925	result.Response = resp
29926	return
29927}
29928
29929// Restart description for Restarts an app (or deployment slot, if specified).
29930// Parameters:
29931// resourceGroupName - name of the resource group to which the resource belongs.
29932// name - name of the app.
29933// softRestart - specify true to apply the configuration settings and restarts the app only if necessary. By
29934// default, the API always restarts and reprovisions the app.
29935// synchronous - specify true to block until the app is restarted. By default, it is set to false, and the API
29936// responds immediately (asynchronous).
29937func (client AppsClient) Restart(ctx context.Context, resourceGroupName string, name string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) {
29938	if tracing.IsEnabled() {
29939		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Restart")
29940		defer func() {
29941			sc := -1
29942			if result.Response != nil {
29943				sc = result.Response.StatusCode
29944			}
29945			tracing.EndSpan(ctx, sc, err)
29946		}()
29947	}
29948	if err := validation.Validate([]validation.Validation{
29949		{TargetValue: resourceGroupName,
29950			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29951				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29952				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29953		return result, validation.NewError("web.AppsClient", "Restart", err.Error())
29954	}
29955
29956	req, err := client.RestartPreparer(ctx, resourceGroupName, name, softRestart, synchronous)
29957	if err != nil {
29958		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", nil, "Failure preparing request")
29959		return
29960	}
29961
29962	resp, err := client.RestartSender(req)
29963	if err != nil {
29964		result.Response = resp
29965		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", resp, "Failure sending request")
29966		return
29967	}
29968
29969	result, err = client.RestartResponder(resp)
29970	if err != nil {
29971		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", resp, "Failure responding to request")
29972		return
29973	}
29974
29975	return
29976}
29977
29978// RestartPreparer prepares the Restart request.
29979func (client AppsClient) RestartPreparer(ctx context.Context, resourceGroupName string, name string, softRestart *bool, synchronous *bool) (*http.Request, error) {
29980	pathParameters := map[string]interface{}{
29981		"name":              autorest.Encode("path", name),
29982		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29983		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29984	}
29985
29986	const APIVersion = "2021-01-15"
29987	queryParameters := map[string]interface{}{
29988		"api-version": APIVersion,
29989	}
29990	if softRestart != nil {
29991		queryParameters["softRestart"] = autorest.Encode("query", *softRestart)
29992	}
29993	if synchronous != nil {
29994		queryParameters["synchronous"] = autorest.Encode("query", *synchronous)
29995	}
29996
29997	preparer := autorest.CreatePreparer(
29998		autorest.AsPost(),
29999		autorest.WithBaseURL(client.BaseURI),
30000		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart", pathParameters),
30001		autorest.WithQueryParameters(queryParameters))
30002	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30003}
30004
30005// RestartSender sends the Restart request. The method will close the
30006// http.Response Body if it receives an error.
30007func (client AppsClient) RestartSender(req *http.Request) (*http.Response, error) {
30008	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30009}
30010
30011// RestartResponder handles the response to the Restart request. The method always
30012// closes the http.Response Body.
30013func (client AppsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
30014	err = autorest.Respond(
30015		resp,
30016		azure.WithErrorUnlessStatusCode(http.StatusOK),
30017		autorest.ByClosing())
30018	result.Response = resp
30019	return
30020}
30021
30022// RestartSlot description for Restarts an app (or deployment slot, if specified).
30023// Parameters:
30024// resourceGroupName - name of the resource group to which the resource belongs.
30025// name - name of the app.
30026// slot - name of the deployment slot. If a slot is not specified, the API will restart the production slot.
30027// softRestart - specify true to apply the configuration settings and restarts the app only if necessary. By
30028// default, the API always restarts and reprovisions the app.
30029// synchronous - specify true to block until the app is restarted. By default, it is set to false, and the API
30030// responds immediately (asynchronous).
30031func (client AppsClient) RestartSlot(ctx context.Context, resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) {
30032	if tracing.IsEnabled() {
30033		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestartSlot")
30034		defer func() {
30035			sc := -1
30036			if result.Response != nil {
30037				sc = result.Response.StatusCode
30038			}
30039			tracing.EndSpan(ctx, sc, err)
30040		}()
30041	}
30042	if err := validation.Validate([]validation.Validation{
30043		{TargetValue: resourceGroupName,
30044			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30045				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30046				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30047		return result, validation.NewError("web.AppsClient", "RestartSlot", err.Error())
30048	}
30049
30050	req, err := client.RestartSlotPreparer(ctx, resourceGroupName, name, slot, softRestart, synchronous)
30051	if err != nil {
30052		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", nil, "Failure preparing request")
30053		return
30054	}
30055
30056	resp, err := client.RestartSlotSender(req)
30057	if err != nil {
30058		result.Response = resp
30059		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", resp, "Failure sending request")
30060		return
30061	}
30062
30063	result, err = client.RestartSlotResponder(resp)
30064	if err != nil {
30065		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", resp, "Failure responding to request")
30066		return
30067	}
30068
30069	return
30070}
30071
30072// RestartSlotPreparer prepares the RestartSlot request.
30073func (client AppsClient) RestartSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (*http.Request, error) {
30074	pathParameters := map[string]interface{}{
30075		"name":              autorest.Encode("path", name),
30076		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30077		"slot":              autorest.Encode("path", slot),
30078		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30079	}
30080
30081	const APIVersion = "2021-01-15"
30082	queryParameters := map[string]interface{}{
30083		"api-version": APIVersion,
30084	}
30085	if softRestart != nil {
30086		queryParameters["softRestart"] = autorest.Encode("query", *softRestart)
30087	}
30088	if synchronous != nil {
30089		queryParameters["synchronous"] = autorest.Encode("query", *synchronous)
30090	}
30091
30092	preparer := autorest.CreatePreparer(
30093		autorest.AsPost(),
30094		autorest.WithBaseURL(client.BaseURI),
30095		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart", pathParameters),
30096		autorest.WithQueryParameters(queryParameters))
30097	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30098}
30099
30100// RestartSlotSender sends the RestartSlot request. The method will close the
30101// http.Response Body if it receives an error.
30102func (client AppsClient) RestartSlotSender(req *http.Request) (*http.Response, error) {
30103	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30104}
30105
30106// RestartSlotResponder handles the response to the RestartSlot request. The method always
30107// closes the http.Response Body.
30108func (client AppsClient) RestartSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30109	err = autorest.Respond(
30110		resp,
30111		azure.WithErrorUnlessStatusCode(http.StatusOK),
30112		autorest.ByClosing())
30113	result.Response = resp
30114	return
30115}
30116
30117// Restore description for Restores a specific backup to another app (or deployment slot, if specified).
30118// Parameters:
30119// resourceGroupName - name of the resource group to which the resource belongs.
30120// name - name of the app.
30121// backupID - ID of the backup.
30122// request - information on restore request .
30123func (client AppsClient) Restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest) (result AppsRestoreFuture, err error) {
30124	if tracing.IsEnabled() {
30125		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Restore")
30126		defer func() {
30127			sc := -1
30128			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30129				sc = result.FutureAPI.Response().StatusCode
30130			}
30131			tracing.EndSpan(ctx, sc, err)
30132		}()
30133	}
30134	if err := validation.Validate([]validation.Validation{
30135		{TargetValue: resourceGroupName,
30136			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30137				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30138				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30139		{TargetValue: request,
30140			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
30141				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
30142					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
30143				}}}}}); err != nil {
30144		return result, validation.NewError("web.AppsClient", "Restore", err.Error())
30145	}
30146
30147	req, err := client.RestorePreparer(ctx, resourceGroupName, name, backupID, request)
30148	if err != nil {
30149		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restore", nil, "Failure preparing request")
30150		return
30151	}
30152
30153	result, err = client.RestoreSender(req)
30154	if err != nil {
30155		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restore", nil, "Failure sending request")
30156		return
30157	}
30158
30159	return
30160}
30161
30162// RestorePreparer prepares the Restore request.
30163func (client AppsClient) RestorePreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest) (*http.Request, error) {
30164	pathParameters := map[string]interface{}{
30165		"backupId":          autorest.Encode("path", backupID),
30166		"name":              autorest.Encode("path", name),
30167		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30168		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30169	}
30170
30171	const APIVersion = "2021-01-15"
30172	queryParameters := map[string]interface{}{
30173		"api-version": APIVersion,
30174	}
30175
30176	preparer := autorest.CreatePreparer(
30177		autorest.AsContentType("application/json; charset=utf-8"),
30178		autorest.AsPost(),
30179		autorest.WithBaseURL(client.BaseURI),
30180		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore", pathParameters),
30181		autorest.WithJSON(request),
30182		autorest.WithQueryParameters(queryParameters))
30183	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30184}
30185
30186// RestoreSender sends the Restore request. The method will close the
30187// http.Response Body if it receives an error.
30188func (client AppsClient) RestoreSender(req *http.Request) (future AppsRestoreFuture, err error) {
30189	var resp *http.Response
30190	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30191	if err != nil {
30192		return
30193	}
30194	var azf azure.Future
30195	azf, err = azure.NewFutureFromResponse(resp)
30196	future.FutureAPI = &azf
30197	future.Result = future.result
30198	return
30199}
30200
30201// RestoreResponder handles the response to the Restore request. The method always
30202// closes the http.Response Body.
30203func (client AppsClient) RestoreResponder(resp *http.Response) (result autorest.Response, err error) {
30204	err = autorest.Respond(
30205		resp,
30206		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30207		autorest.ByClosing())
30208	result.Response = resp
30209	return
30210}
30211
30212// RestoreFromBackupBlob description for Restores an app from a backup blob in Azure Storage.
30213// Parameters:
30214// resourceGroupName - name of the resource group to which the resource belongs.
30215// name - name of the app.
30216// request - information on restore request .
30217func (client AppsClient) RestoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result AppsRestoreFromBackupBlobFuture, err error) {
30218	if tracing.IsEnabled() {
30219		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromBackupBlob")
30220		defer func() {
30221			sc := -1
30222			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30223				sc = result.FutureAPI.Response().StatusCode
30224			}
30225			tracing.EndSpan(ctx, sc, err)
30226		}()
30227	}
30228	if err := validation.Validate([]validation.Validation{
30229		{TargetValue: resourceGroupName,
30230			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30231				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30232				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30233		{TargetValue: request,
30234			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
30235				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
30236					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
30237				}}}}}); err != nil {
30238		return result, validation.NewError("web.AppsClient", "RestoreFromBackupBlob", err.Error())
30239	}
30240
30241	req, err := client.RestoreFromBackupBlobPreparer(ctx, resourceGroupName, name, request)
30242	if err != nil {
30243		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlob", nil, "Failure preparing request")
30244		return
30245	}
30246
30247	result, err = client.RestoreFromBackupBlobSender(req)
30248	if err != nil {
30249		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlob", nil, "Failure sending request")
30250		return
30251	}
30252
30253	return
30254}
30255
30256// RestoreFromBackupBlobPreparer prepares the RestoreFromBackupBlob request.
30257func (client AppsClient) RestoreFromBackupBlobPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) {
30258	pathParameters := map[string]interface{}{
30259		"name":              autorest.Encode("path", name),
30260		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30261		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30262	}
30263
30264	const APIVersion = "2021-01-15"
30265	queryParameters := map[string]interface{}{
30266		"api-version": APIVersion,
30267	}
30268
30269	preparer := autorest.CreatePreparer(
30270		autorest.AsContentType("application/json; charset=utf-8"),
30271		autorest.AsPost(),
30272		autorest.WithBaseURL(client.BaseURI),
30273		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob", pathParameters),
30274		autorest.WithJSON(request),
30275		autorest.WithQueryParameters(queryParameters))
30276	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30277}
30278
30279// RestoreFromBackupBlobSender sends the RestoreFromBackupBlob request. The method will close the
30280// http.Response Body if it receives an error.
30281func (client AppsClient) RestoreFromBackupBlobSender(req *http.Request) (future AppsRestoreFromBackupBlobFuture, err error) {
30282	var resp *http.Response
30283	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30284	if err != nil {
30285		return
30286	}
30287	var azf azure.Future
30288	azf, err = azure.NewFutureFromResponse(resp)
30289	future.FutureAPI = &azf
30290	future.Result = future.result
30291	return
30292}
30293
30294// RestoreFromBackupBlobResponder handles the response to the RestoreFromBackupBlob request. The method always
30295// closes the http.Response Body.
30296func (client AppsClient) RestoreFromBackupBlobResponder(resp *http.Response) (result autorest.Response, err error) {
30297	err = autorest.Respond(
30298		resp,
30299		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30300		autorest.ByClosing())
30301	result.Response = resp
30302	return
30303}
30304
30305// RestoreFromBackupBlobSlot description for Restores an app from a backup blob in Azure Storage.
30306// Parameters:
30307// resourceGroupName - name of the resource group to which the resource belongs.
30308// name - name of the app.
30309// request - information on restore request .
30310// slot - name of the deployment slot. If a slot is not specified, the API will restore a backup of the
30311// production slot.
30312func (client AppsClient) RestoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result AppsRestoreFromBackupBlobSlotFuture, err error) {
30313	if tracing.IsEnabled() {
30314		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromBackupBlobSlot")
30315		defer func() {
30316			sc := -1
30317			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30318				sc = result.FutureAPI.Response().StatusCode
30319			}
30320			tracing.EndSpan(ctx, sc, err)
30321		}()
30322	}
30323	if err := validation.Validate([]validation.Validation{
30324		{TargetValue: resourceGroupName,
30325			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30326				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30327				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30328		{TargetValue: request,
30329			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
30330				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
30331					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
30332				}}}}}); err != nil {
30333		return result, validation.NewError("web.AppsClient", "RestoreFromBackupBlobSlot", err.Error())
30334	}
30335
30336	req, err := client.RestoreFromBackupBlobSlotPreparer(ctx, resourceGroupName, name, request, slot)
30337	if err != nil {
30338		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlobSlot", nil, "Failure preparing request")
30339		return
30340	}
30341
30342	result, err = client.RestoreFromBackupBlobSlotSender(req)
30343	if err != nil {
30344		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlobSlot", nil, "Failure sending request")
30345		return
30346	}
30347
30348	return
30349}
30350
30351// RestoreFromBackupBlobSlotPreparer prepares the RestoreFromBackupBlobSlot request.
30352func (client AppsClient) RestoreFromBackupBlobSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) {
30353	pathParameters := map[string]interface{}{
30354		"name":              autorest.Encode("path", name),
30355		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30356		"slot":              autorest.Encode("path", slot),
30357		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30358	}
30359
30360	const APIVersion = "2021-01-15"
30361	queryParameters := map[string]interface{}{
30362		"api-version": APIVersion,
30363	}
30364
30365	preparer := autorest.CreatePreparer(
30366		autorest.AsContentType("application/json; charset=utf-8"),
30367		autorest.AsPost(),
30368		autorest.WithBaseURL(client.BaseURI),
30369		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob", pathParameters),
30370		autorest.WithJSON(request),
30371		autorest.WithQueryParameters(queryParameters))
30372	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30373}
30374
30375// RestoreFromBackupBlobSlotSender sends the RestoreFromBackupBlobSlot request. The method will close the
30376// http.Response Body if it receives an error.
30377func (client AppsClient) RestoreFromBackupBlobSlotSender(req *http.Request) (future AppsRestoreFromBackupBlobSlotFuture, err error) {
30378	var resp *http.Response
30379	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30380	if err != nil {
30381		return
30382	}
30383	var azf azure.Future
30384	azf, err = azure.NewFutureFromResponse(resp)
30385	future.FutureAPI = &azf
30386	future.Result = future.result
30387	return
30388}
30389
30390// RestoreFromBackupBlobSlotResponder handles the response to the RestoreFromBackupBlobSlot request. The method always
30391// closes the http.Response Body.
30392func (client AppsClient) RestoreFromBackupBlobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30393	err = autorest.Respond(
30394		resp,
30395		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30396		autorest.ByClosing())
30397	result.Response = resp
30398	return
30399}
30400
30401// RestoreFromDeletedApp description for Restores a deleted web app to this web app.
30402// Parameters:
30403// resourceGroupName - name of the resource group to which the resource belongs.
30404// name - name of web app.
30405// restoreRequest - deleted web app restore information.
30406func (client AppsClient) RestoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (result AppsRestoreFromDeletedAppFuture, err error) {
30407	if tracing.IsEnabled() {
30408		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromDeletedApp")
30409		defer func() {
30410			sc := -1
30411			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30412				sc = result.FutureAPI.Response().StatusCode
30413			}
30414			tracing.EndSpan(ctx, sc, err)
30415		}()
30416	}
30417	if err := validation.Validate([]validation.Validation{
30418		{TargetValue: resourceGroupName,
30419			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30420				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30421				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30422		return result, validation.NewError("web.AppsClient", "RestoreFromDeletedApp", err.Error())
30423	}
30424
30425	req, err := client.RestoreFromDeletedAppPreparer(ctx, resourceGroupName, name, restoreRequest)
30426	if err != nil {
30427		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure preparing request")
30428		return
30429	}
30430
30431	result, err = client.RestoreFromDeletedAppSender(req)
30432	if err != nil {
30433		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure sending request")
30434		return
30435	}
30436
30437	return
30438}
30439
30440// RestoreFromDeletedAppPreparer prepares the RestoreFromDeletedApp request.
30441func (client AppsClient) RestoreFromDeletedAppPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (*http.Request, error) {
30442	pathParameters := map[string]interface{}{
30443		"name":              autorest.Encode("path", name),
30444		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30445		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30446	}
30447
30448	const APIVersion = "2021-01-15"
30449	queryParameters := map[string]interface{}{
30450		"api-version": APIVersion,
30451	}
30452
30453	preparer := autorest.CreatePreparer(
30454		autorest.AsContentType("application/json; charset=utf-8"),
30455		autorest.AsPost(),
30456		autorest.WithBaseURL(client.BaseURI),
30457		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp", pathParameters),
30458		autorest.WithJSON(restoreRequest),
30459		autorest.WithQueryParameters(queryParameters))
30460	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30461}
30462
30463// RestoreFromDeletedAppSender sends the RestoreFromDeletedApp request. The method will close the
30464// http.Response Body if it receives an error.
30465func (client AppsClient) RestoreFromDeletedAppSender(req *http.Request) (future AppsRestoreFromDeletedAppFuture, err error) {
30466	var resp *http.Response
30467	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30468	if err != nil {
30469		return
30470	}
30471	var azf azure.Future
30472	azf, err = azure.NewFutureFromResponse(resp)
30473	future.FutureAPI = &azf
30474	future.Result = future.result
30475	return
30476}
30477
30478// RestoreFromDeletedAppResponder handles the response to the RestoreFromDeletedApp request. The method always
30479// closes the http.Response Body.
30480func (client AppsClient) RestoreFromDeletedAppResponder(resp *http.Response) (result autorest.Response, err error) {
30481	err = autorest.Respond(
30482		resp,
30483		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30484		autorest.ByClosing())
30485	result.Response = resp
30486	return
30487}
30488
30489// RestoreFromDeletedAppSlot description for Restores a deleted web app to this web app.
30490// Parameters:
30491// resourceGroupName - name of the resource group to which the resource belongs.
30492// name - name of web app.
30493// restoreRequest - deleted web app restore information.
30494// slot - name of web app slot. If not specified then will default to production slot.
30495func (client AppsClient) RestoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (result AppsRestoreFromDeletedAppSlotFuture, err error) {
30496	if tracing.IsEnabled() {
30497		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromDeletedAppSlot")
30498		defer func() {
30499			sc := -1
30500			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30501				sc = result.FutureAPI.Response().StatusCode
30502			}
30503			tracing.EndSpan(ctx, sc, err)
30504		}()
30505	}
30506	if err := validation.Validate([]validation.Validation{
30507		{TargetValue: resourceGroupName,
30508			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30509				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30510				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30511		return result, validation.NewError("web.AppsClient", "RestoreFromDeletedAppSlot", err.Error())
30512	}
30513
30514	req, err := client.RestoreFromDeletedAppSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
30515	if err != nil {
30516		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure preparing request")
30517		return
30518	}
30519
30520	result, err = client.RestoreFromDeletedAppSlotSender(req)
30521	if err != nil {
30522		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure sending request")
30523		return
30524	}
30525
30526	return
30527}
30528
30529// RestoreFromDeletedAppSlotPreparer prepares the RestoreFromDeletedAppSlot request.
30530func (client AppsClient) RestoreFromDeletedAppSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (*http.Request, error) {
30531	pathParameters := map[string]interface{}{
30532		"name":              autorest.Encode("path", name),
30533		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30534		"slot":              autorest.Encode("path", slot),
30535		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30536	}
30537
30538	const APIVersion = "2021-01-15"
30539	queryParameters := map[string]interface{}{
30540		"api-version": APIVersion,
30541	}
30542
30543	preparer := autorest.CreatePreparer(
30544		autorest.AsContentType("application/json; charset=utf-8"),
30545		autorest.AsPost(),
30546		autorest.WithBaseURL(client.BaseURI),
30547		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp", pathParameters),
30548		autorest.WithJSON(restoreRequest),
30549		autorest.WithQueryParameters(queryParameters))
30550	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30551}
30552
30553// RestoreFromDeletedAppSlotSender sends the RestoreFromDeletedAppSlot request. The method will close the
30554// http.Response Body if it receives an error.
30555func (client AppsClient) RestoreFromDeletedAppSlotSender(req *http.Request) (future AppsRestoreFromDeletedAppSlotFuture, err error) {
30556	var resp *http.Response
30557	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30558	if err != nil {
30559		return
30560	}
30561	var azf azure.Future
30562	azf, err = azure.NewFutureFromResponse(resp)
30563	future.FutureAPI = &azf
30564	future.Result = future.result
30565	return
30566}
30567
30568// RestoreFromDeletedAppSlotResponder handles the response to the RestoreFromDeletedAppSlot request. The method always
30569// closes the http.Response Body.
30570func (client AppsClient) RestoreFromDeletedAppSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30571	err = autorest.Respond(
30572		resp,
30573		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30574		autorest.ByClosing())
30575	result.Response = resp
30576	return
30577}
30578
30579// RestoreSlot description for Restores a specific backup to another app (or deployment slot, if specified).
30580// Parameters:
30581// resourceGroupName - name of the resource group to which the resource belongs.
30582// name - name of the app.
30583// backupID - ID of the backup.
30584// request - information on restore request .
30585// slot - name of the deployment slot. If a slot is not specified, the API will restore a backup of the
30586// production slot.
30587func (client AppsClient) RestoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, slot string) (result AppsRestoreSlotFuture, err error) {
30588	if tracing.IsEnabled() {
30589		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSlot")
30590		defer func() {
30591			sc := -1
30592			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30593				sc = result.FutureAPI.Response().StatusCode
30594			}
30595			tracing.EndSpan(ctx, sc, err)
30596		}()
30597	}
30598	if err := validation.Validate([]validation.Validation{
30599		{TargetValue: resourceGroupName,
30600			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30601				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30602				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30603		{TargetValue: request,
30604			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
30605				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
30606					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
30607				}}}}}); err != nil {
30608		return result, validation.NewError("web.AppsClient", "RestoreSlot", err.Error())
30609	}
30610
30611	req, err := client.RestoreSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot)
30612	if err != nil {
30613		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSlot", nil, "Failure preparing request")
30614		return
30615	}
30616
30617	result, err = client.RestoreSlotSender(req)
30618	if err != nil {
30619		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSlot", nil, "Failure sending request")
30620		return
30621	}
30622
30623	return
30624}
30625
30626// RestoreSlotPreparer prepares the RestoreSlot request.
30627func (client AppsClient) RestoreSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, slot string) (*http.Request, error) {
30628	pathParameters := map[string]interface{}{
30629		"backupId":          autorest.Encode("path", backupID),
30630		"name":              autorest.Encode("path", name),
30631		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30632		"slot":              autorest.Encode("path", slot),
30633		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30634	}
30635
30636	const APIVersion = "2021-01-15"
30637	queryParameters := map[string]interface{}{
30638		"api-version": APIVersion,
30639	}
30640
30641	preparer := autorest.CreatePreparer(
30642		autorest.AsContentType("application/json; charset=utf-8"),
30643		autorest.AsPost(),
30644		autorest.WithBaseURL(client.BaseURI),
30645		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore", pathParameters),
30646		autorest.WithJSON(request),
30647		autorest.WithQueryParameters(queryParameters))
30648	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30649}
30650
30651// RestoreSlotSender sends the RestoreSlot request. The method will close the
30652// http.Response Body if it receives an error.
30653func (client AppsClient) RestoreSlotSender(req *http.Request) (future AppsRestoreSlotFuture, err error) {
30654	var resp *http.Response
30655	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30656	if err != nil {
30657		return
30658	}
30659	var azf azure.Future
30660	azf, err = azure.NewFutureFromResponse(resp)
30661	future.FutureAPI = &azf
30662	future.Result = future.result
30663	return
30664}
30665
30666// RestoreSlotResponder handles the response to the RestoreSlot request. The method always
30667// closes the http.Response Body.
30668func (client AppsClient) RestoreSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30669	err = autorest.Respond(
30670		resp,
30671		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30672		autorest.ByClosing())
30673	result.Response = resp
30674	return
30675}
30676
30677// RestoreSnapshot description for Restores a web app from a snapshot.
30678// Parameters:
30679// resourceGroupName - name of the resource group to which the resource belongs.
30680// name - name of web app.
30681// restoreRequest - snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites
30682// or GetSiteSnapshots API.
30683func (client AppsClient) RestoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest) (result AppsRestoreSnapshotFuture, err error) {
30684	if tracing.IsEnabled() {
30685		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSnapshot")
30686		defer func() {
30687			sc := -1
30688			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30689				sc = result.FutureAPI.Response().StatusCode
30690			}
30691			tracing.EndSpan(ctx, sc, err)
30692		}()
30693	}
30694	if err := validation.Validate([]validation.Validation{
30695		{TargetValue: resourceGroupName,
30696			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30697				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30698				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30699		{TargetValue: restoreRequest,
30700			Constraints: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties", Name: validation.Null, Rule: false,
30701				Chain: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
30702		return result, validation.NewError("web.AppsClient", "RestoreSnapshot", err.Error())
30703	}
30704
30705	req, err := client.RestoreSnapshotPreparer(ctx, resourceGroupName, name, restoreRequest)
30706	if err != nil {
30707		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshot", nil, "Failure preparing request")
30708		return
30709	}
30710
30711	result, err = client.RestoreSnapshotSender(req)
30712	if err != nil {
30713		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshot", nil, "Failure sending request")
30714		return
30715	}
30716
30717	return
30718}
30719
30720// RestoreSnapshotPreparer prepares the RestoreSnapshot request.
30721func (client AppsClient) RestoreSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest) (*http.Request, error) {
30722	pathParameters := map[string]interface{}{
30723		"name":              autorest.Encode("path", name),
30724		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30725		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30726	}
30727
30728	const APIVersion = "2021-01-15"
30729	queryParameters := map[string]interface{}{
30730		"api-version": APIVersion,
30731	}
30732
30733	preparer := autorest.CreatePreparer(
30734		autorest.AsContentType("application/json; charset=utf-8"),
30735		autorest.AsPost(),
30736		autorest.WithBaseURL(client.BaseURI),
30737		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot", pathParameters),
30738		autorest.WithJSON(restoreRequest),
30739		autorest.WithQueryParameters(queryParameters))
30740	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30741}
30742
30743// RestoreSnapshotSender sends the RestoreSnapshot request. The method will close the
30744// http.Response Body if it receives an error.
30745func (client AppsClient) RestoreSnapshotSender(req *http.Request) (future AppsRestoreSnapshotFuture, err error) {
30746	var resp *http.Response
30747	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30748	if err != nil {
30749		return
30750	}
30751	var azf azure.Future
30752	azf, err = azure.NewFutureFromResponse(resp)
30753	future.FutureAPI = &azf
30754	future.Result = future.result
30755	return
30756}
30757
30758// RestoreSnapshotResponder handles the response to the RestoreSnapshot request. The method always
30759// closes the http.Response Body.
30760func (client AppsClient) RestoreSnapshotResponder(resp *http.Response) (result autorest.Response, err error) {
30761	err = autorest.Respond(
30762		resp,
30763		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30764		autorest.ByClosing())
30765	result.Response = resp
30766	return
30767}
30768
30769// RestoreSnapshotSlot description for Restores a web app from a snapshot.
30770// Parameters:
30771// resourceGroupName - name of the resource group to which the resource belongs.
30772// name - name of web app.
30773// restoreRequest - snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites
30774// or GetSiteSnapshots API.
30775// slot - name of web app slot. If not specified then will default to production slot.
30776func (client AppsClient) RestoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, slot string) (result AppsRestoreSnapshotSlotFuture, err error) {
30777	if tracing.IsEnabled() {
30778		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSnapshotSlot")
30779		defer func() {
30780			sc := -1
30781			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30782				sc = result.FutureAPI.Response().StatusCode
30783			}
30784			tracing.EndSpan(ctx, sc, err)
30785		}()
30786	}
30787	if err := validation.Validate([]validation.Validation{
30788		{TargetValue: resourceGroupName,
30789			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30790				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30791				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
30792		{TargetValue: restoreRequest,
30793			Constraints: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties", Name: validation.Null, Rule: false,
30794				Chain: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
30795		return result, validation.NewError("web.AppsClient", "RestoreSnapshotSlot", err.Error())
30796	}
30797
30798	req, err := client.RestoreSnapshotSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
30799	if err != nil {
30800		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshotSlot", nil, "Failure preparing request")
30801		return
30802	}
30803
30804	result, err = client.RestoreSnapshotSlotSender(req)
30805	if err != nil {
30806		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshotSlot", nil, "Failure sending request")
30807		return
30808	}
30809
30810	return
30811}
30812
30813// RestoreSnapshotSlotPreparer prepares the RestoreSnapshotSlot request.
30814func (client AppsClient) RestoreSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, slot string) (*http.Request, error) {
30815	pathParameters := map[string]interface{}{
30816		"name":              autorest.Encode("path", name),
30817		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30818		"slot":              autorest.Encode("path", slot),
30819		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30820	}
30821
30822	const APIVersion = "2021-01-15"
30823	queryParameters := map[string]interface{}{
30824		"api-version": APIVersion,
30825	}
30826
30827	preparer := autorest.CreatePreparer(
30828		autorest.AsContentType("application/json; charset=utf-8"),
30829		autorest.AsPost(),
30830		autorest.WithBaseURL(client.BaseURI),
30831		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot", pathParameters),
30832		autorest.WithJSON(restoreRequest),
30833		autorest.WithQueryParameters(queryParameters))
30834	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30835}
30836
30837// RestoreSnapshotSlotSender sends the RestoreSnapshotSlot request. The method will close the
30838// http.Response Body if it receives an error.
30839func (client AppsClient) RestoreSnapshotSlotSender(req *http.Request) (future AppsRestoreSnapshotSlotFuture, err error) {
30840	var resp *http.Response
30841	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30842	if err != nil {
30843		return
30844	}
30845	var azf azure.Future
30846	azf, err = azure.NewFutureFromResponse(resp)
30847	future.FutureAPI = &azf
30848	future.Result = future.result
30849	return
30850}
30851
30852// RestoreSnapshotSlotResponder handles the response to the RestoreSnapshotSlot request. The method always
30853// closes the http.Response Body.
30854func (client AppsClient) RestoreSnapshotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30855	err = autorest.Respond(
30856		resp,
30857		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30858		autorest.ByClosing())
30859	result.Response = resp
30860	return
30861}
30862
30863// RunTriggeredWebJob description for Run a triggered web job for an app, or a deployment slot.
30864// Parameters:
30865// resourceGroupName - name of the resource group to which the resource belongs.
30866// name - site name.
30867// webJobName - name of Web Job.
30868func (client AppsClient) RunTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
30869	if tracing.IsEnabled() {
30870		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RunTriggeredWebJob")
30871		defer func() {
30872			sc := -1
30873			if result.Response != nil {
30874				sc = result.Response.StatusCode
30875			}
30876			tracing.EndSpan(ctx, sc, err)
30877		}()
30878	}
30879	if err := validation.Validate([]validation.Validation{
30880		{TargetValue: resourceGroupName,
30881			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30882				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30883				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30884		return result, validation.NewError("web.AppsClient", "RunTriggeredWebJob", err.Error())
30885	}
30886
30887	req, err := client.RunTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
30888	if err != nil {
30889		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", nil, "Failure preparing request")
30890		return
30891	}
30892
30893	resp, err := client.RunTriggeredWebJobSender(req)
30894	if err != nil {
30895		result.Response = resp
30896		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure sending request")
30897		return
30898	}
30899
30900	result, err = client.RunTriggeredWebJobResponder(resp)
30901	if err != nil {
30902		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure responding to request")
30903		return
30904	}
30905
30906	return
30907}
30908
30909// RunTriggeredWebJobPreparer prepares the RunTriggeredWebJob request.
30910func (client AppsClient) RunTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
30911	pathParameters := map[string]interface{}{
30912		"name":              autorest.Encode("path", name),
30913		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30914		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30915		"webJobName":        autorest.Encode("path", webJobName),
30916	}
30917
30918	const APIVersion = "2021-01-15"
30919	queryParameters := map[string]interface{}{
30920		"api-version": APIVersion,
30921	}
30922
30923	preparer := autorest.CreatePreparer(
30924		autorest.AsPost(),
30925		autorest.WithBaseURL(client.BaseURI),
30926		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run", pathParameters),
30927		autorest.WithQueryParameters(queryParameters))
30928	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30929}
30930
30931// RunTriggeredWebJobSender sends the RunTriggeredWebJob request. The method will close the
30932// http.Response Body if it receives an error.
30933func (client AppsClient) RunTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
30934	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30935}
30936
30937// RunTriggeredWebJobResponder handles the response to the RunTriggeredWebJob request. The method always
30938// closes the http.Response Body.
30939func (client AppsClient) RunTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
30940	err = autorest.Respond(
30941		resp,
30942		azure.WithErrorUnlessStatusCode(http.StatusOK),
30943		autorest.ByClosing())
30944	result.Response = resp
30945	return
30946}
30947
30948// RunTriggeredWebJobSlot description for Run a triggered web job for an app, or a deployment slot.
30949// Parameters:
30950// resourceGroupName - name of the resource group to which the resource belongs.
30951// name - site name.
30952// webJobName - name of Web Job.
30953// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
30954func (client AppsClient) RunTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
30955	if tracing.IsEnabled() {
30956		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RunTriggeredWebJobSlot")
30957		defer func() {
30958			sc := -1
30959			if result.Response != nil {
30960				sc = result.Response.StatusCode
30961			}
30962			tracing.EndSpan(ctx, sc, err)
30963		}()
30964	}
30965	if err := validation.Validate([]validation.Validation{
30966		{TargetValue: resourceGroupName,
30967			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30968				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30969				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30970		return result, validation.NewError("web.AppsClient", "RunTriggeredWebJobSlot", err.Error())
30971	}
30972
30973	req, err := client.RunTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
30974	if err != nil {
30975		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", nil, "Failure preparing request")
30976		return
30977	}
30978
30979	resp, err := client.RunTriggeredWebJobSlotSender(req)
30980	if err != nil {
30981		result.Response = resp
30982		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure sending request")
30983		return
30984	}
30985
30986	result, err = client.RunTriggeredWebJobSlotResponder(resp)
30987	if err != nil {
30988		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure responding to request")
30989		return
30990	}
30991
30992	return
30993}
30994
30995// RunTriggeredWebJobSlotPreparer prepares the RunTriggeredWebJobSlot request.
30996func (client AppsClient) RunTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
30997	pathParameters := map[string]interface{}{
30998		"name":              autorest.Encode("path", name),
30999		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31000		"slot":              autorest.Encode("path", slot),
31001		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31002		"webJobName":        autorest.Encode("path", webJobName),
31003	}
31004
31005	const APIVersion = "2021-01-15"
31006	queryParameters := map[string]interface{}{
31007		"api-version": APIVersion,
31008	}
31009
31010	preparer := autorest.CreatePreparer(
31011		autorest.AsPost(),
31012		autorest.WithBaseURL(client.BaseURI),
31013		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run", pathParameters),
31014		autorest.WithQueryParameters(queryParameters))
31015	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31016}
31017
31018// RunTriggeredWebJobSlotSender sends the RunTriggeredWebJobSlot request. The method will close the
31019// http.Response Body if it receives an error.
31020func (client AppsClient) RunTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
31021	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31022}
31023
31024// RunTriggeredWebJobSlotResponder handles the response to the RunTriggeredWebJobSlot request. The method always
31025// closes the http.Response Body.
31026func (client AppsClient) RunTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31027	err = autorest.Respond(
31028		resp,
31029		azure.WithErrorUnlessStatusCode(http.StatusOK),
31030		autorest.ByClosing())
31031	result.Response = resp
31032	return
31033}
31034
31035// Start description for Starts an app (or deployment slot, if specified).
31036// Parameters:
31037// resourceGroupName - name of the resource group to which the resource belongs.
31038// name - name of the app.
31039func (client AppsClient) Start(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31040	if tracing.IsEnabled() {
31041		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Start")
31042		defer func() {
31043			sc := -1
31044			if result.Response != nil {
31045				sc = result.Response.StatusCode
31046			}
31047			tracing.EndSpan(ctx, sc, err)
31048		}()
31049	}
31050	if err := validation.Validate([]validation.Validation{
31051		{TargetValue: resourceGroupName,
31052			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31053				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31054				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31055		return result, validation.NewError("web.AppsClient", "Start", err.Error())
31056	}
31057
31058	req, err := client.StartPreparer(ctx, resourceGroupName, name)
31059	if err != nil {
31060		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", nil, "Failure preparing request")
31061		return
31062	}
31063
31064	resp, err := client.StartSender(req)
31065	if err != nil {
31066		result.Response = resp
31067		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", resp, "Failure sending request")
31068		return
31069	}
31070
31071	result, err = client.StartResponder(resp)
31072	if err != nil {
31073		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", resp, "Failure responding to request")
31074		return
31075	}
31076
31077	return
31078}
31079
31080// StartPreparer prepares the Start request.
31081func (client AppsClient) StartPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31082	pathParameters := map[string]interface{}{
31083		"name":              autorest.Encode("path", name),
31084		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31085		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31086	}
31087
31088	const APIVersion = "2021-01-15"
31089	queryParameters := map[string]interface{}{
31090		"api-version": APIVersion,
31091	}
31092
31093	preparer := autorest.CreatePreparer(
31094		autorest.AsPost(),
31095		autorest.WithBaseURL(client.BaseURI),
31096		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start", pathParameters),
31097		autorest.WithQueryParameters(queryParameters))
31098	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31099}
31100
31101// StartSender sends the Start request. The method will close the
31102// http.Response Body if it receives an error.
31103func (client AppsClient) StartSender(req *http.Request) (*http.Response, error) {
31104	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31105}
31106
31107// StartResponder handles the response to the Start request. The method always
31108// closes the http.Response Body.
31109func (client AppsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
31110	err = autorest.Respond(
31111		resp,
31112		azure.WithErrorUnlessStatusCode(http.StatusOK),
31113		autorest.ByClosing())
31114	result.Response = resp
31115	return
31116}
31117
31118// StartContinuousWebJob description for Start a continuous web job for an app, or a deployment slot.
31119// Parameters:
31120// resourceGroupName - name of the resource group to which the resource belongs.
31121// name - site name.
31122// webJobName - name of Web Job.
31123func (client AppsClient) StartContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
31124	if tracing.IsEnabled() {
31125		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartContinuousWebJob")
31126		defer func() {
31127			sc := -1
31128			if result.Response != nil {
31129				sc = result.Response.StatusCode
31130			}
31131			tracing.EndSpan(ctx, sc, err)
31132		}()
31133	}
31134	if err := validation.Validate([]validation.Validation{
31135		{TargetValue: resourceGroupName,
31136			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31137				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31138				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31139		return result, validation.NewError("web.AppsClient", "StartContinuousWebJob", err.Error())
31140	}
31141
31142	req, err := client.StartContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
31143	if err != nil {
31144		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", nil, "Failure preparing request")
31145		return
31146	}
31147
31148	resp, err := client.StartContinuousWebJobSender(req)
31149	if err != nil {
31150		result.Response = resp
31151		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure sending request")
31152		return
31153	}
31154
31155	result, err = client.StartContinuousWebJobResponder(resp)
31156	if err != nil {
31157		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure responding to request")
31158		return
31159	}
31160
31161	return
31162}
31163
31164// StartContinuousWebJobPreparer prepares the StartContinuousWebJob request.
31165func (client AppsClient) StartContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
31166	pathParameters := map[string]interface{}{
31167		"name":              autorest.Encode("path", name),
31168		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31169		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31170		"webJobName":        autorest.Encode("path", webJobName),
31171	}
31172
31173	const APIVersion = "2021-01-15"
31174	queryParameters := map[string]interface{}{
31175		"api-version": APIVersion,
31176	}
31177
31178	preparer := autorest.CreatePreparer(
31179		autorest.AsPost(),
31180		autorest.WithBaseURL(client.BaseURI),
31181		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start", pathParameters),
31182		autorest.WithQueryParameters(queryParameters))
31183	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31184}
31185
31186// StartContinuousWebJobSender sends the StartContinuousWebJob request. The method will close the
31187// http.Response Body if it receives an error.
31188func (client AppsClient) StartContinuousWebJobSender(req *http.Request) (*http.Response, error) {
31189	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31190}
31191
31192// StartContinuousWebJobResponder handles the response to the StartContinuousWebJob request. The method always
31193// closes the http.Response Body.
31194func (client AppsClient) StartContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
31195	err = autorest.Respond(
31196		resp,
31197		azure.WithErrorUnlessStatusCode(http.StatusOK),
31198		autorest.ByClosing())
31199	result.Response = resp
31200	return
31201}
31202
31203// StartContinuousWebJobSlot description for Start a continuous web job for an app, or a deployment slot.
31204// Parameters:
31205// resourceGroupName - name of the resource group to which the resource belongs.
31206// name - site name.
31207// webJobName - name of Web Job.
31208// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
31209// production slot.
31210func (client AppsClient) StartContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
31211	if tracing.IsEnabled() {
31212		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartContinuousWebJobSlot")
31213		defer func() {
31214			sc := -1
31215			if result.Response != nil {
31216				sc = result.Response.StatusCode
31217			}
31218			tracing.EndSpan(ctx, sc, err)
31219		}()
31220	}
31221	if err := validation.Validate([]validation.Validation{
31222		{TargetValue: resourceGroupName,
31223			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31224				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31225				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31226		return result, validation.NewError("web.AppsClient", "StartContinuousWebJobSlot", err.Error())
31227	}
31228
31229	req, err := client.StartContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
31230	if err != nil {
31231		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", nil, "Failure preparing request")
31232		return
31233	}
31234
31235	resp, err := client.StartContinuousWebJobSlotSender(req)
31236	if err != nil {
31237		result.Response = resp
31238		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure sending request")
31239		return
31240	}
31241
31242	result, err = client.StartContinuousWebJobSlotResponder(resp)
31243	if err != nil {
31244		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure responding to request")
31245		return
31246	}
31247
31248	return
31249}
31250
31251// StartContinuousWebJobSlotPreparer prepares the StartContinuousWebJobSlot request.
31252func (client AppsClient) StartContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
31253	pathParameters := map[string]interface{}{
31254		"name":              autorest.Encode("path", name),
31255		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31256		"slot":              autorest.Encode("path", slot),
31257		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31258		"webJobName":        autorest.Encode("path", webJobName),
31259	}
31260
31261	const APIVersion = "2021-01-15"
31262	queryParameters := map[string]interface{}{
31263		"api-version": APIVersion,
31264	}
31265
31266	preparer := autorest.CreatePreparer(
31267		autorest.AsPost(),
31268		autorest.WithBaseURL(client.BaseURI),
31269		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start", pathParameters),
31270		autorest.WithQueryParameters(queryParameters))
31271	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31272}
31273
31274// StartContinuousWebJobSlotSender sends the StartContinuousWebJobSlot request. The method will close the
31275// http.Response Body if it receives an error.
31276func (client AppsClient) StartContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
31277	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31278}
31279
31280// StartContinuousWebJobSlotResponder handles the response to the StartContinuousWebJobSlot request. The method always
31281// closes the http.Response Body.
31282func (client AppsClient) StartContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31283	err = autorest.Respond(
31284		resp,
31285		azure.WithErrorUnlessStatusCode(http.StatusOK),
31286		autorest.ByClosing())
31287	result.Response = resp
31288	return
31289}
31290
31291// StartNetworkTrace description for Start capturing network packets for the site.
31292// Parameters:
31293// resourceGroupName - name of the resource group to which the resource belongs.
31294// name - the name of the web app.
31295// durationInSeconds - the duration to keep capturing in seconds.
31296// maxFrameLength - the maximum frame length in bytes (Optional).
31297// sasURL - the Blob URL to store capture file.
31298func (client AppsClient) StartNetworkTrace(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartNetworkTraceFuture, err error) {
31299	if tracing.IsEnabled() {
31300		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartNetworkTrace")
31301		defer func() {
31302			sc := -1
31303			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
31304				sc = result.FutureAPI.Response().StatusCode
31305			}
31306			tracing.EndSpan(ctx, sc, err)
31307		}()
31308	}
31309	if err := validation.Validate([]validation.Validation{
31310		{TargetValue: resourceGroupName,
31311			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31312				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31313				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31314		return result, validation.NewError("web.AppsClient", "StartNetworkTrace", err.Error())
31315	}
31316
31317	req, err := client.StartNetworkTracePreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
31318	if err != nil {
31319		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTrace", nil, "Failure preparing request")
31320		return
31321	}
31322
31323	result, err = client.StartNetworkTraceSender(req)
31324	if err != nil {
31325		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTrace", nil, "Failure sending request")
31326		return
31327	}
31328
31329	return
31330}
31331
31332// StartNetworkTracePreparer prepares the StartNetworkTrace request.
31333func (client AppsClient) StartNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
31334	pathParameters := map[string]interface{}{
31335		"name":              autorest.Encode("path", name),
31336		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31337		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31338	}
31339
31340	const APIVersion = "2021-01-15"
31341	queryParameters := map[string]interface{}{
31342		"api-version": APIVersion,
31343	}
31344	if durationInSeconds != nil {
31345		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
31346	}
31347	if maxFrameLength != nil {
31348		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
31349	}
31350	if len(sasURL) > 0 {
31351		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
31352	}
31353
31354	preparer := autorest.CreatePreparer(
31355		autorest.AsPost(),
31356		autorest.WithBaseURL(client.BaseURI),
31357		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace", pathParameters),
31358		autorest.WithQueryParameters(queryParameters))
31359	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31360}
31361
31362// StartNetworkTraceSender sends the StartNetworkTrace request. The method will close the
31363// http.Response Body if it receives an error.
31364func (client AppsClient) StartNetworkTraceSender(req *http.Request) (future AppsStartNetworkTraceFuture, err error) {
31365	var resp *http.Response
31366	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
31367	if err != nil {
31368		return
31369	}
31370	var azf azure.Future
31371	azf, err = azure.NewFutureFromResponse(resp)
31372	future.FutureAPI = &azf
31373	future.Result = future.result
31374	return
31375}
31376
31377// StartNetworkTraceResponder handles the response to the StartNetworkTrace request. The method always
31378// closes the http.Response Body.
31379func (client AppsClient) StartNetworkTraceResponder(resp *http.Response) (result ListNetworkTrace, err error) {
31380	err = autorest.Respond(
31381		resp,
31382		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31383		autorest.ByUnmarshallingJSON(&result),
31384		autorest.ByClosing())
31385	result.Response = autorest.Response{Response: resp}
31386	return
31387}
31388
31389// StartNetworkTraceSlot description for Start capturing network packets for the site.
31390// Parameters:
31391// resourceGroupName - name of the resource group to which the resource belongs.
31392// name - the name of the web app.
31393// slot - the name of the slot for this web app.
31394// durationInSeconds - the duration to keep capturing in seconds.
31395// maxFrameLength - the maximum frame length in bytes (Optional).
31396// sasURL - the Blob URL to store capture file.
31397func (client AppsClient) StartNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartNetworkTraceSlotFuture, err error) {
31398	if tracing.IsEnabled() {
31399		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartNetworkTraceSlot")
31400		defer func() {
31401			sc := -1
31402			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
31403				sc = result.FutureAPI.Response().StatusCode
31404			}
31405			tracing.EndSpan(ctx, sc, err)
31406		}()
31407	}
31408	if err := validation.Validate([]validation.Validation{
31409		{TargetValue: resourceGroupName,
31410			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31411				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31412				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31413		return result, validation.NewError("web.AppsClient", "StartNetworkTraceSlot", err.Error())
31414	}
31415
31416	req, err := client.StartNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
31417	if err != nil {
31418		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTraceSlot", nil, "Failure preparing request")
31419		return
31420	}
31421
31422	result, err = client.StartNetworkTraceSlotSender(req)
31423	if err != nil {
31424		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTraceSlot", nil, "Failure sending request")
31425		return
31426	}
31427
31428	return
31429}
31430
31431// StartNetworkTraceSlotPreparer prepares the StartNetworkTraceSlot request.
31432func (client AppsClient) StartNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
31433	pathParameters := map[string]interface{}{
31434		"name":              autorest.Encode("path", name),
31435		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31436		"slot":              autorest.Encode("path", slot),
31437		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31438	}
31439
31440	const APIVersion = "2021-01-15"
31441	queryParameters := map[string]interface{}{
31442		"api-version": APIVersion,
31443	}
31444	if durationInSeconds != nil {
31445		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
31446	}
31447	if maxFrameLength != nil {
31448		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
31449	}
31450	if len(sasURL) > 0 {
31451		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
31452	}
31453
31454	preparer := autorest.CreatePreparer(
31455		autorest.AsPost(),
31456		autorest.WithBaseURL(client.BaseURI),
31457		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace", pathParameters),
31458		autorest.WithQueryParameters(queryParameters))
31459	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31460}
31461
31462// StartNetworkTraceSlotSender sends the StartNetworkTraceSlot request. The method will close the
31463// http.Response Body if it receives an error.
31464func (client AppsClient) StartNetworkTraceSlotSender(req *http.Request) (future AppsStartNetworkTraceSlotFuture, err error) {
31465	var resp *http.Response
31466	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
31467	if err != nil {
31468		return
31469	}
31470	var azf azure.Future
31471	azf, err = azure.NewFutureFromResponse(resp)
31472	future.FutureAPI = &azf
31473	future.Result = future.result
31474	return
31475}
31476
31477// StartNetworkTraceSlotResponder handles the response to the StartNetworkTraceSlot request. The method always
31478// closes the http.Response Body.
31479func (client AppsClient) StartNetworkTraceSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
31480	err = autorest.Respond(
31481		resp,
31482		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31483		autorest.ByUnmarshallingJSON(&result),
31484		autorest.ByClosing())
31485	result.Response = autorest.Response{Response: resp}
31486	return
31487}
31488
31489// StartSlot description for Starts an app (or deployment slot, if specified).
31490// Parameters:
31491// resourceGroupName - name of the resource group to which the resource belongs.
31492// name - name of the app.
31493// slot - name of the deployment slot. If a slot is not specified, the API will start the production slot.
31494func (client AppsClient) StartSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31495	if tracing.IsEnabled() {
31496		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartSlot")
31497		defer func() {
31498			sc := -1
31499			if result.Response != nil {
31500				sc = result.Response.StatusCode
31501			}
31502			tracing.EndSpan(ctx, sc, err)
31503		}()
31504	}
31505	if err := validation.Validate([]validation.Validation{
31506		{TargetValue: resourceGroupName,
31507			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31508				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31509				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31510		return result, validation.NewError("web.AppsClient", "StartSlot", err.Error())
31511	}
31512
31513	req, err := client.StartSlotPreparer(ctx, resourceGroupName, name, slot)
31514	if err != nil {
31515		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", nil, "Failure preparing request")
31516		return
31517	}
31518
31519	resp, err := client.StartSlotSender(req)
31520	if err != nil {
31521		result.Response = resp
31522		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", resp, "Failure sending request")
31523		return
31524	}
31525
31526	result, err = client.StartSlotResponder(resp)
31527	if err != nil {
31528		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", resp, "Failure responding to request")
31529		return
31530	}
31531
31532	return
31533}
31534
31535// StartSlotPreparer prepares the StartSlot request.
31536func (client AppsClient) StartSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
31537	pathParameters := map[string]interface{}{
31538		"name":              autorest.Encode("path", name),
31539		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31540		"slot":              autorest.Encode("path", slot),
31541		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31542	}
31543
31544	const APIVersion = "2021-01-15"
31545	queryParameters := map[string]interface{}{
31546		"api-version": APIVersion,
31547	}
31548
31549	preparer := autorest.CreatePreparer(
31550		autorest.AsPost(),
31551		autorest.WithBaseURL(client.BaseURI),
31552		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start", pathParameters),
31553		autorest.WithQueryParameters(queryParameters))
31554	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31555}
31556
31557// StartSlotSender sends the StartSlot request. The method will close the
31558// http.Response Body if it receives an error.
31559func (client AppsClient) StartSlotSender(req *http.Request) (*http.Response, error) {
31560	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31561}
31562
31563// StartSlotResponder handles the response to the StartSlot request. The method always
31564// closes the http.Response Body.
31565func (client AppsClient) StartSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31566	err = autorest.Respond(
31567		resp,
31568		azure.WithErrorUnlessStatusCode(http.StatusOK),
31569		autorest.ByClosing())
31570	result.Response = resp
31571	return
31572}
31573
31574// StartWebSiteNetworkTrace description for Start capturing network packets for the site (To be deprecated).
31575// Parameters:
31576// resourceGroupName - name of the resource group to which the resource belongs.
31577// name - the name of the web app.
31578// durationInSeconds - the duration to keep capturing in seconds.
31579// maxFrameLength - the maximum frame length in bytes (Optional).
31580// sasURL - the Blob URL to store capture file.
31581func (client AppsClient) StartWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) {
31582	if tracing.IsEnabled() {
31583		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTrace")
31584		defer func() {
31585			sc := -1
31586			if result.Response.Response != nil {
31587				sc = result.Response.Response.StatusCode
31588			}
31589			tracing.EndSpan(ctx, sc, err)
31590		}()
31591	}
31592	if err := validation.Validate([]validation.Validation{
31593		{TargetValue: resourceGroupName,
31594			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31595				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31596				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31597		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTrace", err.Error())
31598	}
31599
31600	req, err := client.StartWebSiteNetworkTracePreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
31601	if err != nil {
31602		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", nil, "Failure preparing request")
31603		return
31604	}
31605
31606	resp, err := client.StartWebSiteNetworkTraceSender(req)
31607	if err != nil {
31608		result.Response = autorest.Response{Response: resp}
31609		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", resp, "Failure sending request")
31610		return
31611	}
31612
31613	result, err = client.StartWebSiteNetworkTraceResponder(resp)
31614	if err != nil {
31615		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", resp, "Failure responding to request")
31616		return
31617	}
31618
31619	return
31620}
31621
31622// StartWebSiteNetworkTracePreparer prepares the StartWebSiteNetworkTrace request.
31623func (client AppsClient) StartWebSiteNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
31624	pathParameters := map[string]interface{}{
31625		"name":              autorest.Encode("path", name),
31626		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31627		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31628	}
31629
31630	const APIVersion = "2021-01-15"
31631	queryParameters := map[string]interface{}{
31632		"api-version": APIVersion,
31633	}
31634	if durationInSeconds != nil {
31635		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
31636	}
31637	if maxFrameLength != nil {
31638		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
31639	}
31640	if len(sasURL) > 0 {
31641		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
31642	}
31643
31644	preparer := autorest.CreatePreparer(
31645		autorest.AsPost(),
31646		autorest.WithBaseURL(client.BaseURI),
31647		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start", pathParameters),
31648		autorest.WithQueryParameters(queryParameters))
31649	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31650}
31651
31652// StartWebSiteNetworkTraceSender sends the StartWebSiteNetworkTrace request. The method will close the
31653// http.Response Body if it receives an error.
31654func (client AppsClient) StartWebSiteNetworkTraceSender(req *http.Request) (*http.Response, error) {
31655	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31656}
31657
31658// StartWebSiteNetworkTraceResponder handles the response to the StartWebSiteNetworkTrace request. The method always
31659// closes the http.Response Body.
31660func (client AppsClient) StartWebSiteNetworkTraceResponder(resp *http.Response) (result String, err error) {
31661	err = autorest.Respond(
31662		resp,
31663		azure.WithErrorUnlessStatusCode(http.StatusOK),
31664		autorest.ByUnmarshallingJSON(&result.Value),
31665		autorest.ByClosing())
31666	result.Response = autorest.Response{Response: resp}
31667	return
31668}
31669
31670// StartWebSiteNetworkTraceOperation description for Start capturing network packets for the site.
31671// Parameters:
31672// resourceGroupName - name of the resource group to which the resource belongs.
31673// name - the name of the web app.
31674// durationInSeconds - the duration to keep capturing in seconds.
31675// maxFrameLength - the maximum frame length in bytes (Optional).
31676// sasURL - the Blob URL to store capture file.
31677func (client AppsClient) StartWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartWebSiteNetworkTraceOperationFuture, err error) {
31678	if tracing.IsEnabled() {
31679		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceOperation")
31680		defer func() {
31681			sc := -1
31682			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
31683				sc = result.FutureAPI.Response().StatusCode
31684			}
31685			tracing.EndSpan(ctx, sc, err)
31686		}()
31687	}
31688	if err := validation.Validate([]validation.Validation{
31689		{TargetValue: resourceGroupName,
31690			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31691				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31692				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31693		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceOperation", err.Error())
31694	}
31695
31696	req, err := client.StartWebSiteNetworkTraceOperationPreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
31697	if err != nil {
31698		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperation", nil, "Failure preparing request")
31699		return
31700	}
31701
31702	result, err = client.StartWebSiteNetworkTraceOperationSender(req)
31703	if err != nil {
31704		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperation", nil, "Failure sending request")
31705		return
31706	}
31707
31708	return
31709}
31710
31711// StartWebSiteNetworkTraceOperationPreparer prepares the StartWebSiteNetworkTraceOperation request.
31712func (client AppsClient) StartWebSiteNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
31713	pathParameters := map[string]interface{}{
31714		"name":              autorest.Encode("path", name),
31715		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31716		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31717	}
31718
31719	const APIVersion = "2021-01-15"
31720	queryParameters := map[string]interface{}{
31721		"api-version": APIVersion,
31722	}
31723	if durationInSeconds != nil {
31724		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
31725	}
31726	if maxFrameLength != nil {
31727		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
31728	}
31729	if len(sasURL) > 0 {
31730		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
31731	}
31732
31733	preparer := autorest.CreatePreparer(
31734		autorest.AsPost(),
31735		autorest.WithBaseURL(client.BaseURI),
31736		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation", pathParameters),
31737		autorest.WithQueryParameters(queryParameters))
31738	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31739}
31740
31741// StartWebSiteNetworkTraceOperationSender sends the StartWebSiteNetworkTraceOperation request. The method will close the
31742// http.Response Body if it receives an error.
31743func (client AppsClient) StartWebSiteNetworkTraceOperationSender(req *http.Request) (future AppsStartWebSiteNetworkTraceOperationFuture, err error) {
31744	var resp *http.Response
31745	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
31746	if err != nil {
31747		return
31748	}
31749	var azf azure.Future
31750	azf, err = azure.NewFutureFromResponse(resp)
31751	future.FutureAPI = &azf
31752	future.Result = future.result
31753	return
31754}
31755
31756// StartWebSiteNetworkTraceOperationResponder handles the response to the StartWebSiteNetworkTraceOperation request. The method always
31757// closes the http.Response Body.
31758func (client AppsClient) StartWebSiteNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) {
31759	err = autorest.Respond(
31760		resp,
31761		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31762		autorest.ByUnmarshallingJSON(&result),
31763		autorest.ByClosing())
31764	result.Response = autorest.Response{Response: resp}
31765	return
31766}
31767
31768// StartWebSiteNetworkTraceOperationSlot description for Start capturing network packets for the site.
31769// Parameters:
31770// resourceGroupName - name of the resource group to which the resource belongs.
31771// name - the name of the web app.
31772// slot - the name of the slot for this web app.
31773// durationInSeconds - the duration to keep capturing in seconds.
31774// maxFrameLength - the maximum frame length in bytes (Optional).
31775// sasURL - the Blob URL to store capture file.
31776func (client AppsClient) StartWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartWebSiteNetworkTraceOperationSlotFuture, err error) {
31777	if tracing.IsEnabled() {
31778		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceOperationSlot")
31779		defer func() {
31780			sc := -1
31781			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
31782				sc = result.FutureAPI.Response().StatusCode
31783			}
31784			tracing.EndSpan(ctx, sc, err)
31785		}()
31786	}
31787	if err := validation.Validate([]validation.Validation{
31788		{TargetValue: resourceGroupName,
31789			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31790				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31791				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31792		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", err.Error())
31793	}
31794
31795	req, err := client.StartWebSiteNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
31796	if err != nil {
31797		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", nil, "Failure preparing request")
31798		return
31799	}
31800
31801	result, err = client.StartWebSiteNetworkTraceOperationSlotSender(req)
31802	if err != nil {
31803		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", nil, "Failure sending request")
31804		return
31805	}
31806
31807	return
31808}
31809
31810// StartWebSiteNetworkTraceOperationSlotPreparer prepares the StartWebSiteNetworkTraceOperationSlot request.
31811func (client AppsClient) StartWebSiteNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
31812	pathParameters := map[string]interface{}{
31813		"name":              autorest.Encode("path", name),
31814		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31815		"slot":              autorest.Encode("path", slot),
31816		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31817	}
31818
31819	const APIVersion = "2021-01-15"
31820	queryParameters := map[string]interface{}{
31821		"api-version": APIVersion,
31822	}
31823	if durationInSeconds != nil {
31824		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
31825	}
31826	if maxFrameLength != nil {
31827		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
31828	}
31829	if len(sasURL) > 0 {
31830		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
31831	}
31832
31833	preparer := autorest.CreatePreparer(
31834		autorest.AsPost(),
31835		autorest.WithBaseURL(client.BaseURI),
31836		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation", pathParameters),
31837		autorest.WithQueryParameters(queryParameters))
31838	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31839}
31840
31841// StartWebSiteNetworkTraceOperationSlotSender sends the StartWebSiteNetworkTraceOperationSlot request. The method will close the
31842// http.Response Body if it receives an error.
31843func (client AppsClient) StartWebSiteNetworkTraceOperationSlotSender(req *http.Request) (future AppsStartWebSiteNetworkTraceOperationSlotFuture, err error) {
31844	var resp *http.Response
31845	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
31846	if err != nil {
31847		return
31848	}
31849	var azf azure.Future
31850	azf, err = azure.NewFutureFromResponse(resp)
31851	future.FutureAPI = &azf
31852	future.Result = future.result
31853	return
31854}
31855
31856// StartWebSiteNetworkTraceOperationSlotResponder handles the response to the StartWebSiteNetworkTraceOperationSlot request. The method always
31857// closes the http.Response Body.
31858func (client AppsClient) StartWebSiteNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
31859	err = autorest.Respond(
31860		resp,
31861		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31862		autorest.ByUnmarshallingJSON(&result),
31863		autorest.ByClosing())
31864	result.Response = autorest.Response{Response: resp}
31865	return
31866}
31867
31868// StartWebSiteNetworkTraceSlot description for Start capturing network packets for the site (To be deprecated).
31869// Parameters:
31870// resourceGroupName - name of the resource group to which the resource belongs.
31871// name - the name of the web app.
31872// slot - the name of the slot for this web app.
31873// durationInSeconds - the duration to keep capturing in seconds.
31874// maxFrameLength - the maximum frame length in bytes (Optional).
31875// sasURL - the Blob URL to store capture file.
31876func (client AppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) {
31877	if tracing.IsEnabled() {
31878		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceSlot")
31879		defer func() {
31880			sc := -1
31881			if result.Response.Response != nil {
31882				sc = result.Response.Response.StatusCode
31883			}
31884			tracing.EndSpan(ctx, sc, err)
31885		}()
31886	}
31887	if err := validation.Validate([]validation.Validation{
31888		{TargetValue: resourceGroupName,
31889			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31890				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31891				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31892		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceSlot", err.Error())
31893	}
31894
31895	req, err := client.StartWebSiteNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
31896	if err != nil {
31897		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", nil, "Failure preparing request")
31898		return
31899	}
31900
31901	resp, err := client.StartWebSiteNetworkTraceSlotSender(req)
31902	if err != nil {
31903		result.Response = autorest.Response{Response: resp}
31904		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", resp, "Failure sending request")
31905		return
31906	}
31907
31908	result, err = client.StartWebSiteNetworkTraceSlotResponder(resp)
31909	if err != nil {
31910		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", resp, "Failure responding to request")
31911		return
31912	}
31913
31914	return
31915}
31916
31917// StartWebSiteNetworkTraceSlotPreparer prepares the StartWebSiteNetworkTraceSlot request.
31918func (client AppsClient) StartWebSiteNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
31919	pathParameters := map[string]interface{}{
31920		"name":              autorest.Encode("path", name),
31921		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31922		"slot":              autorest.Encode("path", slot),
31923		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31924	}
31925
31926	const APIVersion = "2021-01-15"
31927	queryParameters := map[string]interface{}{
31928		"api-version": APIVersion,
31929	}
31930	if durationInSeconds != nil {
31931		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
31932	}
31933	if maxFrameLength != nil {
31934		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
31935	}
31936	if len(sasURL) > 0 {
31937		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
31938	}
31939
31940	preparer := autorest.CreatePreparer(
31941		autorest.AsPost(),
31942		autorest.WithBaseURL(client.BaseURI),
31943		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start", pathParameters),
31944		autorest.WithQueryParameters(queryParameters))
31945	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31946}
31947
31948// StartWebSiteNetworkTraceSlotSender sends the StartWebSiteNetworkTraceSlot request. The method will close the
31949// http.Response Body if it receives an error.
31950func (client AppsClient) StartWebSiteNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
31951	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31952}
31953
31954// StartWebSiteNetworkTraceSlotResponder handles the response to the StartWebSiteNetworkTraceSlot request. The method always
31955// closes the http.Response Body.
31956func (client AppsClient) StartWebSiteNetworkTraceSlotResponder(resp *http.Response) (result String, err error) {
31957	err = autorest.Respond(
31958		resp,
31959		azure.WithErrorUnlessStatusCode(http.StatusOK),
31960		autorest.ByUnmarshallingJSON(&result.Value),
31961		autorest.ByClosing())
31962	result.Response = autorest.Response{Response: resp}
31963	return
31964}
31965
31966// Stop description for Stops an app (or deployment slot, if specified).
31967// Parameters:
31968// resourceGroupName - name of the resource group to which the resource belongs.
31969// name - name of the app.
31970func (client AppsClient) Stop(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31971	if tracing.IsEnabled() {
31972		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Stop")
31973		defer func() {
31974			sc := -1
31975			if result.Response != nil {
31976				sc = result.Response.StatusCode
31977			}
31978			tracing.EndSpan(ctx, sc, err)
31979		}()
31980	}
31981	if err := validation.Validate([]validation.Validation{
31982		{TargetValue: resourceGroupName,
31983			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31984				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31985				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31986		return result, validation.NewError("web.AppsClient", "Stop", err.Error())
31987	}
31988
31989	req, err := client.StopPreparer(ctx, resourceGroupName, name)
31990	if err != nil {
31991		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", nil, "Failure preparing request")
31992		return
31993	}
31994
31995	resp, err := client.StopSender(req)
31996	if err != nil {
31997		result.Response = resp
31998		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", resp, "Failure sending request")
31999		return
32000	}
32001
32002	result, err = client.StopResponder(resp)
32003	if err != nil {
32004		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", resp, "Failure responding to request")
32005		return
32006	}
32007
32008	return
32009}
32010
32011// StopPreparer prepares the Stop request.
32012func (client AppsClient) StopPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
32013	pathParameters := map[string]interface{}{
32014		"name":              autorest.Encode("path", name),
32015		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32016		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32017	}
32018
32019	const APIVersion = "2021-01-15"
32020	queryParameters := map[string]interface{}{
32021		"api-version": APIVersion,
32022	}
32023
32024	preparer := autorest.CreatePreparer(
32025		autorest.AsPost(),
32026		autorest.WithBaseURL(client.BaseURI),
32027		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop", pathParameters),
32028		autorest.WithQueryParameters(queryParameters))
32029	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32030}
32031
32032// StopSender sends the Stop request. The method will close the
32033// http.Response Body if it receives an error.
32034func (client AppsClient) StopSender(req *http.Request) (*http.Response, error) {
32035	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32036}
32037
32038// StopResponder handles the response to the Stop request. The method always
32039// closes the http.Response Body.
32040func (client AppsClient) StopResponder(resp *http.Response) (result autorest.Response, err error) {
32041	err = autorest.Respond(
32042		resp,
32043		azure.WithErrorUnlessStatusCode(http.StatusOK),
32044		autorest.ByClosing())
32045	result.Response = resp
32046	return
32047}
32048
32049// StopContinuousWebJob description for Stop a continuous web job for an app, or a deployment slot.
32050// Parameters:
32051// resourceGroupName - name of the resource group to which the resource belongs.
32052// name - site name.
32053// webJobName - name of Web Job.
32054func (client AppsClient) StopContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
32055	if tracing.IsEnabled() {
32056		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopContinuousWebJob")
32057		defer func() {
32058			sc := -1
32059			if result.Response != nil {
32060				sc = result.Response.StatusCode
32061			}
32062			tracing.EndSpan(ctx, sc, err)
32063		}()
32064	}
32065	if err := validation.Validate([]validation.Validation{
32066		{TargetValue: resourceGroupName,
32067			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32068				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32069				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32070		return result, validation.NewError("web.AppsClient", "StopContinuousWebJob", err.Error())
32071	}
32072
32073	req, err := client.StopContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
32074	if err != nil {
32075		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", nil, "Failure preparing request")
32076		return
32077	}
32078
32079	resp, err := client.StopContinuousWebJobSender(req)
32080	if err != nil {
32081		result.Response = resp
32082		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure sending request")
32083		return
32084	}
32085
32086	result, err = client.StopContinuousWebJobResponder(resp)
32087	if err != nil {
32088		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure responding to request")
32089		return
32090	}
32091
32092	return
32093}
32094
32095// StopContinuousWebJobPreparer prepares the StopContinuousWebJob request.
32096func (client AppsClient) StopContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
32097	pathParameters := map[string]interface{}{
32098		"name":              autorest.Encode("path", name),
32099		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32100		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32101		"webJobName":        autorest.Encode("path", webJobName),
32102	}
32103
32104	const APIVersion = "2021-01-15"
32105	queryParameters := map[string]interface{}{
32106		"api-version": APIVersion,
32107	}
32108
32109	preparer := autorest.CreatePreparer(
32110		autorest.AsPost(),
32111		autorest.WithBaseURL(client.BaseURI),
32112		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop", pathParameters),
32113		autorest.WithQueryParameters(queryParameters))
32114	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32115}
32116
32117// StopContinuousWebJobSender sends the StopContinuousWebJob request. The method will close the
32118// http.Response Body if it receives an error.
32119func (client AppsClient) StopContinuousWebJobSender(req *http.Request) (*http.Response, error) {
32120	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32121}
32122
32123// StopContinuousWebJobResponder handles the response to the StopContinuousWebJob request. The method always
32124// closes the http.Response Body.
32125func (client AppsClient) StopContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
32126	err = autorest.Respond(
32127		resp,
32128		azure.WithErrorUnlessStatusCode(http.StatusOK),
32129		autorest.ByClosing())
32130	result.Response = resp
32131	return
32132}
32133
32134// StopContinuousWebJobSlot description for Stop a continuous web job for an app, or a deployment slot.
32135// Parameters:
32136// resourceGroupName - name of the resource group to which the resource belongs.
32137// name - site name.
32138// webJobName - name of Web Job.
32139// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
32140// production slot.
32141func (client AppsClient) StopContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
32142	if tracing.IsEnabled() {
32143		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopContinuousWebJobSlot")
32144		defer func() {
32145			sc := -1
32146			if result.Response != nil {
32147				sc = result.Response.StatusCode
32148			}
32149			tracing.EndSpan(ctx, sc, err)
32150		}()
32151	}
32152	if err := validation.Validate([]validation.Validation{
32153		{TargetValue: resourceGroupName,
32154			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32155				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32156				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32157		return result, validation.NewError("web.AppsClient", "StopContinuousWebJobSlot", err.Error())
32158	}
32159
32160	req, err := client.StopContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
32161	if err != nil {
32162		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", nil, "Failure preparing request")
32163		return
32164	}
32165
32166	resp, err := client.StopContinuousWebJobSlotSender(req)
32167	if err != nil {
32168		result.Response = resp
32169		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure sending request")
32170		return
32171	}
32172
32173	result, err = client.StopContinuousWebJobSlotResponder(resp)
32174	if err != nil {
32175		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure responding to request")
32176		return
32177	}
32178
32179	return
32180}
32181
32182// StopContinuousWebJobSlotPreparer prepares the StopContinuousWebJobSlot request.
32183func (client AppsClient) StopContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
32184	pathParameters := map[string]interface{}{
32185		"name":              autorest.Encode("path", name),
32186		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32187		"slot":              autorest.Encode("path", slot),
32188		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32189		"webJobName":        autorest.Encode("path", webJobName),
32190	}
32191
32192	const APIVersion = "2021-01-15"
32193	queryParameters := map[string]interface{}{
32194		"api-version": APIVersion,
32195	}
32196
32197	preparer := autorest.CreatePreparer(
32198		autorest.AsPost(),
32199		autorest.WithBaseURL(client.BaseURI),
32200		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop", pathParameters),
32201		autorest.WithQueryParameters(queryParameters))
32202	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32203}
32204
32205// StopContinuousWebJobSlotSender sends the StopContinuousWebJobSlot request. The method will close the
32206// http.Response Body if it receives an error.
32207func (client AppsClient) StopContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
32208	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32209}
32210
32211// StopContinuousWebJobSlotResponder handles the response to the StopContinuousWebJobSlot request. The method always
32212// closes the http.Response Body.
32213func (client AppsClient) StopContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32214	err = autorest.Respond(
32215		resp,
32216		azure.WithErrorUnlessStatusCode(http.StatusOK),
32217		autorest.ByClosing())
32218	result.Response = resp
32219	return
32220}
32221
32222// StopNetworkTrace description for Stop ongoing capturing network packets for the site.
32223// Parameters:
32224// resourceGroupName - name of the resource group to which the resource belongs.
32225// name - the name of the web app.
32226func (client AppsClient) StopNetworkTrace(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
32227	if tracing.IsEnabled() {
32228		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopNetworkTrace")
32229		defer func() {
32230			sc := -1
32231			if result.Response != nil {
32232				sc = result.Response.StatusCode
32233			}
32234			tracing.EndSpan(ctx, sc, err)
32235		}()
32236	}
32237	if err := validation.Validate([]validation.Validation{
32238		{TargetValue: resourceGroupName,
32239			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32240				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32241				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32242		return result, validation.NewError("web.AppsClient", "StopNetworkTrace", err.Error())
32243	}
32244
32245	req, err := client.StopNetworkTracePreparer(ctx, resourceGroupName, name)
32246	if err != nil {
32247		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", nil, "Failure preparing request")
32248		return
32249	}
32250
32251	resp, err := client.StopNetworkTraceSender(req)
32252	if err != nil {
32253		result.Response = resp
32254		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", resp, "Failure sending request")
32255		return
32256	}
32257
32258	result, err = client.StopNetworkTraceResponder(resp)
32259	if err != nil {
32260		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", resp, "Failure responding to request")
32261		return
32262	}
32263
32264	return
32265}
32266
32267// StopNetworkTracePreparer prepares the StopNetworkTrace request.
32268func (client AppsClient) StopNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
32269	pathParameters := map[string]interface{}{
32270		"name":              autorest.Encode("path", name),
32271		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32272		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32273	}
32274
32275	const APIVersion = "2021-01-15"
32276	queryParameters := map[string]interface{}{
32277		"api-version": APIVersion,
32278	}
32279
32280	preparer := autorest.CreatePreparer(
32281		autorest.AsPost(),
32282		autorest.WithBaseURL(client.BaseURI),
32283		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace", pathParameters),
32284		autorest.WithQueryParameters(queryParameters))
32285	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32286}
32287
32288// StopNetworkTraceSender sends the StopNetworkTrace request. The method will close the
32289// http.Response Body if it receives an error.
32290func (client AppsClient) StopNetworkTraceSender(req *http.Request) (*http.Response, error) {
32291	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32292}
32293
32294// StopNetworkTraceResponder handles the response to the StopNetworkTrace request. The method always
32295// closes the http.Response Body.
32296func (client AppsClient) StopNetworkTraceResponder(resp *http.Response) (result autorest.Response, err error) {
32297	err = autorest.Respond(
32298		resp,
32299		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32300		autorest.ByClosing())
32301	result.Response = resp
32302	return
32303}
32304
32305// StopNetworkTraceSlot description for Stop ongoing capturing network packets for the site.
32306// Parameters:
32307// resourceGroupName - name of the resource group to which the resource belongs.
32308// name - the name of the web app.
32309// slot - the name of the slot for this web app.
32310func (client AppsClient) StopNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
32311	if tracing.IsEnabled() {
32312		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopNetworkTraceSlot")
32313		defer func() {
32314			sc := -1
32315			if result.Response != nil {
32316				sc = result.Response.StatusCode
32317			}
32318			tracing.EndSpan(ctx, sc, err)
32319		}()
32320	}
32321	if err := validation.Validate([]validation.Validation{
32322		{TargetValue: resourceGroupName,
32323			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32324				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32325				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32326		return result, validation.NewError("web.AppsClient", "StopNetworkTraceSlot", err.Error())
32327	}
32328
32329	req, err := client.StopNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot)
32330	if err != nil {
32331		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", nil, "Failure preparing request")
32332		return
32333	}
32334
32335	resp, err := client.StopNetworkTraceSlotSender(req)
32336	if err != nil {
32337		result.Response = resp
32338		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", resp, "Failure sending request")
32339		return
32340	}
32341
32342	result, err = client.StopNetworkTraceSlotResponder(resp)
32343	if err != nil {
32344		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", resp, "Failure responding to request")
32345		return
32346	}
32347
32348	return
32349}
32350
32351// StopNetworkTraceSlotPreparer prepares the StopNetworkTraceSlot request.
32352func (client AppsClient) StopNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32353	pathParameters := map[string]interface{}{
32354		"name":              autorest.Encode("path", name),
32355		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32356		"slot":              autorest.Encode("path", slot),
32357		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32358	}
32359
32360	const APIVersion = "2021-01-15"
32361	queryParameters := map[string]interface{}{
32362		"api-version": APIVersion,
32363	}
32364
32365	preparer := autorest.CreatePreparer(
32366		autorest.AsPost(),
32367		autorest.WithBaseURL(client.BaseURI),
32368		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace", pathParameters),
32369		autorest.WithQueryParameters(queryParameters))
32370	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32371}
32372
32373// StopNetworkTraceSlotSender sends the StopNetworkTraceSlot request. The method will close the
32374// http.Response Body if it receives an error.
32375func (client AppsClient) StopNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
32376	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32377}
32378
32379// StopNetworkTraceSlotResponder handles the response to the StopNetworkTraceSlot request. The method always
32380// closes the http.Response Body.
32381func (client AppsClient) StopNetworkTraceSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32382	err = autorest.Respond(
32383		resp,
32384		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32385		autorest.ByClosing())
32386	result.Response = resp
32387	return
32388}
32389
32390// StopSlot description for Stops an app (or deployment slot, if specified).
32391// Parameters:
32392// resourceGroupName - name of the resource group to which the resource belongs.
32393// name - name of the app.
32394// slot - name of the deployment slot. If a slot is not specified, the API will stop the production slot.
32395func (client AppsClient) StopSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
32396	if tracing.IsEnabled() {
32397		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopSlot")
32398		defer func() {
32399			sc := -1
32400			if result.Response != nil {
32401				sc = result.Response.StatusCode
32402			}
32403			tracing.EndSpan(ctx, sc, err)
32404		}()
32405	}
32406	if err := validation.Validate([]validation.Validation{
32407		{TargetValue: resourceGroupName,
32408			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32409				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32410				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32411		return result, validation.NewError("web.AppsClient", "StopSlot", err.Error())
32412	}
32413
32414	req, err := client.StopSlotPreparer(ctx, resourceGroupName, name, slot)
32415	if err != nil {
32416		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", nil, "Failure preparing request")
32417		return
32418	}
32419
32420	resp, err := client.StopSlotSender(req)
32421	if err != nil {
32422		result.Response = resp
32423		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", resp, "Failure sending request")
32424		return
32425	}
32426
32427	result, err = client.StopSlotResponder(resp)
32428	if err != nil {
32429		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", resp, "Failure responding to request")
32430		return
32431	}
32432
32433	return
32434}
32435
32436// StopSlotPreparer prepares the StopSlot request.
32437func (client AppsClient) StopSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32438	pathParameters := map[string]interface{}{
32439		"name":              autorest.Encode("path", name),
32440		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32441		"slot":              autorest.Encode("path", slot),
32442		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32443	}
32444
32445	const APIVersion = "2021-01-15"
32446	queryParameters := map[string]interface{}{
32447		"api-version": APIVersion,
32448	}
32449
32450	preparer := autorest.CreatePreparer(
32451		autorest.AsPost(),
32452		autorest.WithBaseURL(client.BaseURI),
32453		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop", pathParameters),
32454		autorest.WithQueryParameters(queryParameters))
32455	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32456}
32457
32458// StopSlotSender sends the StopSlot request. The method will close the
32459// http.Response Body if it receives an error.
32460func (client AppsClient) StopSlotSender(req *http.Request) (*http.Response, error) {
32461	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32462}
32463
32464// StopSlotResponder handles the response to the StopSlot request. The method always
32465// closes the http.Response Body.
32466func (client AppsClient) StopSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32467	err = autorest.Respond(
32468		resp,
32469		azure.WithErrorUnlessStatusCode(http.StatusOK),
32470		autorest.ByClosing())
32471	result.Response = resp
32472	return
32473}
32474
32475// StopWebSiteNetworkTrace description for Stop ongoing capturing network packets for the site.
32476// Parameters:
32477// resourceGroupName - name of the resource group to which the resource belongs.
32478// name - the name of the web app.
32479func (client AppsClient) StopWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
32480	if tracing.IsEnabled() {
32481		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopWebSiteNetworkTrace")
32482		defer func() {
32483			sc := -1
32484			if result.Response != nil {
32485				sc = result.Response.StatusCode
32486			}
32487			tracing.EndSpan(ctx, sc, err)
32488		}()
32489	}
32490	if err := validation.Validate([]validation.Validation{
32491		{TargetValue: resourceGroupName,
32492			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32493				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32494				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32495		return result, validation.NewError("web.AppsClient", "StopWebSiteNetworkTrace", err.Error())
32496	}
32497
32498	req, err := client.StopWebSiteNetworkTracePreparer(ctx, resourceGroupName, name)
32499	if err != nil {
32500		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", nil, "Failure preparing request")
32501		return
32502	}
32503
32504	resp, err := client.StopWebSiteNetworkTraceSender(req)
32505	if err != nil {
32506		result.Response = resp
32507		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", resp, "Failure sending request")
32508		return
32509	}
32510
32511	result, err = client.StopWebSiteNetworkTraceResponder(resp)
32512	if err != nil {
32513		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", resp, "Failure responding to request")
32514		return
32515	}
32516
32517	return
32518}
32519
32520// StopWebSiteNetworkTracePreparer prepares the StopWebSiteNetworkTrace request.
32521func (client AppsClient) StopWebSiteNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
32522	pathParameters := map[string]interface{}{
32523		"name":              autorest.Encode("path", name),
32524		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32525		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32526	}
32527
32528	const APIVersion = "2021-01-15"
32529	queryParameters := map[string]interface{}{
32530		"api-version": APIVersion,
32531	}
32532
32533	preparer := autorest.CreatePreparer(
32534		autorest.AsPost(),
32535		autorest.WithBaseURL(client.BaseURI),
32536		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop", pathParameters),
32537		autorest.WithQueryParameters(queryParameters))
32538	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32539}
32540
32541// StopWebSiteNetworkTraceSender sends the StopWebSiteNetworkTrace request. The method will close the
32542// http.Response Body if it receives an error.
32543func (client AppsClient) StopWebSiteNetworkTraceSender(req *http.Request) (*http.Response, error) {
32544	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32545}
32546
32547// StopWebSiteNetworkTraceResponder handles the response to the StopWebSiteNetworkTrace request. The method always
32548// closes the http.Response Body.
32549func (client AppsClient) StopWebSiteNetworkTraceResponder(resp *http.Response) (result autorest.Response, err error) {
32550	err = autorest.Respond(
32551		resp,
32552		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32553		autorest.ByClosing())
32554	result.Response = resp
32555	return
32556}
32557
32558// StopWebSiteNetworkTraceSlot description for Stop ongoing capturing network packets for the site.
32559// Parameters:
32560// resourceGroupName - name of the resource group to which the resource belongs.
32561// name - the name of the web app.
32562// slot - the name of the slot for this web app.
32563func (client AppsClient) StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
32564	if tracing.IsEnabled() {
32565		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopWebSiteNetworkTraceSlot")
32566		defer func() {
32567			sc := -1
32568			if result.Response != nil {
32569				sc = result.Response.StatusCode
32570			}
32571			tracing.EndSpan(ctx, sc, err)
32572		}()
32573	}
32574	if err := validation.Validate([]validation.Validation{
32575		{TargetValue: resourceGroupName,
32576			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32577				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32578				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32579		return result, validation.NewError("web.AppsClient", "StopWebSiteNetworkTraceSlot", err.Error())
32580	}
32581
32582	req, err := client.StopWebSiteNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot)
32583	if err != nil {
32584		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", nil, "Failure preparing request")
32585		return
32586	}
32587
32588	resp, err := client.StopWebSiteNetworkTraceSlotSender(req)
32589	if err != nil {
32590		result.Response = resp
32591		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", resp, "Failure sending request")
32592		return
32593	}
32594
32595	result, err = client.StopWebSiteNetworkTraceSlotResponder(resp)
32596	if err != nil {
32597		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", resp, "Failure responding to request")
32598		return
32599	}
32600
32601	return
32602}
32603
32604// StopWebSiteNetworkTraceSlotPreparer prepares the StopWebSiteNetworkTraceSlot request.
32605func (client AppsClient) StopWebSiteNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32606	pathParameters := map[string]interface{}{
32607		"name":              autorest.Encode("path", name),
32608		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32609		"slot":              autorest.Encode("path", slot),
32610		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32611	}
32612
32613	const APIVersion = "2021-01-15"
32614	queryParameters := map[string]interface{}{
32615		"api-version": APIVersion,
32616	}
32617
32618	preparer := autorest.CreatePreparer(
32619		autorest.AsPost(),
32620		autorest.WithBaseURL(client.BaseURI),
32621		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop", pathParameters),
32622		autorest.WithQueryParameters(queryParameters))
32623	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32624}
32625
32626// StopWebSiteNetworkTraceSlotSender sends the StopWebSiteNetworkTraceSlot request. The method will close the
32627// http.Response Body if it receives an error.
32628func (client AppsClient) StopWebSiteNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
32629	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32630}
32631
32632// StopWebSiteNetworkTraceSlotResponder handles the response to the StopWebSiteNetworkTraceSlot request. The method always
32633// closes the http.Response Body.
32634func (client AppsClient) StopWebSiteNetworkTraceSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32635	err = autorest.Respond(
32636		resp,
32637		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32638		autorest.ByClosing())
32639	result.Response = resp
32640	return
32641}
32642
32643// SwapSlotSlot description for Swaps two deployment slots of an app.
32644// Parameters:
32645// resourceGroupName - name of the resource group to which the resource belongs.
32646// name - name of the app.
32647// slotSwapEntity - JSON object that contains the target slot name. See example.
32648// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
32649func (client AppsClient) SwapSlotSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result AppsSwapSlotSlotFuture, err error) {
32650	if tracing.IsEnabled() {
32651		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SwapSlotSlot")
32652		defer func() {
32653			sc := -1
32654			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
32655				sc = result.FutureAPI.Response().StatusCode
32656			}
32657			tracing.EndSpan(ctx, sc, err)
32658		}()
32659	}
32660	if err := validation.Validate([]validation.Validation{
32661		{TargetValue: resourceGroupName,
32662			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32663				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32664				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
32665		{TargetValue: slotSwapEntity,
32666			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
32667				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
32668		return result, validation.NewError("web.AppsClient", "SwapSlotSlot", err.Error())
32669	}
32670
32671	req, err := client.SwapSlotSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
32672	if err != nil {
32673		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotSlot", nil, "Failure preparing request")
32674		return
32675	}
32676
32677	result, err = client.SwapSlotSlotSender(req)
32678	if err != nil {
32679		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotSlot", nil, "Failure sending request")
32680		return
32681	}
32682
32683	return
32684}
32685
32686// SwapSlotSlotPreparer prepares the SwapSlotSlot request.
32687func (client AppsClient) SwapSlotSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
32688	pathParameters := map[string]interface{}{
32689		"name":              autorest.Encode("path", name),
32690		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32691		"slot":              autorest.Encode("path", slot),
32692		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32693	}
32694
32695	const APIVersion = "2021-01-15"
32696	queryParameters := map[string]interface{}{
32697		"api-version": APIVersion,
32698	}
32699
32700	preparer := autorest.CreatePreparer(
32701		autorest.AsContentType("application/json; charset=utf-8"),
32702		autorest.AsPost(),
32703		autorest.WithBaseURL(client.BaseURI),
32704		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap", pathParameters),
32705		autorest.WithJSON(slotSwapEntity),
32706		autorest.WithQueryParameters(queryParameters))
32707	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32708}
32709
32710// SwapSlotSlotSender sends the SwapSlotSlot request. The method will close the
32711// http.Response Body if it receives an error.
32712func (client AppsClient) SwapSlotSlotSender(req *http.Request) (future AppsSwapSlotSlotFuture, err error) {
32713	var resp *http.Response
32714	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
32715	if err != nil {
32716		return
32717	}
32718	var azf azure.Future
32719	azf, err = azure.NewFutureFromResponse(resp)
32720	future.FutureAPI = &azf
32721	future.Result = future.result
32722	return
32723}
32724
32725// SwapSlotSlotResponder handles the response to the SwapSlotSlot request. The method always
32726// closes the http.Response Body.
32727func (client AppsClient) SwapSlotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32728	err = autorest.Respond(
32729		resp,
32730		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
32731		autorest.ByClosing())
32732	result.Response = resp
32733	return
32734}
32735
32736// SwapSlotWithProduction description for Swaps two deployment slots of an app.
32737// Parameters:
32738// resourceGroupName - name of the resource group to which the resource belongs.
32739// name - name of the app.
32740// slotSwapEntity - JSON object that contains the target slot name. See example.
32741func (client AppsClient) SwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result AppsSwapSlotWithProductionFuture, err error) {
32742	if tracing.IsEnabled() {
32743		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SwapSlotWithProduction")
32744		defer func() {
32745			sc := -1
32746			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
32747				sc = result.FutureAPI.Response().StatusCode
32748			}
32749			tracing.EndSpan(ctx, sc, err)
32750		}()
32751	}
32752	if err := validation.Validate([]validation.Validation{
32753		{TargetValue: resourceGroupName,
32754			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32755				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32756				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
32757		{TargetValue: slotSwapEntity,
32758			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
32759				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
32760		return result, validation.NewError("web.AppsClient", "SwapSlotWithProduction", err.Error())
32761	}
32762
32763	req, err := client.SwapSlotWithProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
32764	if err != nil {
32765		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotWithProduction", nil, "Failure preparing request")
32766		return
32767	}
32768
32769	result, err = client.SwapSlotWithProductionSender(req)
32770	if err != nil {
32771		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotWithProduction", nil, "Failure sending request")
32772		return
32773	}
32774
32775	return
32776}
32777
32778// SwapSlotWithProductionPreparer prepares the SwapSlotWithProduction request.
32779func (client AppsClient) SwapSlotWithProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
32780	pathParameters := map[string]interface{}{
32781		"name":              autorest.Encode("path", name),
32782		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32783		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32784	}
32785
32786	const APIVersion = "2021-01-15"
32787	queryParameters := map[string]interface{}{
32788		"api-version": APIVersion,
32789	}
32790
32791	preparer := autorest.CreatePreparer(
32792		autorest.AsContentType("application/json; charset=utf-8"),
32793		autorest.AsPost(),
32794		autorest.WithBaseURL(client.BaseURI),
32795		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap", pathParameters),
32796		autorest.WithJSON(slotSwapEntity),
32797		autorest.WithQueryParameters(queryParameters))
32798	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32799}
32800
32801// SwapSlotWithProductionSender sends the SwapSlotWithProduction request. The method will close the
32802// http.Response Body if it receives an error.
32803func (client AppsClient) SwapSlotWithProductionSender(req *http.Request) (future AppsSwapSlotWithProductionFuture, err error) {
32804	var resp *http.Response
32805	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
32806	if err != nil {
32807		return
32808	}
32809	var azf azure.Future
32810	azf, err = azure.NewFutureFromResponse(resp)
32811	future.FutureAPI = &azf
32812	future.Result = future.result
32813	return
32814}
32815
32816// SwapSlotWithProductionResponder handles the response to the SwapSlotWithProduction request. The method always
32817// closes the http.Response Body.
32818func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (result autorest.Response, err error) {
32819	err = autorest.Respond(
32820		resp,
32821		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
32822		autorest.ByClosing())
32823	result.Response = resp
32824	return
32825}
32826
32827// SyncFunctions description for Syncs function trigger metadata to the management database
32828// Parameters:
32829// resourceGroupName - name of the resource group to which the resource belongs.
32830// name - name of the app.
32831func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
32832	if tracing.IsEnabled() {
32833		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions")
32834		defer func() {
32835			sc := -1
32836			if result.Response != nil {
32837				sc = result.Response.StatusCode
32838			}
32839			tracing.EndSpan(ctx, sc, err)
32840		}()
32841	}
32842	if err := validation.Validate([]validation.Validation{
32843		{TargetValue: resourceGroupName,
32844			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32845				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32846				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32847		return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error())
32848	}
32849
32850	req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name)
32851	if err != nil {
32852		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request")
32853		return
32854	}
32855
32856	resp, err := client.SyncFunctionsSender(req)
32857	if err != nil {
32858		result.Response = resp
32859		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request")
32860		return
32861	}
32862
32863	result, err = client.SyncFunctionsResponder(resp)
32864	if err != nil {
32865		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request")
32866		return
32867	}
32868
32869	return
32870}
32871
32872// SyncFunctionsPreparer prepares the SyncFunctions request.
32873func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
32874	pathParameters := map[string]interface{}{
32875		"name":              autorest.Encode("path", name),
32876		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32877		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32878	}
32879
32880	const APIVersion = "2021-01-15"
32881	queryParameters := map[string]interface{}{
32882		"api-version": APIVersion,
32883	}
32884
32885	preparer := autorest.CreatePreparer(
32886		autorest.AsPost(),
32887		autorest.WithBaseURL(client.BaseURI),
32888		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync", pathParameters),
32889		autorest.WithQueryParameters(queryParameters))
32890	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32891}
32892
32893// SyncFunctionsSender sends the SyncFunctions request. The method will close the
32894// http.Response Body if it receives an error.
32895func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) {
32896	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32897}
32898
32899// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always
32900// closes the http.Response Body.
32901func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) {
32902	err = autorest.Respond(
32903		resp,
32904		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32905		autorest.ByClosing())
32906	result.Response = resp
32907	return
32908}
32909
32910// SyncFunctionsSlot description for Syncs function trigger metadata to the management database
32911// Parameters:
32912// resourceGroupName - name of the resource group to which the resource belongs.
32913// name - name of the app.
32914// slot - name of the deployment slot.
32915func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
32916	if tracing.IsEnabled() {
32917		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot")
32918		defer func() {
32919			sc := -1
32920			if result.Response != nil {
32921				sc = result.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", "SyncFunctionsSlot", err.Error())
32932	}
32933
32934	req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot)
32935	if err != nil {
32936		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request")
32937		return
32938	}
32939
32940	resp, err := client.SyncFunctionsSlotSender(req)
32941	if err != nil {
32942		result.Response = resp
32943		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request")
32944		return
32945	}
32946
32947	result, err = client.SyncFunctionsSlotResponder(resp)
32948	if err != nil {
32949		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request")
32950		return
32951	}
32952
32953	return
32954}
32955
32956// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request.
32957func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32958	pathParameters := map[string]interface{}{
32959		"name":              autorest.Encode("path", name),
32960		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32961		"slot":              autorest.Encode("path", slot),
32962		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32963	}
32964
32965	const APIVersion = "2021-01-15"
32966	queryParameters := map[string]interface{}{
32967		"api-version": APIVersion,
32968	}
32969
32970	preparer := autorest.CreatePreparer(
32971		autorest.AsPost(),
32972		autorest.WithBaseURL(client.BaseURI),
32973		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync", pathParameters),
32974		autorest.WithQueryParameters(queryParameters))
32975	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32976}
32977
32978// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the
32979// http.Response Body if it receives an error.
32980func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) {
32981	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32982}
32983
32984// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always
32985// closes the http.Response Body.
32986func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32987	err = autorest.Respond(
32988		resp,
32989		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32990		autorest.ByClosing())
32991	result.Response = resp
32992	return
32993}
32994
32995// SyncFunctionTriggers description for Syncs function trigger metadata to the management database
32996// Parameters:
32997// resourceGroupName - name of the resource group to which the resource belongs.
32998// name - name of the app.
32999func (client AppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
33000	if tracing.IsEnabled() {
33001		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggers")
33002		defer func() {
33003			sc := -1
33004			if result.Response != nil {
33005				sc = result.Response.StatusCode
33006			}
33007			tracing.EndSpan(ctx, sc, err)
33008		}()
33009	}
33010	if err := validation.Validate([]validation.Validation{
33011		{TargetValue: resourceGroupName,
33012			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33013				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33014				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33015		return result, validation.NewError("web.AppsClient", "SyncFunctionTriggers", err.Error())
33016	}
33017
33018	req, err := client.SyncFunctionTriggersPreparer(ctx, resourceGroupName, name)
33019	if err != nil {
33020		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", nil, "Failure preparing request")
33021		return
33022	}
33023
33024	resp, err := client.SyncFunctionTriggersSender(req)
33025	if err != nil {
33026		result.Response = resp
33027		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure sending request")
33028		return
33029	}
33030
33031	result, err = client.SyncFunctionTriggersResponder(resp)
33032	if err != nil {
33033		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure responding to request")
33034		return
33035	}
33036
33037	return
33038}
33039
33040// SyncFunctionTriggersPreparer prepares the SyncFunctionTriggers request.
33041func (client AppsClient) SyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
33042	pathParameters := map[string]interface{}{
33043		"name":              autorest.Encode("path", name),
33044		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33045		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33046	}
33047
33048	const APIVersion = "2021-01-15"
33049	queryParameters := map[string]interface{}{
33050		"api-version": APIVersion,
33051	}
33052
33053	preparer := autorest.CreatePreparer(
33054		autorest.AsPost(),
33055		autorest.WithBaseURL(client.BaseURI),
33056		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers", pathParameters),
33057		autorest.WithQueryParameters(queryParameters))
33058	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33059}
33060
33061// SyncFunctionTriggersSender sends the SyncFunctionTriggers request. The method will close the
33062// http.Response Body if it receives an error.
33063func (client AppsClient) SyncFunctionTriggersSender(req *http.Request) (*http.Response, error) {
33064	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33065}
33066
33067// SyncFunctionTriggersResponder handles the response to the SyncFunctionTriggers request. The method always
33068// closes the http.Response Body.
33069func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (result autorest.Response, err error) {
33070	err = autorest.Respond(
33071		resp,
33072		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
33073		autorest.ByClosing())
33074	result.Response = resp
33075	return
33076}
33077
33078// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the management database
33079// Parameters:
33080// resourceGroupName - name of the resource group to which the resource belongs.
33081// name - name of the app.
33082// slot - name of the deployment slot.
33083func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
33084	if tracing.IsEnabled() {
33085		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggersSlot")
33086		defer func() {
33087			sc := -1
33088			if result.Response != nil {
33089				sc = result.Response.StatusCode
33090			}
33091			tracing.EndSpan(ctx, sc, err)
33092		}()
33093	}
33094	if err := validation.Validate([]validation.Validation{
33095		{TargetValue: resourceGroupName,
33096			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33097				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33098				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33099		return result, validation.NewError("web.AppsClient", "SyncFunctionTriggersSlot", err.Error())
33100	}
33101
33102	req, err := client.SyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot)
33103	if err != nil {
33104		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", nil, "Failure preparing request")
33105		return
33106	}
33107
33108	resp, err := client.SyncFunctionTriggersSlotSender(req)
33109	if err != nil {
33110		result.Response = resp
33111		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure sending request")
33112		return
33113	}
33114
33115	result, err = client.SyncFunctionTriggersSlotResponder(resp)
33116	if err != nil {
33117		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure responding to request")
33118		return
33119	}
33120
33121	return
33122}
33123
33124// SyncFunctionTriggersSlotPreparer prepares the SyncFunctionTriggersSlot request.
33125func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
33126	pathParameters := map[string]interface{}{
33127		"name":              autorest.Encode("path", name),
33128		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33129		"slot":              autorest.Encode("path", slot),
33130		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33131	}
33132
33133	const APIVersion = "2021-01-15"
33134	queryParameters := map[string]interface{}{
33135		"api-version": APIVersion,
33136	}
33137
33138	preparer := autorest.CreatePreparer(
33139		autorest.AsPost(),
33140		autorest.WithBaseURL(client.BaseURI),
33141		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers", pathParameters),
33142		autorest.WithQueryParameters(queryParameters))
33143	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33144}
33145
33146// SyncFunctionTriggersSlotSender sends the SyncFunctionTriggersSlot request. The method will close the
33147// http.Response Body if it receives an error.
33148func (client AppsClient) SyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) {
33149	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33150}
33151
33152// SyncFunctionTriggersSlotResponder handles the response to the SyncFunctionTriggersSlot request. The method always
33153// closes the http.Response Body.
33154func (client AppsClient) SyncFunctionTriggersSlotResponder(resp *http.Response) (result autorest.Response, err error) {
33155	err = autorest.Respond(
33156		resp,
33157		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
33158		autorest.ByClosing())
33159	result.Response = resp
33160	return
33161}
33162
33163// SyncRepository description for Sync web app repository.
33164// Parameters:
33165// resourceGroupName - name of the resource group to which the resource belongs.
33166// name - name of web app.
33167func (client AppsClient) SyncRepository(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
33168	if tracing.IsEnabled() {
33169		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncRepository")
33170		defer func() {
33171			sc := -1
33172			if result.Response != nil {
33173				sc = result.Response.StatusCode
33174			}
33175			tracing.EndSpan(ctx, sc, err)
33176		}()
33177	}
33178	if err := validation.Validate([]validation.Validation{
33179		{TargetValue: resourceGroupName,
33180			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33181				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33182				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33183		return result, validation.NewError("web.AppsClient", "SyncRepository", err.Error())
33184	}
33185
33186	req, err := client.SyncRepositoryPreparer(ctx, resourceGroupName, name)
33187	if err != nil {
33188		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", nil, "Failure preparing request")
33189		return
33190	}
33191
33192	resp, err := client.SyncRepositorySender(req)
33193	if err != nil {
33194		result.Response = resp
33195		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", resp, "Failure sending request")
33196		return
33197	}
33198
33199	result, err = client.SyncRepositoryResponder(resp)
33200	if err != nil {
33201		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", resp, "Failure responding to request")
33202		return
33203	}
33204
33205	return
33206}
33207
33208// SyncRepositoryPreparer prepares the SyncRepository request.
33209func (client AppsClient) SyncRepositoryPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
33210	pathParameters := map[string]interface{}{
33211		"name":              autorest.Encode("path", name),
33212		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33213		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33214	}
33215
33216	const APIVersion = "2021-01-15"
33217	queryParameters := map[string]interface{}{
33218		"api-version": APIVersion,
33219	}
33220
33221	preparer := autorest.CreatePreparer(
33222		autorest.AsPost(),
33223		autorest.WithBaseURL(client.BaseURI),
33224		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync", pathParameters),
33225		autorest.WithQueryParameters(queryParameters))
33226	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33227}
33228
33229// SyncRepositorySender sends the SyncRepository request. The method will close the
33230// http.Response Body if it receives an error.
33231func (client AppsClient) SyncRepositorySender(req *http.Request) (*http.Response, error) {
33232	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33233}
33234
33235// SyncRepositoryResponder handles the response to the SyncRepository request. The method always
33236// closes the http.Response Body.
33237func (client AppsClient) SyncRepositoryResponder(resp *http.Response) (result autorest.Response, err error) {
33238	err = autorest.Respond(
33239		resp,
33240		azure.WithErrorUnlessStatusCode(http.StatusOK),
33241		autorest.ByClosing())
33242	result.Response = resp
33243	return
33244}
33245
33246// SyncRepositorySlot description for Sync web app repository.
33247// Parameters:
33248// resourceGroupName - name of the resource group to which the resource belongs.
33249// name - name of web app.
33250// slot - name of web app slot. If not specified then will default to production slot.
33251func (client AppsClient) SyncRepositorySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
33252	if tracing.IsEnabled() {
33253		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncRepositorySlot")
33254		defer func() {
33255			sc := -1
33256			if result.Response != nil {
33257				sc = result.Response.StatusCode
33258			}
33259			tracing.EndSpan(ctx, sc, err)
33260		}()
33261	}
33262	if err := validation.Validate([]validation.Validation{
33263		{TargetValue: resourceGroupName,
33264			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33265				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33266				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33267		return result, validation.NewError("web.AppsClient", "SyncRepositorySlot", err.Error())
33268	}
33269
33270	req, err := client.SyncRepositorySlotPreparer(ctx, resourceGroupName, name, slot)
33271	if err != nil {
33272		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", nil, "Failure preparing request")
33273		return
33274	}
33275
33276	resp, err := client.SyncRepositorySlotSender(req)
33277	if err != nil {
33278		result.Response = resp
33279		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", resp, "Failure sending request")
33280		return
33281	}
33282
33283	result, err = client.SyncRepositorySlotResponder(resp)
33284	if err != nil {
33285		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", resp, "Failure responding to request")
33286		return
33287	}
33288
33289	return
33290}
33291
33292// SyncRepositorySlotPreparer prepares the SyncRepositorySlot request.
33293func (client AppsClient) SyncRepositorySlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
33294	pathParameters := map[string]interface{}{
33295		"name":              autorest.Encode("path", name),
33296		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33297		"slot":              autorest.Encode("path", slot),
33298		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33299	}
33300
33301	const APIVersion = "2021-01-15"
33302	queryParameters := map[string]interface{}{
33303		"api-version": APIVersion,
33304	}
33305
33306	preparer := autorest.CreatePreparer(
33307		autorest.AsPost(),
33308		autorest.WithBaseURL(client.BaseURI),
33309		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync", pathParameters),
33310		autorest.WithQueryParameters(queryParameters))
33311	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33312}
33313
33314// SyncRepositorySlotSender sends the SyncRepositorySlot request. The method will close the
33315// http.Response Body if it receives an error.
33316func (client AppsClient) SyncRepositorySlotSender(req *http.Request) (*http.Response, error) {
33317	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33318}
33319
33320// SyncRepositorySlotResponder handles the response to the SyncRepositorySlot request. The method always
33321// closes the http.Response Body.
33322func (client AppsClient) SyncRepositorySlotResponder(resp *http.Response) (result autorest.Response, err error) {
33323	err = autorest.Respond(
33324		resp,
33325		azure.WithErrorUnlessStatusCode(http.StatusOK),
33326		autorest.ByClosing())
33327	result.Response = resp
33328	return
33329}
33330
33331// Update description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing
33332// app.
33333// Parameters:
33334// resourceGroupName - name of the resource group to which the resource belongs.
33335// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
33336// parameter.
33337// siteEnvelope - a JSON representation of the app properties. See example.
33338func (client AppsClient) Update(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource) (result Site, err error) {
33339	if tracing.IsEnabled() {
33340		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Update")
33341		defer func() {
33342			sc := -1
33343			if result.Response.Response != nil {
33344				sc = result.Response.Response.StatusCode
33345			}
33346			tracing.EndSpan(ctx, sc, err)
33347		}()
33348	}
33349	if err := validation.Validate([]validation.Validation{
33350		{TargetValue: resourceGroupName,
33351			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33352				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33353				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33354		return result, validation.NewError("web.AppsClient", "Update", err.Error())
33355	}
33356
33357	req, err := client.UpdatePreparer(ctx, resourceGroupName, name, siteEnvelope)
33358	if err != nil {
33359		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", nil, "Failure preparing request")
33360		return
33361	}
33362
33363	resp, err := client.UpdateSender(req)
33364	if err != nil {
33365		result.Response = autorest.Response{Response: resp}
33366		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", resp, "Failure sending request")
33367		return
33368	}
33369
33370	result, err = client.UpdateResponder(resp)
33371	if err != nil {
33372		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", resp, "Failure responding to request")
33373		return
33374	}
33375
33376	return
33377}
33378
33379// UpdatePreparer prepares the Update request.
33380func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource) (*http.Request, error) {
33381	pathParameters := map[string]interface{}{
33382		"name":              autorest.Encode("path", name),
33383		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33384		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33385	}
33386
33387	const APIVersion = "2021-01-15"
33388	queryParameters := map[string]interface{}{
33389		"api-version": APIVersion,
33390	}
33391
33392	preparer := autorest.CreatePreparer(
33393		autorest.AsContentType("application/json; charset=utf-8"),
33394		autorest.AsPatch(),
33395		autorest.WithBaseURL(client.BaseURI),
33396		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
33397		autorest.WithJSON(siteEnvelope),
33398		autorest.WithQueryParameters(queryParameters))
33399	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33400}
33401
33402// UpdateSender sends the Update request. The method will close the
33403// http.Response Body if it receives an error.
33404func (client AppsClient) UpdateSender(req *http.Request) (*http.Response, error) {
33405	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33406}
33407
33408// UpdateResponder handles the response to the Update request. The method always
33409// closes the http.Response Body.
33410func (client AppsClient) UpdateResponder(resp *http.Response) (result Site, err error) {
33411	err = autorest.Respond(
33412		resp,
33413		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
33414		autorest.ByUnmarshallingJSON(&result),
33415		autorest.ByClosing())
33416	result.Response = autorest.Response{Response: resp}
33417	return
33418}
33419
33420// UpdateApplicationSettings description for Replaces the application settings of an app.
33421// Parameters:
33422// resourceGroupName - name of the resource group to which the resource belongs.
33423// name - name of the app.
33424// appSettings - application settings of the app.
33425func (client AppsClient) UpdateApplicationSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary) (result StringDictionary, err error) {
33426	if tracing.IsEnabled() {
33427		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateApplicationSettings")
33428		defer func() {
33429			sc := -1
33430			if result.Response.Response != nil {
33431				sc = result.Response.Response.StatusCode
33432			}
33433			tracing.EndSpan(ctx, sc, err)
33434		}()
33435	}
33436	if err := validation.Validate([]validation.Validation{
33437		{TargetValue: resourceGroupName,
33438			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33439				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33440				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33441		return result, validation.NewError("web.AppsClient", "UpdateApplicationSettings", err.Error())
33442	}
33443
33444	req, err := client.UpdateApplicationSettingsPreparer(ctx, resourceGroupName, name, appSettings)
33445	if err != nil {
33446		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", nil, "Failure preparing request")
33447		return
33448	}
33449
33450	resp, err := client.UpdateApplicationSettingsSender(req)
33451	if err != nil {
33452		result.Response = autorest.Response{Response: resp}
33453		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", resp, "Failure sending request")
33454		return
33455	}
33456
33457	result, err = client.UpdateApplicationSettingsResponder(resp)
33458	if err != nil {
33459		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", resp, "Failure responding to request")
33460		return
33461	}
33462
33463	return
33464}
33465
33466// UpdateApplicationSettingsPreparer prepares the UpdateApplicationSettings request.
33467func (client AppsClient) UpdateApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary) (*http.Request, error) {
33468	pathParameters := map[string]interface{}{
33469		"name":              autorest.Encode("path", name),
33470		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33471		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33472	}
33473
33474	const APIVersion = "2021-01-15"
33475	queryParameters := map[string]interface{}{
33476		"api-version": APIVersion,
33477	}
33478
33479	preparer := autorest.CreatePreparer(
33480		autorest.AsContentType("application/json; charset=utf-8"),
33481		autorest.AsPut(),
33482		autorest.WithBaseURL(client.BaseURI),
33483		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings", pathParameters),
33484		autorest.WithJSON(appSettings),
33485		autorest.WithQueryParameters(queryParameters))
33486	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33487}
33488
33489// UpdateApplicationSettingsSender sends the UpdateApplicationSettings request. The method will close the
33490// http.Response Body if it receives an error.
33491func (client AppsClient) UpdateApplicationSettingsSender(req *http.Request) (*http.Response, error) {
33492	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33493}
33494
33495// UpdateApplicationSettingsResponder handles the response to the UpdateApplicationSettings request. The method always
33496// closes the http.Response Body.
33497func (client AppsClient) UpdateApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) {
33498	err = autorest.Respond(
33499		resp,
33500		azure.WithErrorUnlessStatusCode(http.StatusOK),
33501		autorest.ByUnmarshallingJSON(&result),
33502		autorest.ByClosing())
33503	result.Response = autorest.Response{Response: resp}
33504	return
33505}
33506
33507// UpdateApplicationSettingsSlot description for Replaces the application settings of an app.
33508// Parameters:
33509// resourceGroupName - name of the resource group to which the resource belongs.
33510// name - name of the app.
33511// appSettings - application settings of the app.
33512// slot - name of the deployment slot. If a slot is not specified, the API will update the application settings
33513// for the production slot.
33514func (client AppsClient) UpdateApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, slot string) (result StringDictionary, err error) {
33515	if tracing.IsEnabled() {
33516		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateApplicationSettingsSlot")
33517		defer func() {
33518			sc := -1
33519			if result.Response.Response != nil {
33520				sc = result.Response.Response.StatusCode
33521			}
33522			tracing.EndSpan(ctx, sc, err)
33523		}()
33524	}
33525	if err := validation.Validate([]validation.Validation{
33526		{TargetValue: resourceGroupName,
33527			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33528				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33529				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33530		return result, validation.NewError("web.AppsClient", "UpdateApplicationSettingsSlot", err.Error())
33531	}
33532
33533	req, err := client.UpdateApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, appSettings, slot)
33534	if err != nil {
33535		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", nil, "Failure preparing request")
33536		return
33537	}
33538
33539	resp, err := client.UpdateApplicationSettingsSlotSender(req)
33540	if err != nil {
33541		result.Response = autorest.Response{Response: resp}
33542		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", resp, "Failure sending request")
33543		return
33544	}
33545
33546	result, err = client.UpdateApplicationSettingsSlotResponder(resp)
33547	if err != nil {
33548		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", resp, "Failure responding to request")
33549		return
33550	}
33551
33552	return
33553}
33554
33555// UpdateApplicationSettingsSlotPreparer prepares the UpdateApplicationSettingsSlot request.
33556func (client AppsClient) UpdateApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, slot string) (*http.Request, error) {
33557	pathParameters := map[string]interface{}{
33558		"name":              autorest.Encode("path", name),
33559		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33560		"slot":              autorest.Encode("path", slot),
33561		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33562	}
33563
33564	const APIVersion = "2021-01-15"
33565	queryParameters := map[string]interface{}{
33566		"api-version": APIVersion,
33567	}
33568
33569	preparer := autorest.CreatePreparer(
33570		autorest.AsContentType("application/json; charset=utf-8"),
33571		autorest.AsPut(),
33572		autorest.WithBaseURL(client.BaseURI),
33573		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings", pathParameters),
33574		autorest.WithJSON(appSettings),
33575		autorest.WithQueryParameters(queryParameters))
33576	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33577}
33578
33579// UpdateApplicationSettingsSlotSender sends the UpdateApplicationSettingsSlot request. The method will close the
33580// http.Response Body if it receives an error.
33581func (client AppsClient) UpdateApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) {
33582	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33583}
33584
33585// UpdateApplicationSettingsSlotResponder handles the response to the UpdateApplicationSettingsSlot request. The method always
33586// closes the http.Response Body.
33587func (client AppsClient) UpdateApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) {
33588	err = autorest.Respond(
33589		resp,
33590		azure.WithErrorUnlessStatusCode(http.StatusOK),
33591		autorest.ByUnmarshallingJSON(&result),
33592		autorest.ByClosing())
33593	result.Response = autorest.Response{Response: resp}
33594	return
33595}
33596
33597// UpdateAuthSettings description for Updates the Authentication / Authorization settings associated with web app.
33598// Parameters:
33599// resourceGroupName - name of the resource group to which the resource belongs.
33600// name - name of web app.
33601// siteAuthSettings - auth settings associated with web app.
33602func (client AppsClient) UpdateAuthSettings(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (result SiteAuthSettings, err error) {
33603	if tracing.IsEnabled() {
33604		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettings")
33605		defer func() {
33606			sc := -1
33607			if result.Response.Response != nil {
33608				sc = result.Response.Response.StatusCode
33609			}
33610			tracing.EndSpan(ctx, sc, err)
33611		}()
33612	}
33613	if err := validation.Validate([]validation.Validation{
33614		{TargetValue: resourceGroupName,
33615			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33616				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33617				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33618		return result, validation.NewError("web.AppsClient", "UpdateAuthSettings", err.Error())
33619	}
33620
33621	req, err := client.UpdateAuthSettingsPreparer(ctx, resourceGroupName, name, siteAuthSettings)
33622	if err != nil {
33623		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", nil, "Failure preparing request")
33624		return
33625	}
33626
33627	resp, err := client.UpdateAuthSettingsSender(req)
33628	if err != nil {
33629		result.Response = autorest.Response{Response: resp}
33630		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", resp, "Failure sending request")
33631		return
33632	}
33633
33634	result, err = client.UpdateAuthSettingsResponder(resp)
33635	if err != nil {
33636		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", resp, "Failure responding to request")
33637		return
33638	}
33639
33640	return
33641}
33642
33643// UpdateAuthSettingsPreparer prepares the UpdateAuthSettings request.
33644func (client AppsClient) UpdateAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (*http.Request, error) {
33645	pathParameters := map[string]interface{}{
33646		"name":              autorest.Encode("path", name),
33647		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33648		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33649	}
33650
33651	const APIVersion = "2021-01-15"
33652	queryParameters := map[string]interface{}{
33653		"api-version": APIVersion,
33654	}
33655
33656	preparer := autorest.CreatePreparer(
33657		autorest.AsContentType("application/json; charset=utf-8"),
33658		autorest.AsPut(),
33659		autorest.WithBaseURL(client.BaseURI),
33660		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings", pathParameters),
33661		autorest.WithJSON(siteAuthSettings),
33662		autorest.WithQueryParameters(queryParameters))
33663	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33664}
33665
33666// UpdateAuthSettingsSender sends the UpdateAuthSettings request. The method will close the
33667// http.Response Body if it receives an error.
33668func (client AppsClient) UpdateAuthSettingsSender(req *http.Request) (*http.Response, error) {
33669	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33670}
33671
33672// UpdateAuthSettingsResponder handles the response to the UpdateAuthSettings request. The method always
33673// closes the http.Response Body.
33674func (client AppsClient) UpdateAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) {
33675	err = autorest.Respond(
33676		resp,
33677		azure.WithErrorUnlessStatusCode(http.StatusOK),
33678		autorest.ByUnmarshallingJSON(&result),
33679		autorest.ByClosing())
33680	result.Response = autorest.Response{Response: resp}
33681	return
33682}
33683
33684// UpdateAuthSettingsSlot description for Updates the Authentication / Authorization settings associated with web app.
33685// Parameters:
33686// resourceGroupName - name of the resource group to which the resource belongs.
33687// name - name of web app.
33688// siteAuthSettings - auth settings associated with web app.
33689// slot - name of web app slot. If not specified then will default to production slot.
33690func (client AppsClient) UpdateAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (result SiteAuthSettings, err error) {
33691	if tracing.IsEnabled() {
33692		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsSlot")
33693		defer func() {
33694			sc := -1
33695			if result.Response.Response != nil {
33696				sc = result.Response.Response.StatusCode
33697			}
33698			tracing.EndSpan(ctx, sc, err)
33699		}()
33700	}
33701	if err := validation.Validate([]validation.Validation{
33702		{TargetValue: resourceGroupName,
33703			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33704				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33705				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33706		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsSlot", err.Error())
33707	}
33708
33709	req, err := client.UpdateAuthSettingsSlotPreparer(ctx, resourceGroupName, name, siteAuthSettings, slot)
33710	if err != nil {
33711		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", nil, "Failure preparing request")
33712		return
33713	}
33714
33715	resp, err := client.UpdateAuthSettingsSlotSender(req)
33716	if err != nil {
33717		result.Response = autorest.Response{Response: resp}
33718		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", resp, "Failure sending request")
33719		return
33720	}
33721
33722	result, err = client.UpdateAuthSettingsSlotResponder(resp)
33723	if err != nil {
33724		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", resp, "Failure responding to request")
33725		return
33726	}
33727
33728	return
33729}
33730
33731// UpdateAuthSettingsSlotPreparer prepares the UpdateAuthSettingsSlot request.
33732func (client AppsClient) UpdateAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (*http.Request, error) {
33733	pathParameters := map[string]interface{}{
33734		"name":              autorest.Encode("path", name),
33735		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33736		"slot":              autorest.Encode("path", slot),
33737		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33738	}
33739
33740	const APIVersion = "2021-01-15"
33741	queryParameters := map[string]interface{}{
33742		"api-version": APIVersion,
33743	}
33744
33745	preparer := autorest.CreatePreparer(
33746		autorest.AsContentType("application/json; charset=utf-8"),
33747		autorest.AsPut(),
33748		autorest.WithBaseURL(client.BaseURI),
33749		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings", pathParameters),
33750		autorest.WithJSON(siteAuthSettings),
33751		autorest.WithQueryParameters(queryParameters))
33752	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33753}
33754
33755// UpdateAuthSettingsSlotSender sends the UpdateAuthSettingsSlot request. The method will close the
33756// http.Response Body if it receives an error.
33757func (client AppsClient) UpdateAuthSettingsSlotSender(req *http.Request) (*http.Response, error) {
33758	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33759}
33760
33761// UpdateAuthSettingsSlotResponder handles the response to the UpdateAuthSettingsSlot request. The method always
33762// closes the http.Response Body.
33763func (client AppsClient) UpdateAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) {
33764	err = autorest.Respond(
33765		resp,
33766		azure.WithErrorUnlessStatusCode(http.StatusOK),
33767		autorest.ByUnmarshallingJSON(&result),
33768		autorest.ByClosing())
33769	result.Response = autorest.Response{Response: resp}
33770	return
33771}
33772
33773// UpdateAuthSettingsV2 description for Updates site's Authentication / Authorization settings for apps via the V2
33774// format
33775// Parameters:
33776// resourceGroupName - name of the resource group to which the resource belongs.
33777// name - name of web app.
33778// siteAuthSettingsV2 - auth settings associated with web app.
33779func (client AppsClient) UpdateAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2) (result SiteAuthSettingsV2, err error) {
33780	if tracing.IsEnabled() {
33781		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsV2")
33782		defer func() {
33783			sc := -1
33784			if result.Response.Response != nil {
33785				sc = result.Response.Response.StatusCode
33786			}
33787			tracing.EndSpan(ctx, sc, err)
33788		}()
33789	}
33790	if err := validation.Validate([]validation.Validation{
33791		{TargetValue: resourceGroupName,
33792			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33793				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33794				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33795		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsV2", err.Error())
33796	}
33797
33798	req, err := client.UpdateAuthSettingsV2Preparer(ctx, resourceGroupName, name, siteAuthSettingsV2)
33799	if err != nil {
33800		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2", nil, "Failure preparing request")
33801		return
33802	}
33803
33804	resp, err := client.UpdateAuthSettingsV2Sender(req)
33805	if err != nil {
33806		result.Response = autorest.Response{Response: resp}
33807		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2", resp, "Failure sending request")
33808		return
33809	}
33810
33811	result, err = client.UpdateAuthSettingsV2Responder(resp)
33812	if err != nil {
33813		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2", resp, "Failure responding to request")
33814		return
33815	}
33816
33817	return
33818}
33819
33820// UpdateAuthSettingsV2Preparer prepares the UpdateAuthSettingsV2 request.
33821func (client AppsClient) UpdateAuthSettingsV2Preparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2) (*http.Request, error) {
33822	pathParameters := map[string]interface{}{
33823		"name":              autorest.Encode("path", name),
33824		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33825		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33826	}
33827
33828	const APIVersion = "2021-01-15"
33829	queryParameters := map[string]interface{}{
33830		"api-version": APIVersion,
33831	}
33832
33833	preparer := autorest.CreatePreparer(
33834		autorest.AsContentType("application/json; charset=utf-8"),
33835		autorest.AsPut(),
33836		autorest.WithBaseURL(client.BaseURI),
33837		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2", pathParameters),
33838		autorest.WithJSON(siteAuthSettingsV2),
33839		autorest.WithQueryParameters(queryParameters))
33840	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33841}
33842
33843// UpdateAuthSettingsV2Sender sends the UpdateAuthSettingsV2 request. The method will close the
33844// http.Response Body if it receives an error.
33845func (client AppsClient) UpdateAuthSettingsV2Sender(req *http.Request) (*http.Response, error) {
33846	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33847}
33848
33849// UpdateAuthSettingsV2Responder handles the response to the UpdateAuthSettingsV2 request. The method always
33850// closes the http.Response Body.
33851func (client AppsClient) UpdateAuthSettingsV2Responder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
33852	err = autorest.Respond(
33853		resp,
33854		azure.WithErrorUnlessStatusCode(http.StatusOK),
33855		autorest.ByUnmarshallingJSON(&result),
33856		autorest.ByClosing())
33857	result.Response = autorest.Response{Response: resp}
33858	return
33859}
33860
33861// UpdateAuthSettingsV2Slot description for Updates site's Authentication / Authorization settings for apps via the V2
33862// format
33863// Parameters:
33864// resourceGroupName - name of the resource group to which the resource belongs.
33865// name - name of web app.
33866// siteAuthSettingsV2 - auth settings associated with web app.
33867// slot - name of web app slot. If not specified then will default to production slot.
33868func (client AppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, slot string) (result SiteAuthSettingsV2, err error) {
33869	if tracing.IsEnabled() {
33870		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsV2Slot")
33871		defer func() {
33872			sc := -1
33873			if result.Response.Response != nil {
33874				sc = result.Response.Response.StatusCode
33875			}
33876			tracing.EndSpan(ctx, sc, err)
33877		}()
33878	}
33879	if err := validation.Validate([]validation.Validation{
33880		{TargetValue: resourceGroupName,
33881			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33882				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33883				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33884		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsV2Slot", err.Error())
33885	}
33886
33887	req, err := client.UpdateAuthSettingsV2SlotPreparer(ctx, resourceGroupName, name, siteAuthSettingsV2, slot)
33888	if err != nil {
33889		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2Slot", nil, "Failure preparing request")
33890		return
33891	}
33892
33893	resp, err := client.UpdateAuthSettingsV2SlotSender(req)
33894	if err != nil {
33895		result.Response = autorest.Response{Response: resp}
33896		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2Slot", resp, "Failure sending request")
33897		return
33898	}
33899
33900	result, err = client.UpdateAuthSettingsV2SlotResponder(resp)
33901	if err != nil {
33902		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2Slot", resp, "Failure responding to request")
33903		return
33904	}
33905
33906	return
33907}
33908
33909// UpdateAuthSettingsV2SlotPreparer prepares the UpdateAuthSettingsV2Slot request.
33910func (client AppsClient) UpdateAuthSettingsV2SlotPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, slot string) (*http.Request, error) {
33911	pathParameters := map[string]interface{}{
33912		"name":              autorest.Encode("path", name),
33913		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33914		"slot":              autorest.Encode("path", slot),
33915		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33916	}
33917
33918	const APIVersion = "2021-01-15"
33919	queryParameters := map[string]interface{}{
33920		"api-version": APIVersion,
33921	}
33922
33923	preparer := autorest.CreatePreparer(
33924		autorest.AsContentType("application/json; charset=utf-8"),
33925		autorest.AsPut(),
33926		autorest.WithBaseURL(client.BaseURI),
33927		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2", pathParameters),
33928		autorest.WithJSON(siteAuthSettingsV2),
33929		autorest.WithQueryParameters(queryParameters))
33930	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33931}
33932
33933// UpdateAuthSettingsV2SlotSender sends the UpdateAuthSettingsV2Slot request. The method will close the
33934// http.Response Body if it receives an error.
33935func (client AppsClient) UpdateAuthSettingsV2SlotSender(req *http.Request) (*http.Response, error) {
33936	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33937}
33938
33939// UpdateAuthSettingsV2SlotResponder handles the response to the UpdateAuthSettingsV2Slot request. The method always
33940// closes the http.Response Body.
33941func (client AppsClient) UpdateAuthSettingsV2SlotResponder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
33942	err = autorest.Respond(
33943		resp,
33944		azure.WithErrorUnlessStatusCode(http.StatusOK),
33945		autorest.ByUnmarshallingJSON(&result),
33946		autorest.ByClosing())
33947	result.Response = autorest.Response{Response: resp}
33948	return
33949}
33950
33951// UpdateAzureStorageAccounts description for Updates the Azure storage account configurations of an app.
33952// Parameters:
33953// resourceGroupName - name of the resource group to which the resource belongs.
33954// name - name of the app.
33955// azureStorageAccounts - azure storage accounts of the app.
33956func (client AppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (result AzureStoragePropertyDictionaryResource, err error) {
33957	if tracing.IsEnabled() {
33958		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAzureStorageAccounts")
33959		defer func() {
33960			sc := -1
33961			if result.Response.Response != nil {
33962				sc = result.Response.Response.StatusCode
33963			}
33964			tracing.EndSpan(ctx, sc, err)
33965		}()
33966	}
33967	if err := validation.Validate([]validation.Validation{
33968		{TargetValue: resourceGroupName,
33969			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33970				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33971				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33972		return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccounts", err.Error())
33973	}
33974
33975	req, err := client.UpdateAzureStorageAccountsPreparer(ctx, resourceGroupName, name, azureStorageAccounts)
33976	if err != nil {
33977		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", nil, "Failure preparing request")
33978		return
33979	}
33980
33981	resp, err := client.UpdateAzureStorageAccountsSender(req)
33982	if err != nil {
33983		result.Response = autorest.Response{Response: resp}
33984		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure sending request")
33985		return
33986	}
33987
33988	result, err = client.UpdateAzureStorageAccountsResponder(resp)
33989	if err != nil {
33990		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure responding to request")
33991		return
33992	}
33993
33994	return
33995}
33996
33997// UpdateAzureStorageAccountsPreparer prepares the UpdateAzureStorageAccounts request.
33998func (client AppsClient) UpdateAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (*http.Request, error) {
33999	pathParameters := map[string]interface{}{
34000		"name":              autorest.Encode("path", name),
34001		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34002		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34003	}
34004
34005	const APIVersion = "2021-01-15"
34006	queryParameters := map[string]interface{}{
34007		"api-version": APIVersion,
34008	}
34009
34010	preparer := autorest.CreatePreparer(
34011		autorest.AsContentType("application/json; charset=utf-8"),
34012		autorest.AsPut(),
34013		autorest.WithBaseURL(client.BaseURI),
34014		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts", pathParameters),
34015		autorest.WithJSON(azureStorageAccounts),
34016		autorest.WithQueryParameters(queryParameters))
34017	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34018}
34019
34020// UpdateAzureStorageAccountsSender sends the UpdateAzureStorageAccounts request. The method will close the
34021// http.Response Body if it receives an error.
34022func (client AppsClient) UpdateAzureStorageAccountsSender(req *http.Request) (*http.Response, error) {
34023	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34024}
34025
34026// UpdateAzureStorageAccountsResponder handles the response to the UpdateAzureStorageAccounts request. The method always
34027// closes the http.Response Body.
34028func (client AppsClient) UpdateAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
34029	err = autorest.Respond(
34030		resp,
34031		azure.WithErrorUnlessStatusCode(http.StatusOK),
34032		autorest.ByUnmarshallingJSON(&result),
34033		autorest.ByClosing())
34034	result.Response = autorest.Response{Response: resp}
34035	return
34036}
34037
34038// UpdateAzureStorageAccountsSlot description for Updates the Azure storage account configurations of an app.
34039// Parameters:
34040// resourceGroupName - name of the resource group to which the resource belongs.
34041// name - name of the app.
34042// azureStorageAccounts - azure storage accounts of the app.
34043// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage
34044// account configurations for the production slot.
34045func (client AppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (result AzureStoragePropertyDictionaryResource, err error) {
34046	if tracing.IsEnabled() {
34047		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAzureStorageAccountsSlot")
34048		defer func() {
34049			sc := -1
34050			if result.Response.Response != nil {
34051				sc = result.Response.Response.StatusCode
34052			}
34053			tracing.EndSpan(ctx, sc, err)
34054		}()
34055	}
34056	if err := validation.Validate([]validation.Validation{
34057		{TargetValue: resourceGroupName,
34058			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34059				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34060				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34061		return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccountsSlot", err.Error())
34062	}
34063
34064	req, err := client.UpdateAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, azureStorageAccounts, slot)
34065	if err != nil {
34066		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", nil, "Failure preparing request")
34067		return
34068	}
34069
34070	resp, err := client.UpdateAzureStorageAccountsSlotSender(req)
34071	if err != nil {
34072		result.Response = autorest.Response{Response: resp}
34073		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure sending request")
34074		return
34075	}
34076
34077	result, err = client.UpdateAzureStorageAccountsSlotResponder(resp)
34078	if err != nil {
34079		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure responding to request")
34080		return
34081	}
34082
34083	return
34084}
34085
34086// UpdateAzureStorageAccountsSlotPreparer prepares the UpdateAzureStorageAccountsSlot request.
34087func (client AppsClient) UpdateAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (*http.Request, error) {
34088	pathParameters := map[string]interface{}{
34089		"name":              autorest.Encode("path", name),
34090		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34091		"slot":              autorest.Encode("path", slot),
34092		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34093	}
34094
34095	const APIVersion = "2021-01-15"
34096	queryParameters := map[string]interface{}{
34097		"api-version": APIVersion,
34098	}
34099
34100	preparer := autorest.CreatePreparer(
34101		autorest.AsContentType("application/json; charset=utf-8"),
34102		autorest.AsPut(),
34103		autorest.WithBaseURL(client.BaseURI),
34104		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts", pathParameters),
34105		autorest.WithJSON(azureStorageAccounts),
34106		autorest.WithQueryParameters(queryParameters))
34107	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34108}
34109
34110// UpdateAzureStorageAccountsSlotSender sends the UpdateAzureStorageAccountsSlot request. The method will close the
34111// http.Response Body if it receives an error.
34112func (client AppsClient) UpdateAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) {
34113	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34114}
34115
34116// UpdateAzureStorageAccountsSlotResponder handles the response to the UpdateAzureStorageAccountsSlot request. The method always
34117// closes the http.Response Body.
34118func (client AppsClient) UpdateAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
34119	err = autorest.Respond(
34120		resp,
34121		azure.WithErrorUnlessStatusCode(http.StatusOK),
34122		autorest.ByUnmarshallingJSON(&result),
34123		autorest.ByClosing())
34124	result.Response = autorest.Response{Response: resp}
34125	return
34126}
34127
34128// UpdateBackupConfiguration description for Updates the backup configuration of an app.
34129// Parameters:
34130// resourceGroupName - name of the resource group to which the resource belongs.
34131// name - name of the app.
34132// request - edited backup configuration.
34133func (client AppsClient) UpdateBackupConfiguration(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (result BackupRequest, err error) {
34134	if tracing.IsEnabled() {
34135		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateBackupConfiguration")
34136		defer func() {
34137			sc := -1
34138			if result.Response.Response != nil {
34139				sc = result.Response.Response.StatusCode
34140			}
34141			tracing.EndSpan(ctx, sc, err)
34142		}()
34143	}
34144	if err := validation.Validate([]validation.Validation{
34145		{TargetValue: resourceGroupName,
34146			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34147				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34148				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
34149		{TargetValue: request,
34150			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
34151				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
34152					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
34153						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
34154							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
34155							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
34156						}},
34157				}}}}}); err != nil {
34158		return result, validation.NewError("web.AppsClient", "UpdateBackupConfiguration", err.Error())
34159	}
34160
34161	req, err := client.UpdateBackupConfigurationPreparer(ctx, resourceGroupName, name, request)
34162	if err != nil {
34163		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", nil, "Failure preparing request")
34164		return
34165	}
34166
34167	resp, err := client.UpdateBackupConfigurationSender(req)
34168	if err != nil {
34169		result.Response = autorest.Response{Response: resp}
34170		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", resp, "Failure sending request")
34171		return
34172	}
34173
34174	result, err = client.UpdateBackupConfigurationResponder(resp)
34175	if err != nil {
34176		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", resp, "Failure responding to request")
34177		return
34178	}
34179
34180	return
34181}
34182
34183// UpdateBackupConfigurationPreparer prepares the UpdateBackupConfiguration request.
34184func (client AppsClient) UpdateBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (*http.Request, error) {
34185	pathParameters := map[string]interface{}{
34186		"name":              autorest.Encode("path", name),
34187		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34188		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34189	}
34190
34191	const APIVersion = "2021-01-15"
34192	queryParameters := map[string]interface{}{
34193		"api-version": APIVersion,
34194	}
34195
34196	preparer := autorest.CreatePreparer(
34197		autorest.AsContentType("application/json; charset=utf-8"),
34198		autorest.AsPut(),
34199		autorest.WithBaseURL(client.BaseURI),
34200		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters),
34201		autorest.WithJSON(request),
34202		autorest.WithQueryParameters(queryParameters))
34203	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34204}
34205
34206// UpdateBackupConfigurationSender sends the UpdateBackupConfiguration request. The method will close the
34207// http.Response Body if it receives an error.
34208func (client AppsClient) UpdateBackupConfigurationSender(req *http.Request) (*http.Response, error) {
34209	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34210}
34211
34212// UpdateBackupConfigurationResponder handles the response to the UpdateBackupConfiguration request. The method always
34213// closes the http.Response Body.
34214func (client AppsClient) UpdateBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) {
34215	err = autorest.Respond(
34216		resp,
34217		azure.WithErrorUnlessStatusCode(http.StatusOK),
34218		autorest.ByUnmarshallingJSON(&result),
34219		autorest.ByClosing())
34220	result.Response = autorest.Response{Response: resp}
34221	return
34222}
34223
34224// UpdateBackupConfigurationSlot description for Updates the backup configuration of an app.
34225// Parameters:
34226// resourceGroupName - name of the resource group to which the resource belongs.
34227// name - name of the app.
34228// request - edited backup configuration.
34229// slot - name of the deployment slot. If a slot is not specified, the API will update the backup configuration
34230// for the production slot.
34231func (client AppsClient) UpdateBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (result BackupRequest, err error) {
34232	if tracing.IsEnabled() {
34233		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateBackupConfigurationSlot")
34234		defer func() {
34235			sc := -1
34236			if result.Response.Response != nil {
34237				sc = result.Response.Response.StatusCode
34238			}
34239			tracing.EndSpan(ctx, sc, err)
34240		}()
34241	}
34242	if err := validation.Validate([]validation.Validation{
34243		{TargetValue: resourceGroupName,
34244			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34245				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34246				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
34247		{TargetValue: request,
34248			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
34249				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
34250					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
34251						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
34252							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
34253							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
34254						}},
34255				}}}}}); err != nil {
34256		return result, validation.NewError("web.AppsClient", "UpdateBackupConfigurationSlot", err.Error())
34257	}
34258
34259	req, err := client.UpdateBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, request, slot)
34260	if err != nil {
34261		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", nil, "Failure preparing request")
34262		return
34263	}
34264
34265	resp, err := client.UpdateBackupConfigurationSlotSender(req)
34266	if err != nil {
34267		result.Response = autorest.Response{Response: resp}
34268		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", resp, "Failure sending request")
34269		return
34270	}
34271
34272	result, err = client.UpdateBackupConfigurationSlotResponder(resp)
34273	if err != nil {
34274		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", resp, "Failure responding to request")
34275		return
34276	}
34277
34278	return
34279}
34280
34281// UpdateBackupConfigurationSlotPreparer prepares the UpdateBackupConfigurationSlot request.
34282func (client AppsClient) UpdateBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (*http.Request, error) {
34283	pathParameters := map[string]interface{}{
34284		"name":              autorest.Encode("path", name),
34285		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34286		"slot":              autorest.Encode("path", slot),
34287		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34288	}
34289
34290	const APIVersion = "2021-01-15"
34291	queryParameters := map[string]interface{}{
34292		"api-version": APIVersion,
34293	}
34294
34295	preparer := autorest.CreatePreparer(
34296		autorest.AsContentType("application/json; charset=utf-8"),
34297		autorest.AsPut(),
34298		autorest.WithBaseURL(client.BaseURI),
34299		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters),
34300		autorest.WithJSON(request),
34301		autorest.WithQueryParameters(queryParameters))
34302	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34303}
34304
34305// UpdateBackupConfigurationSlotSender sends the UpdateBackupConfigurationSlot request. The method will close the
34306// http.Response Body if it receives an error.
34307func (client AppsClient) UpdateBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
34308	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34309}
34310
34311// UpdateBackupConfigurationSlotResponder handles the response to the UpdateBackupConfigurationSlot request. The method always
34312// closes the http.Response Body.
34313func (client AppsClient) UpdateBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) {
34314	err = autorest.Respond(
34315		resp,
34316		azure.WithErrorUnlessStatusCode(http.StatusOK),
34317		autorest.ByUnmarshallingJSON(&result),
34318		autorest.ByClosing())
34319	result.Response = autorest.Response{Response: resp}
34320	return
34321}
34322
34323// UpdateConfiguration description for Updates the configuration of an app.
34324// Parameters:
34325// resourceGroupName - name of the resource group to which the resource belongs.
34326// name - name of the app.
34327// siteConfig - JSON representation of a SiteConfig object. See example.
34328func (client AppsClient) UpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) {
34329	if tracing.IsEnabled() {
34330		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConfiguration")
34331		defer func() {
34332			sc := -1
34333			if result.Response.Response != nil {
34334				sc = result.Response.Response.StatusCode
34335			}
34336			tracing.EndSpan(ctx, sc, err)
34337		}()
34338	}
34339	if err := validation.Validate([]validation.Validation{
34340		{TargetValue: resourceGroupName,
34341			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34342				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34343				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34344		return result, validation.NewError("web.AppsClient", "UpdateConfiguration", err.Error())
34345	}
34346
34347	req, err := client.UpdateConfigurationPreparer(ctx, resourceGroupName, name, siteConfig)
34348	if err != nil {
34349		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", nil, "Failure preparing request")
34350		return
34351	}
34352
34353	resp, err := client.UpdateConfigurationSender(req)
34354	if err != nil {
34355		result.Response = autorest.Response{Response: resp}
34356		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", resp, "Failure sending request")
34357		return
34358	}
34359
34360	result, err = client.UpdateConfigurationResponder(resp)
34361	if err != nil {
34362		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", resp, "Failure responding to request")
34363		return
34364	}
34365
34366	return
34367}
34368
34369// UpdateConfigurationPreparer prepares the UpdateConfiguration request.
34370func (client AppsClient) UpdateConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (*http.Request, error) {
34371	pathParameters := map[string]interface{}{
34372		"name":              autorest.Encode("path", name),
34373		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34374		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34375	}
34376
34377	const APIVersion = "2021-01-15"
34378	queryParameters := map[string]interface{}{
34379		"api-version": APIVersion,
34380	}
34381
34382	preparer := autorest.CreatePreparer(
34383		autorest.AsContentType("application/json; charset=utf-8"),
34384		autorest.AsPatch(),
34385		autorest.WithBaseURL(client.BaseURI),
34386		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
34387		autorest.WithJSON(siteConfig),
34388		autorest.WithQueryParameters(queryParameters))
34389	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34390}
34391
34392// UpdateConfigurationSender sends the UpdateConfiguration request. The method will close the
34393// http.Response Body if it receives an error.
34394func (client AppsClient) UpdateConfigurationSender(req *http.Request) (*http.Response, error) {
34395	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34396}
34397
34398// UpdateConfigurationResponder handles the response to the UpdateConfiguration request. The method always
34399// closes the http.Response Body.
34400func (client AppsClient) UpdateConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
34401	err = autorest.Respond(
34402		resp,
34403		azure.WithErrorUnlessStatusCode(http.StatusOK),
34404		autorest.ByUnmarshallingJSON(&result),
34405		autorest.ByClosing())
34406	result.Response = autorest.Response{Response: resp}
34407	return
34408}
34409
34410// UpdateConfigurationSlot description for Updates the configuration of an app.
34411// Parameters:
34412// resourceGroupName - name of the resource group to which the resource belongs.
34413// name - name of the app.
34414// siteConfig - JSON representation of a SiteConfig object. See example.
34415// slot - name of the deployment slot. If a slot is not specified, the API will update configuration for the
34416// production slot.
34417func (client AppsClient) UpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) {
34418	if tracing.IsEnabled() {
34419		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConfigurationSlot")
34420		defer func() {
34421			sc := -1
34422			if result.Response.Response != nil {
34423				sc = result.Response.Response.StatusCode
34424			}
34425			tracing.EndSpan(ctx, sc, err)
34426		}()
34427	}
34428	if err := validation.Validate([]validation.Validation{
34429		{TargetValue: resourceGroupName,
34430			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34431				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34432				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34433		return result, validation.NewError("web.AppsClient", "UpdateConfigurationSlot", err.Error())
34434	}
34435
34436	req, err := client.UpdateConfigurationSlotPreparer(ctx, resourceGroupName, name, siteConfig, slot)
34437	if err != nil {
34438		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", nil, "Failure preparing request")
34439		return
34440	}
34441
34442	resp, err := client.UpdateConfigurationSlotSender(req)
34443	if err != nil {
34444		result.Response = autorest.Response{Response: resp}
34445		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", resp, "Failure sending request")
34446		return
34447	}
34448
34449	result, err = client.UpdateConfigurationSlotResponder(resp)
34450	if err != nil {
34451		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", resp, "Failure responding to request")
34452		return
34453	}
34454
34455	return
34456}
34457
34458// UpdateConfigurationSlotPreparer prepares the UpdateConfigurationSlot request.
34459func (client AppsClient) UpdateConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (*http.Request, error) {
34460	pathParameters := map[string]interface{}{
34461		"name":              autorest.Encode("path", name),
34462		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34463		"slot":              autorest.Encode("path", slot),
34464		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34465	}
34466
34467	const APIVersion = "2021-01-15"
34468	queryParameters := map[string]interface{}{
34469		"api-version": APIVersion,
34470	}
34471
34472	preparer := autorest.CreatePreparer(
34473		autorest.AsContentType("application/json; charset=utf-8"),
34474		autorest.AsPatch(),
34475		autorest.WithBaseURL(client.BaseURI),
34476		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
34477		autorest.WithJSON(siteConfig),
34478		autorest.WithQueryParameters(queryParameters))
34479	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34480}
34481
34482// UpdateConfigurationSlotSender sends the UpdateConfigurationSlot request. The method will close the
34483// http.Response Body if it receives an error.
34484func (client AppsClient) UpdateConfigurationSlotSender(req *http.Request) (*http.Response, error) {
34485	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34486}
34487
34488// UpdateConfigurationSlotResponder handles the response to the UpdateConfigurationSlot request. The method always
34489// closes the http.Response Body.
34490func (client AppsClient) UpdateConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
34491	err = autorest.Respond(
34492		resp,
34493		azure.WithErrorUnlessStatusCode(http.StatusOK),
34494		autorest.ByUnmarshallingJSON(&result),
34495		autorest.ByClosing())
34496	result.Response = autorest.Response{Response: resp}
34497	return
34498}
34499
34500// UpdateConnectionStrings description for Replaces the connection strings of an app.
34501// Parameters:
34502// resourceGroupName - name of the resource group to which the resource belongs.
34503// name - name of the app.
34504// connectionStrings - connection strings of the app or deployment slot. See example.
34505func (client AppsClient) UpdateConnectionStrings(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (result ConnectionStringDictionary, err error) {
34506	if tracing.IsEnabled() {
34507		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConnectionStrings")
34508		defer func() {
34509			sc := -1
34510			if result.Response.Response != nil {
34511				sc = result.Response.Response.StatusCode
34512			}
34513			tracing.EndSpan(ctx, sc, err)
34514		}()
34515	}
34516	if err := validation.Validate([]validation.Validation{
34517		{TargetValue: resourceGroupName,
34518			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34519				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34520				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34521		return result, validation.NewError("web.AppsClient", "UpdateConnectionStrings", err.Error())
34522	}
34523
34524	req, err := client.UpdateConnectionStringsPreparer(ctx, resourceGroupName, name, connectionStrings)
34525	if err != nil {
34526		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", nil, "Failure preparing request")
34527		return
34528	}
34529
34530	resp, err := client.UpdateConnectionStringsSender(req)
34531	if err != nil {
34532		result.Response = autorest.Response{Response: resp}
34533		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", resp, "Failure sending request")
34534		return
34535	}
34536
34537	result, err = client.UpdateConnectionStringsResponder(resp)
34538	if err != nil {
34539		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", resp, "Failure responding to request")
34540		return
34541	}
34542
34543	return
34544}
34545
34546// UpdateConnectionStringsPreparer prepares the UpdateConnectionStrings request.
34547func (client AppsClient) UpdateConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (*http.Request, error) {
34548	pathParameters := map[string]interface{}{
34549		"name":              autorest.Encode("path", name),
34550		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34551		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34552	}
34553
34554	const APIVersion = "2021-01-15"
34555	queryParameters := map[string]interface{}{
34556		"api-version": APIVersion,
34557	}
34558
34559	preparer := autorest.CreatePreparer(
34560		autorest.AsContentType("application/json; charset=utf-8"),
34561		autorest.AsPut(),
34562		autorest.WithBaseURL(client.BaseURI),
34563		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings", pathParameters),
34564		autorest.WithJSON(connectionStrings),
34565		autorest.WithQueryParameters(queryParameters))
34566	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34567}
34568
34569// UpdateConnectionStringsSender sends the UpdateConnectionStrings request. The method will close the
34570// http.Response Body if it receives an error.
34571func (client AppsClient) UpdateConnectionStringsSender(req *http.Request) (*http.Response, error) {
34572	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34573}
34574
34575// UpdateConnectionStringsResponder handles the response to the UpdateConnectionStrings request. The method always
34576// closes the http.Response Body.
34577func (client AppsClient) UpdateConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
34578	err = autorest.Respond(
34579		resp,
34580		azure.WithErrorUnlessStatusCode(http.StatusOK),
34581		autorest.ByUnmarshallingJSON(&result),
34582		autorest.ByClosing())
34583	result.Response = autorest.Response{Response: resp}
34584	return
34585}
34586
34587// UpdateConnectionStringsSlot description for Replaces the connection strings of an app.
34588// Parameters:
34589// resourceGroupName - name of the resource group to which the resource belongs.
34590// name - name of the app.
34591// connectionStrings - connection strings of the app or deployment slot. See example.
34592// slot - name of the deployment slot. If a slot is not specified, the API will update the connection settings
34593// for the production slot.
34594func (client AppsClient) UpdateConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (result ConnectionStringDictionary, err error) {
34595	if tracing.IsEnabled() {
34596		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConnectionStringsSlot")
34597		defer func() {
34598			sc := -1
34599			if result.Response.Response != nil {
34600				sc = result.Response.Response.StatusCode
34601			}
34602			tracing.EndSpan(ctx, sc, err)
34603		}()
34604	}
34605	if err := validation.Validate([]validation.Validation{
34606		{TargetValue: resourceGroupName,
34607			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34608				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34609				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34610		return result, validation.NewError("web.AppsClient", "UpdateConnectionStringsSlot", err.Error())
34611	}
34612
34613	req, err := client.UpdateConnectionStringsSlotPreparer(ctx, resourceGroupName, name, connectionStrings, slot)
34614	if err != nil {
34615		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", nil, "Failure preparing request")
34616		return
34617	}
34618
34619	resp, err := client.UpdateConnectionStringsSlotSender(req)
34620	if err != nil {
34621		result.Response = autorest.Response{Response: resp}
34622		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", resp, "Failure sending request")
34623		return
34624	}
34625
34626	result, err = client.UpdateConnectionStringsSlotResponder(resp)
34627	if err != nil {
34628		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", resp, "Failure responding to request")
34629		return
34630	}
34631
34632	return
34633}
34634
34635// UpdateConnectionStringsSlotPreparer prepares the UpdateConnectionStringsSlot request.
34636func (client AppsClient) UpdateConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (*http.Request, error) {
34637	pathParameters := map[string]interface{}{
34638		"name":              autorest.Encode("path", name),
34639		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34640		"slot":              autorest.Encode("path", slot),
34641		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34642	}
34643
34644	const APIVersion = "2021-01-15"
34645	queryParameters := map[string]interface{}{
34646		"api-version": APIVersion,
34647	}
34648
34649	preparer := autorest.CreatePreparer(
34650		autorest.AsContentType("application/json; charset=utf-8"),
34651		autorest.AsPut(),
34652		autorest.WithBaseURL(client.BaseURI),
34653		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings", pathParameters),
34654		autorest.WithJSON(connectionStrings),
34655		autorest.WithQueryParameters(queryParameters))
34656	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34657}
34658
34659// UpdateConnectionStringsSlotSender sends the UpdateConnectionStringsSlot request. The method will close the
34660// http.Response Body if it receives an error.
34661func (client AppsClient) UpdateConnectionStringsSlotSender(req *http.Request) (*http.Response, error) {
34662	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34663}
34664
34665// UpdateConnectionStringsSlotResponder handles the response to the UpdateConnectionStringsSlot request. The method always
34666// closes the http.Response Body.
34667func (client AppsClient) UpdateConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
34668	err = autorest.Respond(
34669		resp,
34670		azure.WithErrorUnlessStatusCode(http.StatusOK),
34671		autorest.ByUnmarshallingJSON(&result),
34672		autorest.ByClosing())
34673	result.Response = autorest.Response{Response: resp}
34674	return
34675}
34676
34677// UpdateDiagnosticLogsConfig description for Updates the logging configuration of an app.
34678// Parameters:
34679// resourceGroupName - name of the resource group to which the resource belongs.
34680// name - name of the app.
34681// siteLogsConfig - a SiteLogsConfig JSON object that contains the logging configuration to change in the
34682// "properties" property.
34683func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (result SiteLogsConfig, err error) {
34684	if tracing.IsEnabled() {
34685		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDiagnosticLogsConfig")
34686		defer func() {
34687			sc := -1
34688			if result.Response.Response != nil {
34689				sc = result.Response.Response.StatusCode
34690			}
34691			tracing.EndSpan(ctx, sc, err)
34692		}()
34693	}
34694	if err := validation.Validate([]validation.Validation{
34695		{TargetValue: resourceGroupName,
34696			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34697				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34698				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
34699		{TargetValue: siteLogsConfig,
34700			Constraints: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties", Name: validation.Null, Rule: false,
34701				Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs", Name: validation.Null, Rule: false,
34702					Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage", Name: validation.Null, Rule: false,
34703						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage.SasURL", Name: validation.Null, Rule: true, Chain: nil}}},
34704					}},
34705					{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false,
34706						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false,
34707							Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false,
34708								Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
34709									{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil},
34710								}},
34711							}},
34712						}},
34713				}}}}}); err != nil {
34714		return result, validation.NewError("web.AppsClient", "UpdateDiagnosticLogsConfig", err.Error())
34715	}
34716
34717	req, err := client.UpdateDiagnosticLogsConfigPreparer(ctx, resourceGroupName, name, siteLogsConfig)
34718	if err != nil {
34719		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", nil, "Failure preparing request")
34720		return
34721	}
34722
34723	resp, err := client.UpdateDiagnosticLogsConfigSender(req)
34724	if err != nil {
34725		result.Response = autorest.Response{Response: resp}
34726		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", resp, "Failure sending request")
34727		return
34728	}
34729
34730	result, err = client.UpdateDiagnosticLogsConfigResponder(resp)
34731	if err != nil {
34732		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", resp, "Failure responding to request")
34733		return
34734	}
34735
34736	return
34737}
34738
34739// UpdateDiagnosticLogsConfigPreparer prepares the UpdateDiagnosticLogsConfig request.
34740func (client AppsClient) UpdateDiagnosticLogsConfigPreparer(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (*http.Request, error) {
34741	pathParameters := map[string]interface{}{
34742		"name":              autorest.Encode("path", name),
34743		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34744		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34745	}
34746
34747	const APIVersion = "2021-01-15"
34748	queryParameters := map[string]interface{}{
34749		"api-version": APIVersion,
34750	}
34751
34752	preparer := autorest.CreatePreparer(
34753		autorest.AsContentType("application/json; charset=utf-8"),
34754		autorest.AsPut(),
34755		autorest.WithBaseURL(client.BaseURI),
34756		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters),
34757		autorest.WithJSON(siteLogsConfig),
34758		autorest.WithQueryParameters(queryParameters))
34759	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34760}
34761
34762// UpdateDiagnosticLogsConfigSender sends the UpdateDiagnosticLogsConfig request. The method will close the
34763// http.Response Body if it receives an error.
34764func (client AppsClient) UpdateDiagnosticLogsConfigSender(req *http.Request) (*http.Response, error) {
34765	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34766}
34767
34768// UpdateDiagnosticLogsConfigResponder handles the response to the UpdateDiagnosticLogsConfig request. The method always
34769// closes the http.Response Body.
34770func (client AppsClient) UpdateDiagnosticLogsConfigResponder(resp *http.Response) (result SiteLogsConfig, err error) {
34771	err = autorest.Respond(
34772		resp,
34773		azure.WithErrorUnlessStatusCode(http.StatusOK),
34774		autorest.ByUnmarshallingJSON(&result),
34775		autorest.ByClosing())
34776	result.Response = autorest.Response{Response: resp}
34777	return
34778}
34779
34780// UpdateDiagnosticLogsConfigSlot description for Updates the logging configuration of an app.
34781// Parameters:
34782// resourceGroupName - name of the resource group to which the resource belongs.
34783// name - name of the app.
34784// siteLogsConfig - a SiteLogsConfig JSON object that contains the logging configuration to change in the
34785// "properties" property.
34786// slot - name of the deployment slot. If a slot is not specified, the API will update the logging
34787// configuration for the production slot.
34788func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (result SiteLogsConfig, err error) {
34789	if tracing.IsEnabled() {
34790		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDiagnosticLogsConfigSlot")
34791		defer func() {
34792			sc := -1
34793			if result.Response.Response != nil {
34794				sc = result.Response.Response.StatusCode
34795			}
34796			tracing.EndSpan(ctx, sc, err)
34797		}()
34798	}
34799	if err := validation.Validate([]validation.Validation{
34800		{TargetValue: resourceGroupName,
34801			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34802				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34803				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
34804		{TargetValue: siteLogsConfig,
34805			Constraints: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties", Name: validation.Null, Rule: false,
34806				Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs", Name: validation.Null, Rule: false,
34807					Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage", Name: validation.Null, Rule: false,
34808						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage.SasURL", Name: validation.Null, Rule: true, Chain: nil}}},
34809					}},
34810					{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false,
34811						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false,
34812							Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false,
34813								Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
34814									{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil},
34815								}},
34816							}},
34817						}},
34818				}}}}}); err != nil {
34819		return result, validation.NewError("web.AppsClient", "UpdateDiagnosticLogsConfigSlot", err.Error())
34820	}
34821
34822	req, err := client.UpdateDiagnosticLogsConfigSlotPreparer(ctx, resourceGroupName, name, siteLogsConfig, slot)
34823	if err != nil {
34824		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", nil, "Failure preparing request")
34825		return
34826	}
34827
34828	resp, err := client.UpdateDiagnosticLogsConfigSlotSender(req)
34829	if err != nil {
34830		result.Response = autorest.Response{Response: resp}
34831		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", resp, "Failure sending request")
34832		return
34833	}
34834
34835	result, err = client.UpdateDiagnosticLogsConfigSlotResponder(resp)
34836	if err != nil {
34837		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", resp, "Failure responding to request")
34838		return
34839	}
34840
34841	return
34842}
34843
34844// UpdateDiagnosticLogsConfigSlotPreparer prepares the UpdateDiagnosticLogsConfigSlot request.
34845func (client AppsClient) UpdateDiagnosticLogsConfigSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (*http.Request, error) {
34846	pathParameters := map[string]interface{}{
34847		"name":              autorest.Encode("path", name),
34848		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34849		"slot":              autorest.Encode("path", slot),
34850		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34851	}
34852
34853	const APIVersion = "2021-01-15"
34854	queryParameters := map[string]interface{}{
34855		"api-version": APIVersion,
34856	}
34857
34858	preparer := autorest.CreatePreparer(
34859		autorest.AsContentType("application/json; charset=utf-8"),
34860		autorest.AsPut(),
34861		autorest.WithBaseURL(client.BaseURI),
34862		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters),
34863		autorest.WithJSON(siteLogsConfig),
34864		autorest.WithQueryParameters(queryParameters))
34865	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34866}
34867
34868// UpdateDiagnosticLogsConfigSlotSender sends the UpdateDiagnosticLogsConfigSlot request. The method will close the
34869// http.Response Body if it receives an error.
34870func (client AppsClient) UpdateDiagnosticLogsConfigSlotSender(req *http.Request) (*http.Response, error) {
34871	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34872}
34873
34874// UpdateDiagnosticLogsConfigSlotResponder handles the response to the UpdateDiagnosticLogsConfigSlot request. The method always
34875// closes the http.Response Body.
34876func (client AppsClient) UpdateDiagnosticLogsConfigSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) {
34877	err = autorest.Respond(
34878		resp,
34879		azure.WithErrorUnlessStatusCode(http.StatusOK),
34880		autorest.ByUnmarshallingJSON(&result),
34881		autorest.ByClosing())
34882	result.Response = autorest.Response{Response: resp}
34883	return
34884}
34885
34886// UpdateDomainOwnershipIdentifier description for Creates a domain ownership identifier for web app, or updates an
34887// existing ownership identifier.
34888// Parameters:
34889// resourceGroupName - name of the resource group to which the resource belongs.
34890// name - name of the app.
34891// domainOwnershipIdentifierName - name of domain ownership identifier.
34892// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
34893func (client AppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) {
34894	if tracing.IsEnabled() {
34895		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDomainOwnershipIdentifier")
34896		defer func() {
34897			sc := -1
34898			if result.Response.Response != nil {
34899				sc = result.Response.Response.StatusCode
34900			}
34901			tracing.EndSpan(ctx, sc, err)
34902		}()
34903	}
34904	if err := validation.Validate([]validation.Validation{
34905		{TargetValue: resourceGroupName,
34906			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34907				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34908				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34909		return result, validation.NewError("web.AppsClient", "UpdateDomainOwnershipIdentifier", err.Error())
34910	}
34911
34912	req, err := client.UpdateDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier)
34913	if err != nil {
34914		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", nil, "Failure preparing request")
34915		return
34916	}
34917
34918	resp, err := client.UpdateDomainOwnershipIdentifierSender(req)
34919	if err != nil {
34920		result.Response = autorest.Response{Response: resp}
34921		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", resp, "Failure sending request")
34922		return
34923	}
34924
34925	result, err = client.UpdateDomainOwnershipIdentifierResponder(resp)
34926	if err != nil {
34927		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", resp, "Failure responding to request")
34928		return
34929	}
34930
34931	return
34932}
34933
34934// UpdateDomainOwnershipIdentifierPreparer prepares the UpdateDomainOwnershipIdentifier request.
34935func (client AppsClient) UpdateDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (*http.Request, error) {
34936	pathParameters := map[string]interface{}{
34937		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
34938		"name":                          autorest.Encode("path", name),
34939		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
34940		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
34941	}
34942
34943	const APIVersion = "2021-01-15"
34944	queryParameters := map[string]interface{}{
34945		"api-version": APIVersion,
34946	}
34947
34948	preparer := autorest.CreatePreparer(
34949		autorest.AsContentType("application/json; charset=utf-8"),
34950		autorest.AsPatch(),
34951		autorest.WithBaseURL(client.BaseURI),
34952		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
34953		autorest.WithJSON(domainOwnershipIdentifier),
34954		autorest.WithQueryParameters(queryParameters))
34955	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34956}
34957
34958// UpdateDomainOwnershipIdentifierSender sends the UpdateDomainOwnershipIdentifier request. The method will close the
34959// http.Response Body if it receives an error.
34960func (client AppsClient) UpdateDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
34961	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34962}
34963
34964// UpdateDomainOwnershipIdentifierResponder handles the response to the UpdateDomainOwnershipIdentifier request. The method always
34965// closes the http.Response Body.
34966func (client AppsClient) UpdateDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
34967	err = autorest.Respond(
34968		resp,
34969		azure.WithErrorUnlessStatusCode(http.StatusOK),
34970		autorest.ByUnmarshallingJSON(&result),
34971		autorest.ByClosing())
34972	result.Response = autorest.Response{Response: resp}
34973	return
34974}
34975
34976// UpdateDomainOwnershipIdentifierSlot description for Creates a domain ownership identifier for web app, or updates an
34977// existing ownership identifier.
34978// Parameters:
34979// resourceGroupName - name of the resource group to which the resource belongs.
34980// name - name of the app.
34981// domainOwnershipIdentifierName - name of domain ownership identifier.
34982// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
34983// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
34984// production slot.
34985func (client AppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) {
34986	if tracing.IsEnabled() {
34987		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDomainOwnershipIdentifierSlot")
34988		defer func() {
34989			sc := -1
34990			if result.Response.Response != nil {
34991				sc = result.Response.Response.StatusCode
34992			}
34993			tracing.EndSpan(ctx, sc, err)
34994		}()
34995	}
34996	if err := validation.Validate([]validation.Validation{
34997		{TargetValue: resourceGroupName,
34998			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34999				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35000				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35001		return result, validation.NewError("web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", err.Error())
35002	}
35003
35004	req, err := client.UpdateDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot)
35005	if err != nil {
35006		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
35007		return
35008	}
35009
35010	resp, err := client.UpdateDomainOwnershipIdentifierSlotSender(req)
35011	if err != nil {
35012		result.Response = autorest.Response{Response: resp}
35013		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", resp, "Failure sending request")
35014		return
35015	}
35016
35017	result, err = client.UpdateDomainOwnershipIdentifierSlotResponder(resp)
35018	if err != nil {
35019		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
35020		return
35021	}
35022
35023	return
35024}
35025
35026// UpdateDomainOwnershipIdentifierSlotPreparer prepares the UpdateDomainOwnershipIdentifierSlot request.
35027func (client AppsClient) UpdateDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (*http.Request, error) {
35028	pathParameters := map[string]interface{}{
35029		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
35030		"name":                          autorest.Encode("path", name),
35031		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
35032		"slot":                          autorest.Encode("path", slot),
35033		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
35034	}
35035
35036	const APIVersion = "2021-01-15"
35037	queryParameters := map[string]interface{}{
35038		"api-version": APIVersion,
35039	}
35040
35041	preparer := autorest.CreatePreparer(
35042		autorest.AsContentType("application/json; charset=utf-8"),
35043		autorest.AsPatch(),
35044		autorest.WithBaseURL(client.BaseURI),
35045		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
35046		autorest.WithJSON(domainOwnershipIdentifier),
35047		autorest.WithQueryParameters(queryParameters))
35048	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35049}
35050
35051// UpdateDomainOwnershipIdentifierSlotSender sends the UpdateDomainOwnershipIdentifierSlot request. The method will close the
35052// http.Response Body if it receives an error.
35053func (client AppsClient) UpdateDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
35054	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35055}
35056
35057// UpdateDomainOwnershipIdentifierSlotResponder handles the response to the UpdateDomainOwnershipIdentifierSlot request. The method always
35058// closes the http.Response Body.
35059func (client AppsClient) UpdateDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
35060	err = autorest.Respond(
35061		resp,
35062		azure.WithErrorUnlessStatusCode(http.StatusOK),
35063		autorest.ByUnmarshallingJSON(&result),
35064		autorest.ByClosing())
35065	result.Response = autorest.Response{Response: resp}
35066	return
35067}
35068
35069// UpdateFtpAllowed description for Updates whether FTP is allowed on the site or not.
35070// Parameters:
35071// resourceGroupName - name of the resource group to which the resource belongs.
35072// name - name of the app.
35073func (client AppsClient) UpdateFtpAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (result CsmPublishingCredentialsPoliciesEntity, err error) {
35074	if tracing.IsEnabled() {
35075		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateFtpAllowed")
35076		defer func() {
35077			sc := -1
35078			if result.Response.Response != nil {
35079				sc = result.Response.Response.StatusCode
35080			}
35081			tracing.EndSpan(ctx, sc, err)
35082		}()
35083	}
35084	if err := validation.Validate([]validation.Validation{
35085		{TargetValue: resourceGroupName,
35086			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35087				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35088				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
35089		{TargetValue: csmPublishingAccessPoliciesEntity,
35090			Constraints: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties", Name: validation.Null, Rule: false,
35091				Chain: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties.Allow", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
35092		return result, validation.NewError("web.AppsClient", "UpdateFtpAllowed", err.Error())
35093	}
35094
35095	req, err := client.UpdateFtpAllowedPreparer(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity)
35096	if err != nil {
35097		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowed", nil, "Failure preparing request")
35098		return
35099	}
35100
35101	resp, err := client.UpdateFtpAllowedSender(req)
35102	if err != nil {
35103		result.Response = autorest.Response{Response: resp}
35104		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowed", resp, "Failure sending request")
35105		return
35106	}
35107
35108	result, err = client.UpdateFtpAllowedResponder(resp)
35109	if err != nil {
35110		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowed", resp, "Failure responding to request")
35111		return
35112	}
35113
35114	return
35115}
35116
35117// UpdateFtpAllowedPreparer prepares the UpdateFtpAllowed request.
35118func (client AppsClient) UpdateFtpAllowedPreparer(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (*http.Request, error) {
35119	pathParameters := map[string]interface{}{
35120		"name":              autorest.Encode("path", name),
35121		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35122		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35123	}
35124
35125	const APIVersion = "2021-01-15"
35126	queryParameters := map[string]interface{}{
35127		"api-version": APIVersion,
35128	}
35129
35130	preparer := autorest.CreatePreparer(
35131		autorest.AsContentType("application/json; charset=utf-8"),
35132		autorest.AsPut(),
35133		autorest.WithBaseURL(client.BaseURI),
35134		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp", pathParameters),
35135		autorest.WithJSON(csmPublishingAccessPoliciesEntity),
35136		autorest.WithQueryParameters(queryParameters))
35137	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35138}
35139
35140// UpdateFtpAllowedSender sends the UpdateFtpAllowed request. The method will close the
35141// http.Response Body if it receives an error.
35142func (client AppsClient) UpdateFtpAllowedSender(req *http.Request) (*http.Response, error) {
35143	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35144}
35145
35146// UpdateFtpAllowedResponder handles the response to the UpdateFtpAllowed request. The method always
35147// closes the http.Response Body.
35148func (client AppsClient) UpdateFtpAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
35149	err = autorest.Respond(
35150		resp,
35151		azure.WithErrorUnlessStatusCode(http.StatusOK),
35152		autorest.ByUnmarshallingJSON(&result),
35153		autorest.ByClosing())
35154	result.Response = autorest.Response{Response: resp}
35155	return
35156}
35157
35158// UpdateFtpAllowedSlot description for Updates whether FTP is allowed on the site or not.
35159// Parameters:
35160// resourceGroupName - name of the resource group to which the resource belongs.
35161// name - name of the app.
35162func (client AppsClient) UpdateFtpAllowedSlot(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, slot string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
35163	if tracing.IsEnabled() {
35164		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateFtpAllowedSlot")
35165		defer func() {
35166			sc := -1
35167			if result.Response.Response != nil {
35168				sc = result.Response.Response.StatusCode
35169			}
35170			tracing.EndSpan(ctx, sc, err)
35171		}()
35172	}
35173	if err := validation.Validate([]validation.Validation{
35174		{TargetValue: resourceGroupName,
35175			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35176				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35177				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
35178		{TargetValue: csmPublishingAccessPoliciesEntity,
35179			Constraints: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties", Name: validation.Null, Rule: false,
35180				Chain: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties.Allow", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
35181		return result, validation.NewError("web.AppsClient", "UpdateFtpAllowedSlot", err.Error())
35182	}
35183
35184	req, err := client.UpdateFtpAllowedSlotPreparer(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot)
35185	if err != nil {
35186		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowedSlot", nil, "Failure preparing request")
35187		return
35188	}
35189
35190	resp, err := client.UpdateFtpAllowedSlotSender(req)
35191	if err != nil {
35192		result.Response = autorest.Response{Response: resp}
35193		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowedSlot", resp, "Failure sending request")
35194		return
35195	}
35196
35197	result, err = client.UpdateFtpAllowedSlotResponder(resp)
35198	if err != nil {
35199		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowedSlot", resp, "Failure responding to request")
35200		return
35201	}
35202
35203	return
35204}
35205
35206// UpdateFtpAllowedSlotPreparer prepares the UpdateFtpAllowedSlot request.
35207func (client AppsClient) UpdateFtpAllowedSlotPreparer(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, slot string) (*http.Request, error) {
35208	pathParameters := map[string]interface{}{
35209		"name":              autorest.Encode("path", name),
35210		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35211		"slot":              autorest.Encode("path", slot),
35212		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35213	}
35214
35215	const APIVersion = "2021-01-15"
35216	queryParameters := map[string]interface{}{
35217		"api-version": APIVersion,
35218	}
35219
35220	preparer := autorest.CreatePreparer(
35221		autorest.AsContentType("application/json; charset=utf-8"),
35222		autorest.AsPut(),
35223		autorest.WithBaseURL(client.BaseURI),
35224		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp", pathParameters),
35225		autorest.WithJSON(csmPublishingAccessPoliciesEntity),
35226		autorest.WithQueryParameters(queryParameters))
35227	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35228}
35229
35230// UpdateFtpAllowedSlotSender sends the UpdateFtpAllowedSlot request. The method will close the
35231// http.Response Body if it receives an error.
35232func (client AppsClient) UpdateFtpAllowedSlotSender(req *http.Request) (*http.Response, error) {
35233	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35234}
35235
35236// UpdateFtpAllowedSlotResponder handles the response to the UpdateFtpAllowedSlot request. The method always
35237// closes the http.Response Body.
35238func (client AppsClient) UpdateFtpAllowedSlotResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
35239	err = autorest.Respond(
35240		resp,
35241		azure.WithErrorUnlessStatusCode(http.StatusOK),
35242		autorest.ByUnmarshallingJSON(&result),
35243		autorest.ByClosing())
35244	result.Response = autorest.Response{Response: resp}
35245	return
35246}
35247
35248// UpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay.
35249// Parameters:
35250// resourceGroupName - name of the resource group to which the resource belongs.
35251// name - the name of the web app.
35252// namespaceName - the namespace for this hybrid connection.
35253// relayName - the relay name for this hybrid connection.
35254// connectionEnvelope - the details of the hybrid connection.
35255func (client AppsClient) UpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) {
35256	if tracing.IsEnabled() {
35257		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateHybridConnection")
35258		defer func() {
35259			sc := -1
35260			if result.Response.Response != nil {
35261				sc = result.Response.Response.StatusCode
35262			}
35263			tracing.EndSpan(ctx, sc, err)
35264		}()
35265	}
35266	if err := validation.Validate([]validation.Validation{
35267		{TargetValue: resourceGroupName,
35268			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35269				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35270				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35271		return result, validation.NewError("web.AppsClient", "UpdateHybridConnection", err.Error())
35272	}
35273
35274	req, err := client.UpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope)
35275	if err != nil {
35276		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", nil, "Failure preparing request")
35277		return
35278	}
35279
35280	resp, err := client.UpdateHybridConnectionSender(req)
35281	if err != nil {
35282		result.Response = autorest.Response{Response: resp}
35283		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", resp, "Failure sending request")
35284		return
35285	}
35286
35287	result, err = client.UpdateHybridConnectionResponder(resp)
35288	if err != nil {
35289		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", resp, "Failure responding to request")
35290		return
35291	}
35292
35293	return
35294}
35295
35296// UpdateHybridConnectionPreparer prepares the UpdateHybridConnection request.
35297func (client AppsClient) UpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) {
35298	pathParameters := map[string]interface{}{
35299		"name":              autorest.Encode("path", name),
35300		"namespaceName":     autorest.Encode("path", namespaceName),
35301		"relayName":         autorest.Encode("path", relayName),
35302		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35303		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35304	}
35305
35306	const APIVersion = "2021-01-15"
35307	queryParameters := map[string]interface{}{
35308		"api-version": APIVersion,
35309	}
35310
35311	preparer := autorest.CreatePreparer(
35312		autorest.AsContentType("application/json; charset=utf-8"),
35313		autorest.AsPatch(),
35314		autorest.WithBaseURL(client.BaseURI),
35315		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
35316		autorest.WithJSON(connectionEnvelope),
35317		autorest.WithQueryParameters(queryParameters))
35318	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35319}
35320
35321// UpdateHybridConnectionSender sends the UpdateHybridConnection request. The method will close the
35322// http.Response Body if it receives an error.
35323func (client AppsClient) UpdateHybridConnectionSender(req *http.Request) (*http.Response, error) {
35324	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35325}
35326
35327// UpdateHybridConnectionResponder handles the response to the UpdateHybridConnection request. The method always
35328// closes the http.Response Body.
35329func (client AppsClient) UpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
35330	err = autorest.Respond(
35331		resp,
35332		azure.WithErrorUnlessStatusCode(http.StatusOK),
35333		autorest.ByUnmarshallingJSON(&result),
35334		autorest.ByClosing())
35335	result.Response = autorest.Response{Response: resp}
35336	return
35337}
35338
35339// UpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay.
35340// Parameters:
35341// resourceGroupName - name of the resource group to which the resource belongs.
35342// name - the name of the web app.
35343// namespaceName - the namespace for this hybrid connection.
35344// relayName - the relay name for this hybrid connection.
35345// connectionEnvelope - the details of the hybrid connection.
35346// slot - the name of the slot for the web app.
35347func (client AppsClient) UpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) {
35348	if tracing.IsEnabled() {
35349		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateHybridConnectionSlot")
35350		defer func() {
35351			sc := -1
35352			if result.Response.Response != nil {
35353				sc = result.Response.Response.StatusCode
35354			}
35355			tracing.EndSpan(ctx, sc, err)
35356		}()
35357	}
35358	if err := validation.Validate([]validation.Validation{
35359		{TargetValue: resourceGroupName,
35360			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35361				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35362				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35363		return result, validation.NewError("web.AppsClient", "UpdateHybridConnectionSlot", err.Error())
35364	}
35365
35366	req, err := client.UpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot)
35367	if err != nil {
35368		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", nil, "Failure preparing request")
35369		return
35370	}
35371
35372	resp, err := client.UpdateHybridConnectionSlotSender(req)
35373	if err != nil {
35374		result.Response = autorest.Response{Response: resp}
35375		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", resp, "Failure sending request")
35376		return
35377	}
35378
35379	result, err = client.UpdateHybridConnectionSlotResponder(resp)
35380	if err != nil {
35381		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", resp, "Failure responding to request")
35382		return
35383	}
35384
35385	return
35386}
35387
35388// UpdateHybridConnectionSlotPreparer prepares the UpdateHybridConnectionSlot request.
35389func (client AppsClient) UpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) {
35390	pathParameters := map[string]interface{}{
35391		"name":              autorest.Encode("path", name),
35392		"namespaceName":     autorest.Encode("path", namespaceName),
35393		"relayName":         autorest.Encode("path", relayName),
35394		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35395		"slot":              autorest.Encode("path", slot),
35396		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35397	}
35398
35399	const APIVersion = "2021-01-15"
35400	queryParameters := map[string]interface{}{
35401		"api-version": APIVersion,
35402	}
35403
35404	preparer := autorest.CreatePreparer(
35405		autorest.AsContentType("application/json; charset=utf-8"),
35406		autorest.AsPatch(),
35407		autorest.WithBaseURL(client.BaseURI),
35408		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
35409		autorest.WithJSON(connectionEnvelope),
35410		autorest.WithQueryParameters(queryParameters))
35411	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35412}
35413
35414// UpdateHybridConnectionSlotSender sends the UpdateHybridConnectionSlot request. The method will close the
35415// http.Response Body if it receives an error.
35416func (client AppsClient) UpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
35417	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35418}
35419
35420// UpdateHybridConnectionSlotResponder handles the response to the UpdateHybridConnectionSlot request. The method always
35421// closes the http.Response Body.
35422func (client AppsClient) UpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
35423	err = autorest.Respond(
35424		resp,
35425		azure.WithErrorUnlessStatusCode(http.StatusOK),
35426		autorest.ByUnmarshallingJSON(&result),
35427		autorest.ByClosing())
35428	result.Response = autorest.Response{Response: resp}
35429	return
35430}
35431
35432// UpdateMetadata description for Replaces the metadata of an app.
35433// Parameters:
35434// resourceGroupName - name of the resource group to which the resource belongs.
35435// name - name of the app.
35436// metadata - edited metadata of the app or deployment slot. See example.
35437func (client AppsClient) UpdateMetadata(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary) (result StringDictionary, err error) {
35438	if tracing.IsEnabled() {
35439		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateMetadata")
35440		defer func() {
35441			sc := -1
35442			if result.Response.Response != nil {
35443				sc = result.Response.Response.StatusCode
35444			}
35445			tracing.EndSpan(ctx, sc, err)
35446		}()
35447	}
35448	if err := validation.Validate([]validation.Validation{
35449		{TargetValue: resourceGroupName,
35450			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35451				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35452				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35453		return result, validation.NewError("web.AppsClient", "UpdateMetadata", err.Error())
35454	}
35455
35456	req, err := client.UpdateMetadataPreparer(ctx, resourceGroupName, name, metadata)
35457	if err != nil {
35458		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", nil, "Failure preparing request")
35459		return
35460	}
35461
35462	resp, err := client.UpdateMetadataSender(req)
35463	if err != nil {
35464		result.Response = autorest.Response{Response: resp}
35465		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", resp, "Failure sending request")
35466		return
35467	}
35468
35469	result, err = client.UpdateMetadataResponder(resp)
35470	if err != nil {
35471		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", resp, "Failure responding to request")
35472		return
35473	}
35474
35475	return
35476}
35477
35478// UpdateMetadataPreparer prepares the UpdateMetadata request.
35479func (client AppsClient) UpdateMetadataPreparer(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary) (*http.Request, error) {
35480	pathParameters := map[string]interface{}{
35481		"name":              autorest.Encode("path", name),
35482		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35483		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35484	}
35485
35486	const APIVersion = "2021-01-15"
35487	queryParameters := map[string]interface{}{
35488		"api-version": APIVersion,
35489	}
35490
35491	preparer := autorest.CreatePreparer(
35492		autorest.AsContentType("application/json; charset=utf-8"),
35493		autorest.AsPut(),
35494		autorest.WithBaseURL(client.BaseURI),
35495		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata", pathParameters),
35496		autorest.WithJSON(metadata),
35497		autorest.WithQueryParameters(queryParameters))
35498	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35499}
35500
35501// UpdateMetadataSender sends the UpdateMetadata request. The method will close the
35502// http.Response Body if it receives an error.
35503func (client AppsClient) UpdateMetadataSender(req *http.Request) (*http.Response, error) {
35504	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35505}
35506
35507// UpdateMetadataResponder handles the response to the UpdateMetadata request. The method always
35508// closes the http.Response Body.
35509func (client AppsClient) UpdateMetadataResponder(resp *http.Response) (result StringDictionary, err error) {
35510	err = autorest.Respond(
35511		resp,
35512		azure.WithErrorUnlessStatusCode(http.StatusOK),
35513		autorest.ByUnmarshallingJSON(&result),
35514		autorest.ByClosing())
35515	result.Response = autorest.Response{Response: resp}
35516	return
35517}
35518
35519// UpdateMetadataSlot description for Replaces the metadata of an app.
35520// Parameters:
35521// resourceGroupName - name of the resource group to which the resource belongs.
35522// name - name of the app.
35523// metadata - edited metadata of the app or deployment slot. See example.
35524// slot - name of the deployment slot. If a slot is not specified, the API will update the metadata for the
35525// production slot.
35526func (client AppsClient) UpdateMetadataSlot(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, slot string) (result StringDictionary, err error) {
35527	if tracing.IsEnabled() {
35528		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateMetadataSlot")
35529		defer func() {
35530			sc := -1
35531			if result.Response.Response != nil {
35532				sc = result.Response.Response.StatusCode
35533			}
35534			tracing.EndSpan(ctx, sc, err)
35535		}()
35536	}
35537	if err := validation.Validate([]validation.Validation{
35538		{TargetValue: resourceGroupName,
35539			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35540				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35541				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35542		return result, validation.NewError("web.AppsClient", "UpdateMetadataSlot", err.Error())
35543	}
35544
35545	req, err := client.UpdateMetadataSlotPreparer(ctx, resourceGroupName, name, metadata, slot)
35546	if err != nil {
35547		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", nil, "Failure preparing request")
35548		return
35549	}
35550
35551	resp, err := client.UpdateMetadataSlotSender(req)
35552	if err != nil {
35553		result.Response = autorest.Response{Response: resp}
35554		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", resp, "Failure sending request")
35555		return
35556	}
35557
35558	result, err = client.UpdateMetadataSlotResponder(resp)
35559	if err != nil {
35560		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", resp, "Failure responding to request")
35561		return
35562	}
35563
35564	return
35565}
35566
35567// UpdateMetadataSlotPreparer prepares the UpdateMetadataSlot request.
35568func (client AppsClient) UpdateMetadataSlotPreparer(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, slot string) (*http.Request, error) {
35569	pathParameters := map[string]interface{}{
35570		"name":              autorest.Encode("path", name),
35571		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35572		"slot":              autorest.Encode("path", slot),
35573		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35574	}
35575
35576	const APIVersion = "2021-01-15"
35577	queryParameters := map[string]interface{}{
35578		"api-version": APIVersion,
35579	}
35580
35581	preparer := autorest.CreatePreparer(
35582		autorest.AsContentType("application/json; charset=utf-8"),
35583		autorest.AsPut(),
35584		autorest.WithBaseURL(client.BaseURI),
35585		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata", pathParameters),
35586		autorest.WithJSON(metadata),
35587		autorest.WithQueryParameters(queryParameters))
35588	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35589}
35590
35591// UpdateMetadataSlotSender sends the UpdateMetadataSlot request. The method will close the
35592// http.Response Body if it receives an error.
35593func (client AppsClient) UpdateMetadataSlotSender(req *http.Request) (*http.Response, error) {
35594	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35595}
35596
35597// UpdateMetadataSlotResponder handles the response to the UpdateMetadataSlot request. The method always
35598// closes the http.Response Body.
35599func (client AppsClient) UpdateMetadataSlotResponder(resp *http.Response) (result StringDictionary, err error) {
35600	err = autorest.Respond(
35601		resp,
35602		azure.WithErrorUnlessStatusCode(http.StatusOK),
35603		autorest.ByUnmarshallingJSON(&result),
35604		autorest.ByClosing())
35605	result.Response = autorest.Response{Response: resp}
35606	return
35607}
35608
35609// UpdatePremierAddOn description for Updates a named add-on of an app.
35610// Parameters:
35611// resourceGroupName - name of the resource group to which the resource belongs.
35612// name - name of the app.
35613// premierAddOnName - add-on name.
35614// premierAddOn - a JSON representation of the edited premier add-on.
35615func (client AppsClient) UpdatePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource) (result PremierAddOn, err error) {
35616	if tracing.IsEnabled() {
35617		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePremierAddOn")
35618		defer func() {
35619			sc := -1
35620			if result.Response.Response != nil {
35621				sc = result.Response.Response.StatusCode
35622			}
35623			tracing.EndSpan(ctx, sc, err)
35624		}()
35625	}
35626	if err := validation.Validate([]validation.Validation{
35627		{TargetValue: resourceGroupName,
35628			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35629				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35630				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35631		return result, validation.NewError("web.AppsClient", "UpdatePremierAddOn", err.Error())
35632	}
35633
35634	req, err := client.UpdatePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn)
35635	if err != nil {
35636		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", nil, "Failure preparing request")
35637		return
35638	}
35639
35640	resp, err := client.UpdatePremierAddOnSender(req)
35641	if err != nil {
35642		result.Response = autorest.Response{Response: resp}
35643		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", resp, "Failure sending request")
35644		return
35645	}
35646
35647	result, err = client.UpdatePremierAddOnResponder(resp)
35648	if err != nil {
35649		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", resp, "Failure responding to request")
35650		return
35651	}
35652
35653	return
35654}
35655
35656// UpdatePremierAddOnPreparer prepares the UpdatePremierAddOn request.
35657func (client AppsClient) UpdatePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource) (*http.Request, error) {
35658	pathParameters := map[string]interface{}{
35659		"name":              autorest.Encode("path", name),
35660		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
35661		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35662		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35663	}
35664
35665	const APIVersion = "2021-01-15"
35666	queryParameters := map[string]interface{}{
35667		"api-version": APIVersion,
35668	}
35669
35670	preparer := autorest.CreatePreparer(
35671		autorest.AsContentType("application/json; charset=utf-8"),
35672		autorest.AsPatch(),
35673		autorest.WithBaseURL(client.BaseURI),
35674		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
35675		autorest.WithJSON(premierAddOn),
35676		autorest.WithQueryParameters(queryParameters))
35677	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35678}
35679
35680// UpdatePremierAddOnSender sends the UpdatePremierAddOn request. The method will close the
35681// http.Response Body if it receives an error.
35682func (client AppsClient) UpdatePremierAddOnSender(req *http.Request) (*http.Response, error) {
35683	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35684}
35685
35686// UpdatePremierAddOnResponder handles the response to the UpdatePremierAddOn request. The method always
35687// closes the http.Response Body.
35688func (client AppsClient) UpdatePremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
35689	err = autorest.Respond(
35690		resp,
35691		azure.WithErrorUnlessStatusCode(http.StatusOK),
35692		autorest.ByUnmarshallingJSON(&result),
35693		autorest.ByClosing())
35694	result.Response = autorest.Response{Response: resp}
35695	return
35696}
35697
35698// UpdatePremierAddOnSlot description for Updates a named add-on of an app.
35699// Parameters:
35700// resourceGroupName - name of the resource group to which the resource belongs.
35701// name - name of the app.
35702// premierAddOnName - add-on name.
35703// premierAddOn - a JSON representation of the edited premier add-on.
35704// slot - name of the deployment slot. If a slot is not specified, the API will update the named add-on for the
35705// production slot.
35706func (client AppsClient) UpdatePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, slot string) (result PremierAddOn, err error) {
35707	if tracing.IsEnabled() {
35708		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePremierAddOnSlot")
35709		defer func() {
35710			sc := -1
35711			if result.Response.Response != nil {
35712				sc = result.Response.Response.StatusCode
35713			}
35714			tracing.EndSpan(ctx, sc, err)
35715		}()
35716	}
35717	if err := validation.Validate([]validation.Validation{
35718		{TargetValue: resourceGroupName,
35719			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35720				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35721				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35722		return result, validation.NewError("web.AppsClient", "UpdatePremierAddOnSlot", err.Error())
35723	}
35724
35725	req, err := client.UpdatePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, slot)
35726	if err != nil {
35727		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", nil, "Failure preparing request")
35728		return
35729	}
35730
35731	resp, err := client.UpdatePremierAddOnSlotSender(req)
35732	if err != nil {
35733		result.Response = autorest.Response{Response: resp}
35734		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", resp, "Failure sending request")
35735		return
35736	}
35737
35738	result, err = client.UpdatePremierAddOnSlotResponder(resp)
35739	if err != nil {
35740		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", resp, "Failure responding to request")
35741		return
35742	}
35743
35744	return
35745}
35746
35747// UpdatePremierAddOnSlotPreparer prepares the UpdatePremierAddOnSlot request.
35748func (client AppsClient) UpdatePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, slot string) (*http.Request, error) {
35749	pathParameters := map[string]interface{}{
35750		"name":              autorest.Encode("path", name),
35751		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
35752		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35753		"slot":              autorest.Encode("path", slot),
35754		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35755	}
35756
35757	const APIVersion = "2021-01-15"
35758	queryParameters := map[string]interface{}{
35759		"api-version": APIVersion,
35760	}
35761
35762	preparer := autorest.CreatePreparer(
35763		autorest.AsContentType("application/json; charset=utf-8"),
35764		autorest.AsPatch(),
35765		autorest.WithBaseURL(client.BaseURI),
35766		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
35767		autorest.WithJSON(premierAddOn),
35768		autorest.WithQueryParameters(queryParameters))
35769	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35770}
35771
35772// UpdatePremierAddOnSlotSender sends the UpdatePremierAddOnSlot request. The method will close the
35773// http.Response Body if it receives an error.
35774func (client AppsClient) UpdatePremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
35775	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35776}
35777
35778// UpdatePremierAddOnSlotResponder handles the response to the UpdatePremierAddOnSlot request. The method always
35779// closes the http.Response Body.
35780func (client AppsClient) UpdatePremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
35781	err = autorest.Respond(
35782		resp,
35783		azure.WithErrorUnlessStatusCode(http.StatusOK),
35784		autorest.ByUnmarshallingJSON(&result),
35785		autorest.ByClosing())
35786	result.Response = autorest.Response{Response: resp}
35787	return
35788}
35789
35790// UpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates an
35791// existing one (PATCH).
35792// Parameters:
35793// resourceGroupName - name of the resource group to which the resource belongs.
35794// name - name of the app.
35795// entityName - name of the hybrid connection configuration.
35796// connectionEnvelope - details of the hybrid connection configuration.
35797func (client AppsClient) UpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) {
35798	if tracing.IsEnabled() {
35799		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateRelayServiceConnection")
35800		defer func() {
35801			sc := -1
35802			if result.Response.Response != nil {
35803				sc = result.Response.Response.StatusCode
35804			}
35805			tracing.EndSpan(ctx, sc, err)
35806		}()
35807	}
35808	if err := validation.Validate([]validation.Validation{
35809		{TargetValue: resourceGroupName,
35810			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35811				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35812				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35813		return result, validation.NewError("web.AppsClient", "UpdateRelayServiceConnection", err.Error())
35814	}
35815
35816	req, err := client.UpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope)
35817	if err != nil {
35818		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", nil, "Failure preparing request")
35819		return
35820	}
35821
35822	resp, err := client.UpdateRelayServiceConnectionSender(req)
35823	if err != nil {
35824		result.Response = autorest.Response{Response: resp}
35825		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", resp, "Failure sending request")
35826		return
35827	}
35828
35829	result, err = client.UpdateRelayServiceConnectionResponder(resp)
35830	if err != nil {
35831		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", resp, "Failure responding to request")
35832		return
35833	}
35834
35835	return
35836}
35837
35838// UpdateRelayServiceConnectionPreparer prepares the UpdateRelayServiceConnection request.
35839func (client AppsClient) UpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) {
35840	pathParameters := map[string]interface{}{
35841		"entityName":        autorest.Encode("path", entityName),
35842		"name":              autorest.Encode("path", name),
35843		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35844		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35845	}
35846
35847	const APIVersion = "2021-01-15"
35848	queryParameters := map[string]interface{}{
35849		"api-version": APIVersion,
35850	}
35851
35852	preparer := autorest.CreatePreparer(
35853		autorest.AsContentType("application/json; charset=utf-8"),
35854		autorest.AsPatch(),
35855		autorest.WithBaseURL(client.BaseURI),
35856		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
35857		autorest.WithJSON(connectionEnvelope),
35858		autorest.WithQueryParameters(queryParameters))
35859	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35860}
35861
35862// UpdateRelayServiceConnectionSender sends the UpdateRelayServiceConnection request. The method will close the
35863// http.Response Body if it receives an error.
35864func (client AppsClient) UpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
35865	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35866}
35867
35868// UpdateRelayServiceConnectionResponder handles the response to the UpdateRelayServiceConnection request. The method always
35869// closes the http.Response Body.
35870func (client AppsClient) UpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
35871	err = autorest.Respond(
35872		resp,
35873		azure.WithErrorUnlessStatusCode(http.StatusOK),
35874		autorest.ByUnmarshallingJSON(&result),
35875		autorest.ByClosing())
35876	result.Response = autorest.Response{Response: resp}
35877	return
35878}
35879
35880// UpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or updates an
35881// existing one (PATCH).
35882// Parameters:
35883// resourceGroupName - name of the resource group to which the resource belongs.
35884// name - name of the app.
35885// entityName - name of the hybrid connection configuration.
35886// connectionEnvelope - details of the hybrid connection configuration.
35887// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid
35888// connection for the production slot.
35889func (client AppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) {
35890	if tracing.IsEnabled() {
35891		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateRelayServiceConnectionSlot")
35892		defer func() {
35893			sc := -1
35894			if result.Response.Response != nil {
35895				sc = result.Response.Response.StatusCode
35896			}
35897			tracing.EndSpan(ctx, sc, err)
35898		}()
35899	}
35900	if err := validation.Validate([]validation.Validation{
35901		{TargetValue: resourceGroupName,
35902			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35903				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35904				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35905		return result, validation.NewError("web.AppsClient", "UpdateRelayServiceConnectionSlot", err.Error())
35906	}
35907
35908	req, err := client.UpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot)
35909	if err != nil {
35910		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", nil, "Failure preparing request")
35911		return
35912	}
35913
35914	resp, err := client.UpdateRelayServiceConnectionSlotSender(req)
35915	if err != nil {
35916		result.Response = autorest.Response{Response: resp}
35917		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", resp, "Failure sending request")
35918		return
35919	}
35920
35921	result, err = client.UpdateRelayServiceConnectionSlotResponder(resp)
35922	if err != nil {
35923		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", resp, "Failure responding to request")
35924		return
35925	}
35926
35927	return
35928}
35929
35930// UpdateRelayServiceConnectionSlotPreparer prepares the UpdateRelayServiceConnectionSlot request.
35931func (client AppsClient) UpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) {
35932	pathParameters := map[string]interface{}{
35933		"entityName":        autorest.Encode("path", entityName),
35934		"name":              autorest.Encode("path", name),
35935		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35936		"slot":              autorest.Encode("path", slot),
35937		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35938	}
35939
35940	const APIVersion = "2021-01-15"
35941	queryParameters := map[string]interface{}{
35942		"api-version": APIVersion,
35943	}
35944
35945	preparer := autorest.CreatePreparer(
35946		autorest.AsContentType("application/json; charset=utf-8"),
35947		autorest.AsPatch(),
35948		autorest.WithBaseURL(client.BaseURI),
35949		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
35950		autorest.WithJSON(connectionEnvelope),
35951		autorest.WithQueryParameters(queryParameters))
35952	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35953}
35954
35955// UpdateRelayServiceConnectionSlotSender sends the UpdateRelayServiceConnectionSlot request. The method will close the
35956// http.Response Body if it receives an error.
35957func (client AppsClient) UpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
35958	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35959}
35960
35961// UpdateRelayServiceConnectionSlotResponder handles the response to the UpdateRelayServiceConnectionSlot request. The method always
35962// closes the http.Response Body.
35963func (client AppsClient) UpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
35964	err = autorest.Respond(
35965		resp,
35966		azure.WithErrorUnlessStatusCode(http.StatusOK),
35967		autorest.ByUnmarshallingJSON(&result),
35968		autorest.ByClosing())
35969	result.Response = autorest.Response{Response: resp}
35970	return
35971}
35972
35973// UpdateScmAllowed description for Updates whether user publishing credentials are allowed on the site or not.
35974// Parameters:
35975// resourceGroupName - name of the resource group to which the resource belongs.
35976// name - name of the app.
35977func (client AppsClient) UpdateScmAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (result CsmPublishingCredentialsPoliciesEntity, err error) {
35978	if tracing.IsEnabled() {
35979		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateScmAllowed")
35980		defer func() {
35981			sc := -1
35982			if result.Response.Response != nil {
35983				sc = result.Response.Response.StatusCode
35984			}
35985			tracing.EndSpan(ctx, sc, err)
35986		}()
35987	}
35988	if err := validation.Validate([]validation.Validation{
35989		{TargetValue: resourceGroupName,
35990			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35991				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35992				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
35993		{TargetValue: csmPublishingAccessPoliciesEntity,
35994			Constraints: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties", Name: validation.Null, Rule: false,
35995				Chain: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties.Allow", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
35996		return result, validation.NewError("web.AppsClient", "UpdateScmAllowed", err.Error())
35997	}
35998
35999	req, err := client.UpdateScmAllowedPreparer(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity)
36000	if err != nil {
36001		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowed", nil, "Failure preparing request")
36002		return
36003	}
36004
36005	resp, err := client.UpdateScmAllowedSender(req)
36006	if err != nil {
36007		result.Response = autorest.Response{Response: resp}
36008		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowed", resp, "Failure sending request")
36009		return
36010	}
36011
36012	result, err = client.UpdateScmAllowedResponder(resp)
36013	if err != nil {
36014		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowed", resp, "Failure responding to request")
36015		return
36016	}
36017
36018	return
36019}
36020
36021// UpdateScmAllowedPreparer prepares the UpdateScmAllowed request.
36022func (client AppsClient) UpdateScmAllowedPreparer(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (*http.Request, error) {
36023	pathParameters := map[string]interface{}{
36024		"name":              autorest.Encode("path", name),
36025		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36026		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36027	}
36028
36029	const APIVersion = "2021-01-15"
36030	queryParameters := map[string]interface{}{
36031		"api-version": APIVersion,
36032	}
36033
36034	preparer := autorest.CreatePreparer(
36035		autorest.AsContentType("application/json; charset=utf-8"),
36036		autorest.AsPut(),
36037		autorest.WithBaseURL(client.BaseURI),
36038		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm", pathParameters),
36039		autorest.WithJSON(csmPublishingAccessPoliciesEntity),
36040		autorest.WithQueryParameters(queryParameters))
36041	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36042}
36043
36044// UpdateScmAllowedSender sends the UpdateScmAllowed request. The method will close the
36045// http.Response Body if it receives an error.
36046func (client AppsClient) UpdateScmAllowedSender(req *http.Request) (*http.Response, error) {
36047	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36048}
36049
36050// UpdateScmAllowedResponder handles the response to the UpdateScmAllowed request. The method always
36051// closes the http.Response Body.
36052func (client AppsClient) UpdateScmAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
36053	err = autorest.Respond(
36054		resp,
36055		azure.WithErrorUnlessStatusCode(http.StatusOK),
36056		autorest.ByUnmarshallingJSON(&result),
36057		autorest.ByClosing())
36058	result.Response = autorest.Response{Response: resp}
36059	return
36060}
36061
36062// UpdateScmAllowedSlot description for Updates whether user publishing credentials are allowed on the site or not.
36063// Parameters:
36064// resourceGroupName - name of the resource group to which the resource belongs.
36065// name - name of the app.
36066func (client AppsClient) UpdateScmAllowedSlot(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, slot string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
36067	if tracing.IsEnabled() {
36068		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateScmAllowedSlot")
36069		defer func() {
36070			sc := -1
36071			if result.Response.Response != nil {
36072				sc = result.Response.Response.StatusCode
36073			}
36074			tracing.EndSpan(ctx, sc, err)
36075		}()
36076	}
36077	if err := validation.Validate([]validation.Validation{
36078		{TargetValue: resourceGroupName,
36079			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36080				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36081				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
36082		{TargetValue: csmPublishingAccessPoliciesEntity,
36083			Constraints: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties", Name: validation.Null, Rule: false,
36084				Chain: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties.Allow", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
36085		return result, validation.NewError("web.AppsClient", "UpdateScmAllowedSlot", err.Error())
36086	}
36087
36088	req, err := client.UpdateScmAllowedSlotPreparer(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot)
36089	if err != nil {
36090		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowedSlot", nil, "Failure preparing request")
36091		return
36092	}
36093
36094	resp, err := client.UpdateScmAllowedSlotSender(req)
36095	if err != nil {
36096		result.Response = autorest.Response{Response: resp}
36097		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowedSlot", resp, "Failure sending request")
36098		return
36099	}
36100
36101	result, err = client.UpdateScmAllowedSlotResponder(resp)
36102	if err != nil {
36103		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowedSlot", resp, "Failure responding to request")
36104		return
36105	}
36106
36107	return
36108}
36109
36110// UpdateScmAllowedSlotPreparer prepares the UpdateScmAllowedSlot request.
36111func (client AppsClient) UpdateScmAllowedSlotPreparer(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity, slot string) (*http.Request, error) {
36112	pathParameters := map[string]interface{}{
36113		"name":              autorest.Encode("path", name),
36114		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36115		"slot":              autorest.Encode("path", slot),
36116		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36117	}
36118
36119	const APIVersion = "2021-01-15"
36120	queryParameters := map[string]interface{}{
36121		"api-version": APIVersion,
36122	}
36123
36124	preparer := autorest.CreatePreparer(
36125		autorest.AsContentType("application/json; charset=utf-8"),
36126		autorest.AsPut(),
36127		autorest.WithBaseURL(client.BaseURI),
36128		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm", pathParameters),
36129		autorest.WithJSON(csmPublishingAccessPoliciesEntity),
36130		autorest.WithQueryParameters(queryParameters))
36131	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36132}
36133
36134// UpdateScmAllowedSlotSender sends the UpdateScmAllowedSlot request. The method will close the
36135// http.Response Body if it receives an error.
36136func (client AppsClient) UpdateScmAllowedSlotSender(req *http.Request) (*http.Response, error) {
36137	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36138}
36139
36140// UpdateScmAllowedSlotResponder handles the response to the UpdateScmAllowedSlot request. The method always
36141// closes the http.Response Body.
36142func (client AppsClient) UpdateScmAllowedSlotResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
36143	err = autorest.Respond(
36144		resp,
36145		azure.WithErrorUnlessStatusCode(http.StatusOK),
36146		autorest.ByUnmarshallingJSON(&result),
36147		autorest.ByClosing())
36148	result.Response = autorest.Response{Response: resp}
36149	return
36150}
36151
36152// UpdateSitePushSettings description for Updates the Push settings associated with web app.
36153// Parameters:
36154// resourceGroupName - name of the resource group to which the resource belongs.
36155// name - name of web app.
36156// pushSettings - push settings associated with web app.
36157func (client AppsClient) UpdateSitePushSettings(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings) (result PushSettings, err error) {
36158	if tracing.IsEnabled() {
36159		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSitePushSettings")
36160		defer func() {
36161			sc := -1
36162			if result.Response.Response != nil {
36163				sc = result.Response.Response.StatusCode
36164			}
36165			tracing.EndSpan(ctx, sc, err)
36166		}()
36167	}
36168	if err := validation.Validate([]validation.Validation{
36169		{TargetValue: resourceGroupName,
36170			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36171				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36172				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
36173		{TargetValue: pushSettings,
36174			Constraints: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties", Name: validation.Null, Rule: false,
36175				Chain: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
36176		return result, validation.NewError("web.AppsClient", "UpdateSitePushSettings", err.Error())
36177	}
36178
36179	req, err := client.UpdateSitePushSettingsPreparer(ctx, resourceGroupName, name, pushSettings)
36180	if err != nil {
36181		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", nil, "Failure preparing request")
36182		return
36183	}
36184
36185	resp, err := client.UpdateSitePushSettingsSender(req)
36186	if err != nil {
36187		result.Response = autorest.Response{Response: resp}
36188		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", resp, "Failure sending request")
36189		return
36190	}
36191
36192	result, err = client.UpdateSitePushSettingsResponder(resp)
36193	if err != nil {
36194		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", resp, "Failure responding to request")
36195		return
36196	}
36197
36198	return
36199}
36200
36201// UpdateSitePushSettingsPreparer prepares the UpdateSitePushSettings request.
36202func (client AppsClient) UpdateSitePushSettingsPreparer(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings) (*http.Request, error) {
36203	pathParameters := map[string]interface{}{
36204		"name":              autorest.Encode("path", name),
36205		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36206		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36207	}
36208
36209	const APIVersion = "2021-01-15"
36210	queryParameters := map[string]interface{}{
36211		"api-version": APIVersion,
36212	}
36213
36214	preparer := autorest.CreatePreparer(
36215		autorest.AsContentType("application/json; charset=utf-8"),
36216		autorest.AsPut(),
36217		autorest.WithBaseURL(client.BaseURI),
36218		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings", pathParameters),
36219		autorest.WithJSON(pushSettings),
36220		autorest.WithQueryParameters(queryParameters))
36221	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36222}
36223
36224// UpdateSitePushSettingsSender sends the UpdateSitePushSettings request. The method will close the
36225// http.Response Body if it receives an error.
36226func (client AppsClient) UpdateSitePushSettingsSender(req *http.Request) (*http.Response, error) {
36227	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36228}
36229
36230// UpdateSitePushSettingsResponder handles the response to the UpdateSitePushSettings request. The method always
36231// closes the http.Response Body.
36232func (client AppsClient) UpdateSitePushSettingsResponder(resp *http.Response) (result PushSettings, err error) {
36233	err = autorest.Respond(
36234		resp,
36235		azure.WithErrorUnlessStatusCode(http.StatusOK),
36236		autorest.ByUnmarshallingJSON(&result),
36237		autorest.ByClosing())
36238	result.Response = autorest.Response{Response: resp}
36239	return
36240}
36241
36242// UpdateSitePushSettingsSlot description for Updates the Push settings associated with web app.
36243// Parameters:
36244// resourceGroupName - name of the resource group to which the resource belongs.
36245// name - name of web app.
36246// pushSettings - push settings associated with web app.
36247// slot - name of web app slot. If not specified then will default to production slot.
36248func (client AppsClient) UpdateSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, slot string) (result PushSettings, err error) {
36249	if tracing.IsEnabled() {
36250		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSitePushSettingsSlot")
36251		defer func() {
36252			sc := -1
36253			if result.Response.Response != nil {
36254				sc = result.Response.Response.StatusCode
36255			}
36256			tracing.EndSpan(ctx, sc, err)
36257		}()
36258	}
36259	if err := validation.Validate([]validation.Validation{
36260		{TargetValue: resourceGroupName,
36261			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36262				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36263				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
36264		{TargetValue: pushSettings,
36265			Constraints: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties", Name: validation.Null, Rule: false,
36266				Chain: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
36267		return result, validation.NewError("web.AppsClient", "UpdateSitePushSettingsSlot", err.Error())
36268	}
36269
36270	req, err := client.UpdateSitePushSettingsSlotPreparer(ctx, resourceGroupName, name, pushSettings, slot)
36271	if err != nil {
36272		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", nil, "Failure preparing request")
36273		return
36274	}
36275
36276	resp, err := client.UpdateSitePushSettingsSlotSender(req)
36277	if err != nil {
36278		result.Response = autorest.Response{Response: resp}
36279		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", resp, "Failure sending request")
36280		return
36281	}
36282
36283	result, err = client.UpdateSitePushSettingsSlotResponder(resp)
36284	if err != nil {
36285		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", resp, "Failure responding to request")
36286		return
36287	}
36288
36289	return
36290}
36291
36292// UpdateSitePushSettingsSlotPreparer prepares the UpdateSitePushSettingsSlot request.
36293func (client AppsClient) UpdateSitePushSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, slot string) (*http.Request, error) {
36294	pathParameters := map[string]interface{}{
36295		"name":              autorest.Encode("path", name),
36296		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36297		"slot":              autorest.Encode("path", slot),
36298		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36299	}
36300
36301	const APIVersion = "2021-01-15"
36302	queryParameters := map[string]interface{}{
36303		"api-version": APIVersion,
36304	}
36305
36306	preparer := autorest.CreatePreparer(
36307		autorest.AsContentType("application/json; charset=utf-8"),
36308		autorest.AsPut(),
36309		autorest.WithBaseURL(client.BaseURI),
36310		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings", pathParameters),
36311		autorest.WithJSON(pushSettings),
36312		autorest.WithQueryParameters(queryParameters))
36313	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36314}
36315
36316// UpdateSitePushSettingsSlotSender sends the UpdateSitePushSettingsSlot request. The method will close the
36317// http.Response Body if it receives an error.
36318func (client AppsClient) UpdateSitePushSettingsSlotSender(req *http.Request) (*http.Response, error) {
36319	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36320}
36321
36322// UpdateSitePushSettingsSlotResponder handles the response to the UpdateSitePushSettingsSlot request. The method always
36323// closes the http.Response Body.
36324func (client AppsClient) UpdateSitePushSettingsSlotResponder(resp *http.Response) (result PushSettings, err error) {
36325	err = autorest.Respond(
36326		resp,
36327		azure.WithErrorUnlessStatusCode(http.StatusOK),
36328		autorest.ByUnmarshallingJSON(&result),
36329		autorest.ByClosing())
36330	result.Response = autorest.Response{Response: resp}
36331	return
36332}
36333
36334// UpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates an
36335// existing app.
36336// Parameters:
36337// resourceGroupName - name of the resource group to which the resource belongs.
36338// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
36339// parameter.
36340// siteEnvelope - a JSON representation of the app properties. See example.
36341// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify
36342// the production slot.
36343func (client AppsClient) UpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, slot string) (result Site, err error) {
36344	if tracing.IsEnabled() {
36345		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSlot")
36346		defer func() {
36347			sc := -1
36348			if result.Response.Response != nil {
36349				sc = result.Response.Response.StatusCode
36350			}
36351			tracing.EndSpan(ctx, sc, err)
36352		}()
36353	}
36354	if err := validation.Validate([]validation.Validation{
36355		{TargetValue: resourceGroupName,
36356			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36357				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36358				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36359		return result, validation.NewError("web.AppsClient", "UpdateSlot", err.Error())
36360	}
36361
36362	req, err := client.UpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot)
36363	if err != nil {
36364		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", nil, "Failure preparing request")
36365		return
36366	}
36367
36368	resp, err := client.UpdateSlotSender(req)
36369	if err != nil {
36370		result.Response = autorest.Response{Response: resp}
36371		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", resp, "Failure sending request")
36372		return
36373	}
36374
36375	result, err = client.UpdateSlotResponder(resp)
36376	if err != nil {
36377		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", resp, "Failure responding to request")
36378		return
36379	}
36380
36381	return
36382}
36383
36384// UpdateSlotPreparer prepares the UpdateSlot request.
36385func (client AppsClient) UpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, slot string) (*http.Request, error) {
36386	pathParameters := map[string]interface{}{
36387		"name":              autorest.Encode("path", name),
36388		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36389		"slot":              autorest.Encode("path", slot),
36390		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36391	}
36392
36393	const APIVersion = "2021-01-15"
36394	queryParameters := map[string]interface{}{
36395		"api-version": APIVersion,
36396	}
36397
36398	preparer := autorest.CreatePreparer(
36399		autorest.AsContentType("application/json; charset=utf-8"),
36400		autorest.AsPatch(),
36401		autorest.WithBaseURL(client.BaseURI),
36402		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
36403		autorest.WithJSON(siteEnvelope),
36404		autorest.WithQueryParameters(queryParameters))
36405	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36406}
36407
36408// UpdateSlotSender sends the UpdateSlot request. The method will close the
36409// http.Response Body if it receives an error.
36410func (client AppsClient) UpdateSlotSender(req *http.Request) (*http.Response, error) {
36411	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36412}
36413
36414// UpdateSlotResponder handles the response to the UpdateSlot request. The method always
36415// closes the http.Response Body.
36416func (client AppsClient) UpdateSlotResponder(resp *http.Response) (result Site, err error) {
36417	err = autorest.Respond(
36418		resp,
36419		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
36420		autorest.ByUnmarshallingJSON(&result),
36421		autorest.ByClosing())
36422	result.Response = autorest.Response{Response: resp}
36423	return
36424}
36425
36426// UpdateSlotConfigurationNames description for Updates the names of application settings and connection string that
36427// remain with the slot during swap operation.
36428// Parameters:
36429// resourceGroupName - name of the resource group to which the resource belongs.
36430// name - name of the app.
36431// slotConfigNames - names of application settings and connection strings. See example.
36432func (client AppsClient) UpdateSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (result SlotConfigNamesResource, err error) {
36433	if tracing.IsEnabled() {
36434		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSlotConfigurationNames")
36435		defer func() {
36436			sc := -1
36437			if result.Response.Response != nil {
36438				sc = result.Response.Response.StatusCode
36439			}
36440			tracing.EndSpan(ctx, sc, err)
36441		}()
36442	}
36443	if err := validation.Validate([]validation.Validation{
36444		{TargetValue: resourceGroupName,
36445			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36446				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36447				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36448		return result, validation.NewError("web.AppsClient", "UpdateSlotConfigurationNames", err.Error())
36449	}
36450
36451	req, err := client.UpdateSlotConfigurationNamesPreparer(ctx, resourceGroupName, name, slotConfigNames)
36452	if err != nil {
36453		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", nil, "Failure preparing request")
36454		return
36455	}
36456
36457	resp, err := client.UpdateSlotConfigurationNamesSender(req)
36458	if err != nil {
36459		result.Response = autorest.Response{Response: resp}
36460		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", resp, "Failure sending request")
36461		return
36462	}
36463
36464	result, err = client.UpdateSlotConfigurationNamesResponder(resp)
36465	if err != nil {
36466		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", resp, "Failure responding to request")
36467		return
36468	}
36469
36470	return
36471}
36472
36473// UpdateSlotConfigurationNamesPreparer prepares the UpdateSlotConfigurationNames request.
36474func (client AppsClient) UpdateSlotConfigurationNamesPreparer(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (*http.Request, error) {
36475	pathParameters := map[string]interface{}{
36476		"name":              autorest.Encode("path", name),
36477		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36478		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36479	}
36480
36481	const APIVersion = "2021-01-15"
36482	queryParameters := map[string]interface{}{
36483		"api-version": APIVersion,
36484	}
36485
36486	preparer := autorest.CreatePreparer(
36487		autorest.AsContentType("application/json; charset=utf-8"),
36488		autorest.AsPut(),
36489		autorest.WithBaseURL(client.BaseURI),
36490		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames", pathParameters),
36491		autorest.WithJSON(slotConfigNames),
36492		autorest.WithQueryParameters(queryParameters))
36493	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36494}
36495
36496// UpdateSlotConfigurationNamesSender sends the UpdateSlotConfigurationNames request. The method will close the
36497// http.Response Body if it receives an error.
36498func (client AppsClient) UpdateSlotConfigurationNamesSender(req *http.Request) (*http.Response, error) {
36499	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36500}
36501
36502// UpdateSlotConfigurationNamesResponder handles the response to the UpdateSlotConfigurationNames request. The method always
36503// closes the http.Response Body.
36504func (client AppsClient) UpdateSlotConfigurationNamesResponder(resp *http.Response) (result SlotConfigNamesResource, err error) {
36505	err = autorest.Respond(
36506		resp,
36507		azure.WithErrorUnlessStatusCode(http.StatusOK),
36508		autorest.ByUnmarshallingJSON(&result),
36509		autorest.ByClosing())
36510	result.Response = autorest.Response{Response: resp}
36511	return
36512}
36513
36514// UpdateSourceControl description for Updates the source control configuration of an app.
36515// Parameters:
36516// resourceGroupName - name of the resource group to which the resource belongs.
36517// name - name of the app.
36518// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
36519func (client AppsClient) UpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result SiteSourceControl, err error) {
36520	if tracing.IsEnabled() {
36521		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSourceControl")
36522		defer func() {
36523			sc := -1
36524			if result.Response.Response != nil {
36525				sc = result.Response.Response.StatusCode
36526			}
36527			tracing.EndSpan(ctx, sc, err)
36528		}()
36529	}
36530	if err := validation.Validate([]validation.Validation{
36531		{TargetValue: resourceGroupName,
36532			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36533				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36534				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36535		return result, validation.NewError("web.AppsClient", "UpdateSourceControl", err.Error())
36536	}
36537
36538	req, err := client.UpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl)
36539	if err != nil {
36540		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", nil, "Failure preparing request")
36541		return
36542	}
36543
36544	resp, err := client.UpdateSourceControlSender(req)
36545	if err != nil {
36546		result.Response = autorest.Response{Response: resp}
36547		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", resp, "Failure sending request")
36548		return
36549	}
36550
36551	result, err = client.UpdateSourceControlResponder(resp)
36552	if err != nil {
36553		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", resp, "Failure responding to request")
36554		return
36555	}
36556
36557	return
36558}
36559
36560// UpdateSourceControlPreparer prepares the UpdateSourceControl request.
36561func (client AppsClient) UpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) {
36562	pathParameters := map[string]interface{}{
36563		"name":              autorest.Encode("path", name),
36564		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36565		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36566	}
36567
36568	const APIVersion = "2021-01-15"
36569	queryParameters := map[string]interface{}{
36570		"api-version": APIVersion,
36571	}
36572
36573	preparer := autorest.CreatePreparer(
36574		autorest.AsContentType("application/json; charset=utf-8"),
36575		autorest.AsPatch(),
36576		autorest.WithBaseURL(client.BaseURI),
36577		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
36578		autorest.WithJSON(siteSourceControl),
36579		autorest.WithQueryParameters(queryParameters))
36580	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36581}
36582
36583// UpdateSourceControlSender sends the UpdateSourceControl request. The method will close the
36584// http.Response Body if it receives an error.
36585func (client AppsClient) UpdateSourceControlSender(req *http.Request) (*http.Response, error) {
36586	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36587}
36588
36589// UpdateSourceControlResponder handles the response to the UpdateSourceControl request. The method always
36590// closes the http.Response Body.
36591func (client AppsClient) UpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
36592	err = autorest.Respond(
36593		resp,
36594		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
36595		autorest.ByUnmarshallingJSON(&result),
36596		autorest.ByClosing())
36597	result.Response = autorest.Response{Response: resp}
36598	return
36599}
36600
36601// UpdateSourceControlSlot description for Updates the source control configuration of an app.
36602// Parameters:
36603// resourceGroupName - name of the resource group to which the resource belongs.
36604// name - name of the app.
36605// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
36606// slot - name of the deployment slot. If a slot is not specified, the API will update the source control
36607// configuration for the production slot.
36608func (client AppsClient) UpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result SiteSourceControl, err error) {
36609	if tracing.IsEnabled() {
36610		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSourceControlSlot")
36611		defer func() {
36612			sc := -1
36613			if result.Response.Response != nil {
36614				sc = result.Response.Response.StatusCode
36615			}
36616			tracing.EndSpan(ctx, sc, err)
36617		}()
36618	}
36619	if err := validation.Validate([]validation.Validation{
36620		{TargetValue: resourceGroupName,
36621			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36622				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36623				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36624		return result, validation.NewError("web.AppsClient", "UpdateSourceControlSlot", err.Error())
36625	}
36626
36627	req, err := client.UpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot)
36628	if err != nil {
36629		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", nil, "Failure preparing request")
36630		return
36631	}
36632
36633	resp, err := client.UpdateSourceControlSlotSender(req)
36634	if err != nil {
36635		result.Response = autorest.Response{Response: resp}
36636		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", resp, "Failure sending request")
36637		return
36638	}
36639
36640	result, err = client.UpdateSourceControlSlotResponder(resp)
36641	if err != nil {
36642		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", resp, "Failure responding to request")
36643		return
36644	}
36645
36646	return
36647}
36648
36649// UpdateSourceControlSlotPreparer prepares the UpdateSourceControlSlot request.
36650func (client AppsClient) UpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) {
36651	pathParameters := map[string]interface{}{
36652		"name":              autorest.Encode("path", name),
36653		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36654		"slot":              autorest.Encode("path", slot),
36655		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36656	}
36657
36658	const APIVersion = "2021-01-15"
36659	queryParameters := map[string]interface{}{
36660		"api-version": APIVersion,
36661	}
36662
36663	preparer := autorest.CreatePreparer(
36664		autorest.AsContentType("application/json; charset=utf-8"),
36665		autorest.AsPatch(),
36666		autorest.WithBaseURL(client.BaseURI),
36667		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
36668		autorest.WithJSON(siteSourceControl),
36669		autorest.WithQueryParameters(queryParameters))
36670	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36671}
36672
36673// UpdateSourceControlSlotSender sends the UpdateSourceControlSlot request. The method will close the
36674// http.Response Body if it receives an error.
36675func (client AppsClient) UpdateSourceControlSlotSender(req *http.Request) (*http.Response, error) {
36676	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36677}
36678
36679// UpdateSourceControlSlotResponder handles the response to the UpdateSourceControlSlot request. The method always
36680// closes the http.Response Body.
36681func (client AppsClient) UpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
36682	err = autorest.Respond(
36683		resp,
36684		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
36685		autorest.ByUnmarshallingJSON(&result),
36686		autorest.ByClosing())
36687	result.Response = autorest.Response{Response: resp}
36688	return
36689}
36690
36691// UpdateSwiftVirtualNetworkConnectionWithCheck description for Integrates this Web App with a Virtual Network. This
36692// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has
36693// already been delegated, and is not
36694// in use by another App Service Plan other than the one this App is in.
36695// Parameters:
36696// resourceGroupName - name of the resource group to which the resource belongs.
36697// name - name of the app.
36698// connectionEnvelope - properties of the Virtual Network connection. See example.
36699func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheck(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) {
36700	if tracing.IsEnabled() {
36701		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSwiftVirtualNetworkConnectionWithCheck")
36702		defer func() {
36703			sc := -1
36704			if result.Response.Response != nil {
36705				sc = result.Response.Response.StatusCode
36706			}
36707			tracing.EndSpan(ctx, sc, err)
36708		}()
36709	}
36710	if err := validation.Validate([]validation.Validation{
36711		{TargetValue: resourceGroupName,
36712			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36713				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36714				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36715		return result, validation.NewError("web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheck", err.Error())
36716	}
36717
36718	req, err := client.UpdateSwiftVirtualNetworkConnectionWithCheckPreparer(ctx, resourceGroupName, name, connectionEnvelope)
36719	if err != nil {
36720		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheck", nil, "Failure preparing request")
36721		return
36722	}
36723
36724	resp, err := client.UpdateSwiftVirtualNetworkConnectionWithCheckSender(req)
36725	if err != nil {
36726		result.Response = autorest.Response{Response: resp}
36727		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheck", resp, "Failure sending request")
36728		return
36729	}
36730
36731	result, err = client.UpdateSwiftVirtualNetworkConnectionWithCheckResponder(resp)
36732	if err != nil {
36733		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheck", resp, "Failure responding to request")
36734		return
36735	}
36736
36737	return
36738}
36739
36740// UpdateSwiftVirtualNetworkConnectionWithCheckPreparer prepares the UpdateSwiftVirtualNetworkConnectionWithCheck request.
36741func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) {
36742	pathParameters := map[string]interface{}{
36743		"name":              autorest.Encode("path", name),
36744		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36745		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36746	}
36747
36748	const APIVersion = "2021-01-15"
36749	queryParameters := map[string]interface{}{
36750		"api-version": APIVersion,
36751	}
36752
36753	preparer := autorest.CreatePreparer(
36754		autorest.AsContentType("application/json; charset=utf-8"),
36755		autorest.AsPatch(),
36756		autorest.WithBaseURL(client.BaseURI),
36757		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
36758		autorest.WithJSON(connectionEnvelope),
36759		autorest.WithQueryParameters(queryParameters))
36760	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36761}
36762
36763// UpdateSwiftVirtualNetworkConnectionWithCheckSender sends the UpdateSwiftVirtualNetworkConnectionWithCheck request. The method will close the
36764// http.Response Body if it receives an error.
36765func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSender(req *http.Request) (*http.Response, error) {
36766	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36767}
36768
36769// UpdateSwiftVirtualNetworkConnectionWithCheckResponder handles the response to the UpdateSwiftVirtualNetworkConnectionWithCheck request. The method always
36770// closes the http.Response Body.
36771func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
36772	err = autorest.Respond(
36773		resp,
36774		azure.WithErrorUnlessStatusCode(http.StatusOK),
36775		autorest.ByUnmarshallingJSON(&result),
36776		autorest.ByClosing())
36777	result.Response = autorest.Response{Response: resp}
36778	return
36779}
36780
36781// UpdateSwiftVirtualNetworkConnectionWithCheckSlot description for Integrates this Web App with a Virtual Network.
36782// This requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet
36783// has already been delegated, and is not
36784// in use by another App Service Plan other than the one this App is in.
36785// Parameters:
36786// resourceGroupName - name of the resource group to which the resource belongs.
36787// name - name of the app.
36788// connectionEnvelope - properties of the Virtual Network connection. See example.
36789// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
36790// the production slot.
36791func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) {
36792	if tracing.IsEnabled() {
36793		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSwiftVirtualNetworkConnectionWithCheckSlot")
36794		defer func() {
36795			sc := -1
36796			if result.Response.Response != nil {
36797				sc = result.Response.Response.StatusCode
36798			}
36799			tracing.EndSpan(ctx, sc, err)
36800		}()
36801	}
36802	if err := validation.Validate([]validation.Validation{
36803		{TargetValue: resourceGroupName,
36804			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36805				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36806				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36807		return result, validation.NewError("web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheckSlot", err.Error())
36808	}
36809
36810	req, err := client.UpdateSwiftVirtualNetworkConnectionWithCheckSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot)
36811	if err != nil {
36812		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheckSlot", nil, "Failure preparing request")
36813		return
36814	}
36815
36816	resp, err := client.UpdateSwiftVirtualNetworkConnectionWithCheckSlotSender(req)
36817	if err != nil {
36818		result.Response = autorest.Response{Response: resp}
36819		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheckSlot", resp, "Failure sending request")
36820		return
36821	}
36822
36823	result, err = client.UpdateSwiftVirtualNetworkConnectionWithCheckSlotResponder(resp)
36824	if err != nil {
36825		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionWithCheckSlot", resp, "Failure responding to request")
36826		return
36827	}
36828
36829	return
36830}
36831
36832// UpdateSwiftVirtualNetworkConnectionWithCheckSlotPreparer prepares the UpdateSwiftVirtualNetworkConnectionWithCheckSlot request.
36833func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) {
36834	pathParameters := map[string]interface{}{
36835		"name":              autorest.Encode("path", name),
36836		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36837		"slot":              autorest.Encode("path", slot),
36838		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36839	}
36840
36841	const APIVersion = "2021-01-15"
36842	queryParameters := map[string]interface{}{
36843		"api-version": APIVersion,
36844	}
36845
36846	preparer := autorest.CreatePreparer(
36847		autorest.AsContentType("application/json; charset=utf-8"),
36848		autorest.AsPatch(),
36849		autorest.WithBaseURL(client.BaseURI),
36850		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
36851		autorest.WithJSON(connectionEnvelope),
36852		autorest.WithQueryParameters(queryParameters))
36853	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36854}
36855
36856// UpdateSwiftVirtualNetworkConnectionWithCheckSlotSender sends the UpdateSwiftVirtualNetworkConnectionWithCheckSlot request. The method will close the
36857// http.Response Body if it receives an error.
36858func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlotSender(req *http.Request) (*http.Response, error) {
36859	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36860}
36861
36862// UpdateSwiftVirtualNetworkConnectionWithCheckSlotResponder handles the response to the UpdateSwiftVirtualNetworkConnectionWithCheckSlot request. The method always
36863// closes the http.Response Body.
36864func (client AppsClient) UpdateSwiftVirtualNetworkConnectionWithCheckSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
36865	err = autorest.Respond(
36866		resp,
36867		azure.WithErrorUnlessStatusCode(http.StatusOK),
36868		autorest.ByUnmarshallingJSON(&result),
36869		autorest.ByClosing())
36870	result.Response = autorest.Response{Response: resp}
36871	return
36872}
36873
36874// UpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates the
36875// connection properties (PATCH).
36876// Parameters:
36877// resourceGroupName - name of the resource group to which the resource belongs.
36878// name - name of the app.
36879// vnetName - name of an existing Virtual Network.
36880// connectionEnvelope - properties of the Virtual Network connection. See example.
36881func (client AppsClient) UpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) {
36882	if tracing.IsEnabled() {
36883		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnection")
36884		defer func() {
36885			sc := -1
36886			if result.Response.Response != nil {
36887				sc = result.Response.Response.StatusCode
36888			}
36889			tracing.EndSpan(ctx, sc, err)
36890		}()
36891	}
36892	if err := validation.Validate([]validation.Validation{
36893		{TargetValue: resourceGroupName,
36894			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36895				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36896				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36897		return result, validation.NewError("web.AppsClient", "UpdateVnetConnection", err.Error())
36898	}
36899
36900	req, err := client.UpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope)
36901	if err != nil {
36902		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", nil, "Failure preparing request")
36903		return
36904	}
36905
36906	resp, err := client.UpdateVnetConnectionSender(req)
36907	if err != nil {
36908		result.Response = autorest.Response{Response: resp}
36909		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", resp, "Failure sending request")
36910		return
36911	}
36912
36913	result, err = client.UpdateVnetConnectionResponder(resp)
36914	if err != nil {
36915		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", resp, "Failure responding to request")
36916		return
36917	}
36918
36919	return
36920}
36921
36922// UpdateVnetConnectionPreparer prepares the UpdateVnetConnection request.
36923func (client AppsClient) UpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) {
36924	pathParameters := map[string]interface{}{
36925		"name":              autorest.Encode("path", name),
36926		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36927		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36928		"vnetName":          autorest.Encode("path", vnetName),
36929	}
36930
36931	const APIVersion = "2021-01-15"
36932	queryParameters := map[string]interface{}{
36933		"api-version": APIVersion,
36934	}
36935
36936	preparer := autorest.CreatePreparer(
36937		autorest.AsContentType("application/json; charset=utf-8"),
36938		autorest.AsPatch(),
36939		autorest.WithBaseURL(client.BaseURI),
36940		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
36941		autorest.WithJSON(connectionEnvelope),
36942		autorest.WithQueryParameters(queryParameters))
36943	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36944}
36945
36946// UpdateVnetConnectionSender sends the UpdateVnetConnection request. The method will close the
36947// http.Response Body if it receives an error.
36948func (client AppsClient) UpdateVnetConnectionSender(req *http.Request) (*http.Response, error) {
36949	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36950}
36951
36952// UpdateVnetConnectionResponder handles the response to the UpdateVnetConnection request. The method always
36953// closes the http.Response Body.
36954func (client AppsClient) UpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
36955	err = autorest.Respond(
36956		resp,
36957		azure.WithErrorUnlessStatusCode(http.StatusOK),
36958		autorest.ByUnmarshallingJSON(&result),
36959		autorest.ByClosing())
36960	result.Response = autorest.Response{Response: resp}
36961	return
36962}
36963
36964// UpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates it
36965// (PATCH).
36966// Parameters:
36967// resourceGroupName - name of the resource group to which the resource belongs.
36968// name - name of the app.
36969// vnetName - name of the Virtual Network.
36970// gatewayName - name of the gateway. Currently, the only supported string is "primary".
36971// connectionEnvelope - the properties to update this gateway with.
36972func (client AppsClient) UpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) {
36973	if tracing.IsEnabled() {
36974		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionGateway")
36975		defer func() {
36976			sc := -1
36977			if result.Response.Response != nil {
36978				sc = result.Response.Response.StatusCode
36979			}
36980			tracing.EndSpan(ctx, sc, err)
36981		}()
36982	}
36983	if err := validation.Validate([]validation.Validation{
36984		{TargetValue: resourceGroupName,
36985			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36986				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36987				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36988		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionGateway", err.Error())
36989	}
36990
36991	req, err := client.UpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope)
36992	if err != nil {
36993		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", nil, "Failure preparing request")
36994		return
36995	}
36996
36997	resp, err := client.UpdateVnetConnectionGatewaySender(req)
36998	if err != nil {
36999		result.Response = autorest.Response{Response: resp}
37000		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", resp, "Failure sending request")
37001		return
37002	}
37003
37004	result, err = client.UpdateVnetConnectionGatewayResponder(resp)
37005	if err != nil {
37006		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", resp, "Failure responding to request")
37007		return
37008	}
37009
37010	return
37011}
37012
37013// UpdateVnetConnectionGatewayPreparer prepares the UpdateVnetConnectionGateway request.
37014func (client AppsClient) UpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) {
37015	pathParameters := map[string]interface{}{
37016		"gatewayName":       autorest.Encode("path", gatewayName),
37017		"name":              autorest.Encode("path", name),
37018		"resourceGroupName": autorest.Encode("path", resourceGroupName),
37019		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
37020		"vnetName":          autorest.Encode("path", vnetName),
37021	}
37022
37023	const APIVersion = "2021-01-15"
37024	queryParameters := map[string]interface{}{
37025		"api-version": APIVersion,
37026	}
37027
37028	preparer := autorest.CreatePreparer(
37029		autorest.AsContentType("application/json; charset=utf-8"),
37030		autorest.AsPatch(),
37031		autorest.WithBaseURL(client.BaseURI),
37032		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
37033		autorest.WithJSON(connectionEnvelope),
37034		autorest.WithQueryParameters(queryParameters))
37035	return preparer.Prepare((&http.Request{}).WithContext(ctx))
37036}
37037
37038// UpdateVnetConnectionGatewaySender sends the UpdateVnetConnectionGateway request. The method will close the
37039// http.Response Body if it receives an error.
37040func (client AppsClient) UpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
37041	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
37042}
37043
37044// UpdateVnetConnectionGatewayResponder handles the response to the UpdateVnetConnectionGateway request. The method always
37045// closes the http.Response Body.
37046func (client AppsClient) UpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
37047	err = autorest.Respond(
37048		resp,
37049		azure.WithErrorUnlessStatusCode(http.StatusOK),
37050		autorest.ByUnmarshallingJSON(&result),
37051		autorest.ByClosing())
37052	result.Response = autorest.Response{Response: resp}
37053	return
37054}
37055
37056// UpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or updates it
37057// (PATCH).
37058// Parameters:
37059// resourceGroupName - name of the resource group to which the resource belongs.
37060// name - name of the app.
37061// vnetName - name of the Virtual Network.
37062// gatewayName - name of the gateway. Currently, the only supported string is "primary".
37063// connectionEnvelope - the properties to update this gateway with.
37064// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the
37065// production slot's Virtual Network.
37066func (client AppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) {
37067	if tracing.IsEnabled() {
37068		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionGatewaySlot")
37069		defer func() {
37070			sc := -1
37071			if result.Response.Response != nil {
37072				sc = result.Response.Response.StatusCode
37073			}
37074			tracing.EndSpan(ctx, sc, err)
37075		}()
37076	}
37077	if err := validation.Validate([]validation.Validation{
37078		{TargetValue: resourceGroupName,
37079			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
37080				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
37081				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
37082		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionGatewaySlot", err.Error())
37083	}
37084
37085	req, err := client.UpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot)
37086	if err != nil {
37087		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", nil, "Failure preparing request")
37088		return
37089	}
37090
37091	resp, err := client.UpdateVnetConnectionGatewaySlotSender(req)
37092	if err != nil {
37093		result.Response = autorest.Response{Response: resp}
37094		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", resp, "Failure sending request")
37095		return
37096	}
37097
37098	result, err = client.UpdateVnetConnectionGatewaySlotResponder(resp)
37099	if err != nil {
37100		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", resp, "Failure responding to request")
37101		return
37102	}
37103
37104	return
37105}
37106
37107// UpdateVnetConnectionGatewaySlotPreparer prepares the UpdateVnetConnectionGatewaySlot request.
37108func (client AppsClient) UpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) {
37109	pathParameters := map[string]interface{}{
37110		"gatewayName":       autorest.Encode("path", gatewayName),
37111		"name":              autorest.Encode("path", name),
37112		"resourceGroupName": autorest.Encode("path", resourceGroupName),
37113		"slot":              autorest.Encode("path", slot),
37114		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
37115		"vnetName":          autorest.Encode("path", vnetName),
37116	}
37117
37118	const APIVersion = "2021-01-15"
37119	queryParameters := map[string]interface{}{
37120		"api-version": APIVersion,
37121	}
37122
37123	preparer := autorest.CreatePreparer(
37124		autorest.AsContentType("application/json; charset=utf-8"),
37125		autorest.AsPatch(),
37126		autorest.WithBaseURL(client.BaseURI),
37127		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
37128		autorest.WithJSON(connectionEnvelope),
37129		autorest.WithQueryParameters(queryParameters))
37130	return preparer.Prepare((&http.Request{}).WithContext(ctx))
37131}
37132
37133// UpdateVnetConnectionGatewaySlotSender sends the UpdateVnetConnectionGatewaySlot request. The method will close the
37134// http.Response Body if it receives an error.
37135func (client AppsClient) UpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
37136	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
37137}
37138
37139// UpdateVnetConnectionGatewaySlotResponder handles the response to the UpdateVnetConnectionGatewaySlot request. The method always
37140// closes the http.Response Body.
37141func (client AppsClient) UpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
37142	err = autorest.Respond(
37143		resp,
37144		azure.WithErrorUnlessStatusCode(http.StatusOK),
37145		autorest.ByUnmarshallingJSON(&result),
37146		autorest.ByClosing())
37147	result.Response = autorest.Response{Response: resp}
37148	return
37149}
37150
37151// UpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or updates the
37152// connection properties (PATCH).
37153// Parameters:
37154// resourceGroupName - name of the resource group to which the resource belongs.
37155// name - name of the app.
37156// vnetName - name of an existing Virtual Network.
37157// connectionEnvelope - properties of the Virtual Network connection. See example.
37158// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
37159// the production slot.
37160func (client AppsClient) UpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) {
37161	if tracing.IsEnabled() {
37162		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionSlot")
37163		defer func() {
37164			sc := -1
37165			if result.Response.Response != nil {
37166				sc = result.Response.Response.StatusCode
37167			}
37168			tracing.EndSpan(ctx, sc, err)
37169		}()
37170	}
37171	if err := validation.Validate([]validation.Validation{
37172		{TargetValue: resourceGroupName,
37173			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
37174				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
37175				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
37176		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionSlot", err.Error())
37177	}
37178
37179	req, err := client.UpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot)
37180	if err != nil {
37181		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", nil, "Failure preparing request")
37182		return
37183	}
37184
37185	resp, err := client.UpdateVnetConnectionSlotSender(req)
37186	if err != nil {
37187		result.Response = autorest.Response{Response: resp}
37188		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", resp, "Failure sending request")
37189		return
37190	}
37191
37192	result, err = client.UpdateVnetConnectionSlotResponder(resp)
37193	if err != nil {
37194		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", resp, "Failure responding to request")
37195		return
37196	}
37197
37198	return
37199}
37200
37201// UpdateVnetConnectionSlotPreparer prepares the UpdateVnetConnectionSlot request.
37202func (client AppsClient) UpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) {
37203	pathParameters := map[string]interface{}{
37204		"name":              autorest.Encode("path", name),
37205		"resourceGroupName": autorest.Encode("path", resourceGroupName),
37206		"slot":              autorest.Encode("path", slot),
37207		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
37208		"vnetName":          autorest.Encode("path", vnetName),
37209	}
37210
37211	const APIVersion = "2021-01-15"
37212	queryParameters := map[string]interface{}{
37213		"api-version": APIVersion,
37214	}
37215
37216	preparer := autorest.CreatePreparer(
37217		autorest.AsContentType("application/json; charset=utf-8"),
37218		autorest.AsPatch(),
37219		autorest.WithBaseURL(client.BaseURI),
37220		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
37221		autorest.WithJSON(connectionEnvelope),
37222		autorest.WithQueryParameters(queryParameters))
37223	return preparer.Prepare((&http.Request{}).WithContext(ctx))
37224}
37225
37226// UpdateVnetConnectionSlotSender sends the UpdateVnetConnectionSlot request. The method will close the
37227// http.Response Body if it receives an error.
37228func (client AppsClient) UpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
37229	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
37230}
37231
37232// UpdateVnetConnectionSlotResponder handles the response to the UpdateVnetConnectionSlot request. The method always
37233// closes the http.Response Body.
37234func (client AppsClient) UpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
37235	err = autorest.Respond(
37236		resp,
37237		azure.WithErrorUnlessStatusCode(http.StatusOK),
37238		autorest.ByUnmarshallingJSON(&result),
37239		autorest.ByClosing())
37240	result.Response = autorest.Response{Response: resp}
37241	return
37242}
37243