1package web
2
3// Copyright (c) Microsoft and contributors.  All rights reserved.
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13//
14// See the License for the specific language governing permissions and
15// limitations under the License.
16//
17// Code generated by Microsoft (R) AutoRest Code Generator.
18// Changes may cause incorrect behavior and will be lost if the code is regenerated.
19
20import (
21	"context"
22	"github.com/Azure/go-autorest/autorest"
23	"github.com/Azure/go-autorest/autorest/azure"
24	"github.com/Azure/go-autorest/autorest/validation"
25	"github.com/Azure/go-autorest/tracing"
26	"net/http"
27)
28
29// AppsClient is the webSite Management Client
30type AppsClient struct {
31	BaseClient
32}
33
34// NewAppsClient creates an instance of the AppsClient client.
35func NewAppsClient(subscriptionID string) AppsClient {
36	return NewAppsClientWithBaseURI(DefaultBaseURI, subscriptionID)
37}
38
39// NewAppsClientWithBaseURI creates an instance of the AppsClient client using a custom endpoint.  Use this when
40// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
41func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient {
42	return AppsClient{NewWithBaseURI(baseURI, subscriptionID)}
43}
44
45// AddPremierAddOn description for Updates a named add-on of an app.
46// Parameters:
47// resourceGroupName - name of the resource group to which the resource belongs.
48// name - name of the app.
49// premierAddOnName - add-on name.
50// premierAddOn - a JSON representation of the edited premier add-on.
51func (client AppsClient) AddPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn) (result PremierAddOn, err error) {
52	if tracing.IsEnabled() {
53		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AddPremierAddOn")
54		defer func() {
55			sc := -1
56			if result.Response.Response != nil {
57				sc = result.Response.Response.StatusCode
58			}
59			tracing.EndSpan(ctx, sc, err)
60		}()
61	}
62	if err := validation.Validate([]validation.Validation{
63		{TargetValue: resourceGroupName,
64			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
65				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
66				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
67		return result, validation.NewError("web.AppsClient", "AddPremierAddOn", err.Error())
68	}
69
70	req, err := client.AddPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn)
71	if err != nil {
72		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOn", nil, "Failure preparing request")
73		return
74	}
75
76	resp, err := client.AddPremierAddOnSender(req)
77	if err != nil {
78		result.Response = autorest.Response{Response: resp}
79		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOn", resp, "Failure sending request")
80		return
81	}
82
83	result, err = client.AddPremierAddOnResponder(resp)
84	if err != nil {
85		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOn", resp, "Failure responding to request")
86		return
87	}
88
89	return
90}
91
92// AddPremierAddOnPreparer prepares the AddPremierAddOn request.
93func (client AppsClient) AddPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn) (*http.Request, error) {
94	pathParameters := map[string]interface{}{
95		"name":              autorest.Encode("path", name),
96		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
97		"resourceGroupName": autorest.Encode("path", resourceGroupName),
98		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
99	}
100
101	const APIVersion = "2020-09-01"
102	queryParameters := map[string]interface{}{
103		"api-version": APIVersion,
104	}
105
106	preparer := autorest.CreatePreparer(
107		autorest.AsContentType("application/json; charset=utf-8"),
108		autorest.AsPut(),
109		autorest.WithBaseURL(client.BaseURI),
110		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
111		autorest.WithJSON(premierAddOn),
112		autorest.WithQueryParameters(queryParameters))
113	return preparer.Prepare((&http.Request{}).WithContext(ctx))
114}
115
116// AddPremierAddOnSender sends the AddPremierAddOn request. The method will close the
117// http.Response Body if it receives an error.
118func (client AppsClient) AddPremierAddOnSender(req *http.Request) (*http.Response, error) {
119	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
120}
121
122// AddPremierAddOnResponder handles the response to the AddPremierAddOn request. The method always
123// closes the http.Response Body.
124func (client AppsClient) AddPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
125	err = autorest.Respond(
126		resp,
127		azure.WithErrorUnlessStatusCode(http.StatusOK),
128		autorest.ByUnmarshallingJSON(&result),
129		autorest.ByClosing())
130	result.Response = autorest.Response{Response: resp}
131	return
132}
133
134// AddPremierAddOnSlot description for Updates a named add-on of an app.
135// Parameters:
136// resourceGroupName - name of the resource group to which the resource belongs.
137// name - name of the app.
138// premierAddOnName - add-on name.
139// premierAddOn - a JSON representation of the edited premier add-on.
140// slot - name of the deployment slot. If a slot is not specified, the API will update the named add-on for the
141// production slot.
142func (client AppsClient) AddPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, slot string) (result PremierAddOn, err error) {
143	if tracing.IsEnabled() {
144		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AddPremierAddOnSlot")
145		defer func() {
146			sc := -1
147			if result.Response.Response != nil {
148				sc = result.Response.Response.StatusCode
149			}
150			tracing.EndSpan(ctx, sc, err)
151		}()
152	}
153	if err := validation.Validate([]validation.Validation{
154		{TargetValue: resourceGroupName,
155			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
156				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
157				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
158		return result, validation.NewError("web.AppsClient", "AddPremierAddOnSlot", err.Error())
159	}
160
161	req, err := client.AddPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, slot)
162	if err != nil {
163		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOnSlot", nil, "Failure preparing request")
164		return
165	}
166
167	resp, err := client.AddPremierAddOnSlotSender(req)
168	if err != nil {
169		result.Response = autorest.Response{Response: resp}
170		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOnSlot", resp, "Failure sending request")
171		return
172	}
173
174	result, err = client.AddPremierAddOnSlotResponder(resp)
175	if err != nil {
176		err = autorest.NewErrorWithError(err, "web.AppsClient", "AddPremierAddOnSlot", resp, "Failure responding to request")
177		return
178	}
179
180	return
181}
182
183// AddPremierAddOnSlotPreparer prepares the AddPremierAddOnSlot request.
184func (client AppsClient) AddPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, slot string) (*http.Request, error) {
185	pathParameters := map[string]interface{}{
186		"name":              autorest.Encode("path", name),
187		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
188		"resourceGroupName": autorest.Encode("path", resourceGroupName),
189		"slot":              autorest.Encode("path", slot),
190		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
191	}
192
193	const APIVersion = "2020-09-01"
194	queryParameters := map[string]interface{}{
195		"api-version": APIVersion,
196	}
197
198	preparer := autorest.CreatePreparer(
199		autorest.AsContentType("application/json; charset=utf-8"),
200		autorest.AsPut(),
201		autorest.WithBaseURL(client.BaseURI),
202		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
203		autorest.WithJSON(premierAddOn),
204		autorest.WithQueryParameters(queryParameters))
205	return preparer.Prepare((&http.Request{}).WithContext(ctx))
206}
207
208// AddPremierAddOnSlotSender sends the AddPremierAddOnSlot request. The method will close the
209// http.Response Body if it receives an error.
210func (client AppsClient) AddPremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
211	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
212}
213
214// AddPremierAddOnSlotResponder handles the response to the AddPremierAddOnSlot request. The method always
215// closes the http.Response Body.
216func (client AppsClient) AddPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
217	err = autorest.Respond(
218		resp,
219		azure.WithErrorUnlessStatusCode(http.StatusOK),
220		autorest.ByUnmarshallingJSON(&result),
221		autorest.ByClosing())
222	result.Response = autorest.Response{Response: resp}
223	return
224}
225
226// AnalyzeCustomHostname description for Analyze a custom hostname.
227// Parameters:
228// resourceGroupName - name of the resource group to which the resource belongs.
229// name - name of web app.
230// hostName - custom hostname.
231func (client AppsClient) AnalyzeCustomHostname(ctx context.Context, resourceGroupName string, name string, hostName string) (result CustomHostnameAnalysisResult, err error) {
232	if tracing.IsEnabled() {
233		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AnalyzeCustomHostname")
234		defer func() {
235			sc := -1
236			if result.Response.Response != nil {
237				sc = result.Response.Response.StatusCode
238			}
239			tracing.EndSpan(ctx, sc, err)
240		}()
241	}
242	if err := validation.Validate([]validation.Validation{
243		{TargetValue: resourceGroupName,
244			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
245				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
246				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
247		return result, validation.NewError("web.AppsClient", "AnalyzeCustomHostname", err.Error())
248	}
249
250	req, err := client.AnalyzeCustomHostnamePreparer(ctx, resourceGroupName, name, hostName)
251	if err != nil {
252		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostname", nil, "Failure preparing request")
253		return
254	}
255
256	resp, err := client.AnalyzeCustomHostnameSender(req)
257	if err != nil {
258		result.Response = autorest.Response{Response: resp}
259		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostname", resp, "Failure sending request")
260		return
261	}
262
263	result, err = client.AnalyzeCustomHostnameResponder(resp)
264	if err != nil {
265		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostname", resp, "Failure responding to request")
266		return
267	}
268
269	return
270}
271
272// AnalyzeCustomHostnamePreparer prepares the AnalyzeCustomHostname request.
273func (client AppsClient) AnalyzeCustomHostnamePreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
274	pathParameters := map[string]interface{}{
275		"name":              autorest.Encode("path", name),
276		"resourceGroupName": autorest.Encode("path", resourceGroupName),
277		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
278	}
279
280	const APIVersion = "2020-09-01"
281	queryParameters := map[string]interface{}{
282		"api-version": APIVersion,
283	}
284	if len(hostName) > 0 {
285		queryParameters["hostName"] = autorest.Encode("query", hostName)
286	}
287
288	preparer := autorest.CreatePreparer(
289		autorest.AsGet(),
290		autorest.WithBaseURL(client.BaseURI),
291		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname", pathParameters),
292		autorest.WithQueryParameters(queryParameters))
293	return preparer.Prepare((&http.Request{}).WithContext(ctx))
294}
295
296// AnalyzeCustomHostnameSender sends the AnalyzeCustomHostname request. The method will close the
297// http.Response Body if it receives an error.
298func (client AppsClient) AnalyzeCustomHostnameSender(req *http.Request) (*http.Response, error) {
299	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
300}
301
302// AnalyzeCustomHostnameResponder handles the response to the AnalyzeCustomHostname request. The method always
303// closes the http.Response Body.
304func (client AppsClient) AnalyzeCustomHostnameResponder(resp *http.Response) (result CustomHostnameAnalysisResult, err error) {
305	err = autorest.Respond(
306		resp,
307		azure.WithErrorUnlessStatusCode(http.StatusOK),
308		autorest.ByUnmarshallingJSON(&result),
309		autorest.ByClosing())
310	result.Response = autorest.Response{Response: resp}
311	return
312}
313
314// AnalyzeCustomHostnameSlot description for Analyze a custom hostname.
315// Parameters:
316// resourceGroupName - name of the resource group to which the resource belongs.
317// name - name of web app.
318// slot - name of web app slot. If not specified then will default to production slot.
319// hostName - custom hostname.
320func (client AppsClient) AnalyzeCustomHostnameSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result CustomHostnameAnalysisResult, err error) {
321	if tracing.IsEnabled() {
322		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.AnalyzeCustomHostnameSlot")
323		defer func() {
324			sc := -1
325			if result.Response.Response != nil {
326				sc = result.Response.Response.StatusCode
327			}
328			tracing.EndSpan(ctx, sc, err)
329		}()
330	}
331	if err := validation.Validate([]validation.Validation{
332		{TargetValue: resourceGroupName,
333			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
334				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
335				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
336		return result, validation.NewError("web.AppsClient", "AnalyzeCustomHostnameSlot", err.Error())
337	}
338
339	req, err := client.AnalyzeCustomHostnameSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
340	if err != nil {
341		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostnameSlot", nil, "Failure preparing request")
342		return
343	}
344
345	resp, err := client.AnalyzeCustomHostnameSlotSender(req)
346	if err != nil {
347		result.Response = autorest.Response{Response: resp}
348		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostnameSlot", resp, "Failure sending request")
349		return
350	}
351
352	result, err = client.AnalyzeCustomHostnameSlotResponder(resp)
353	if err != nil {
354		err = autorest.NewErrorWithError(err, "web.AppsClient", "AnalyzeCustomHostnameSlot", resp, "Failure responding to request")
355		return
356	}
357
358	return
359}
360
361// AnalyzeCustomHostnameSlotPreparer prepares the AnalyzeCustomHostnameSlot request.
362func (client AppsClient) AnalyzeCustomHostnameSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
363	pathParameters := map[string]interface{}{
364		"name":              autorest.Encode("path", name),
365		"resourceGroupName": autorest.Encode("path", resourceGroupName),
366		"slot":              autorest.Encode("path", slot),
367		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
368	}
369
370	const APIVersion = "2020-09-01"
371	queryParameters := map[string]interface{}{
372		"api-version": APIVersion,
373	}
374	if len(hostName) > 0 {
375		queryParameters["hostName"] = autorest.Encode("query", hostName)
376	}
377
378	preparer := autorest.CreatePreparer(
379		autorest.AsGet(),
380		autorest.WithBaseURL(client.BaseURI),
381		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname", pathParameters),
382		autorest.WithQueryParameters(queryParameters))
383	return preparer.Prepare((&http.Request{}).WithContext(ctx))
384}
385
386// AnalyzeCustomHostnameSlotSender sends the AnalyzeCustomHostnameSlot request. The method will close the
387// http.Response Body if it receives an error.
388func (client AppsClient) AnalyzeCustomHostnameSlotSender(req *http.Request) (*http.Response, error) {
389	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
390}
391
392// AnalyzeCustomHostnameSlotResponder handles the response to the AnalyzeCustomHostnameSlot request. The method always
393// closes the http.Response Body.
394func (client AppsClient) AnalyzeCustomHostnameSlotResponder(resp *http.Response) (result CustomHostnameAnalysisResult, err error) {
395	err = autorest.Respond(
396		resp,
397		azure.WithErrorUnlessStatusCode(http.StatusOK),
398		autorest.ByUnmarshallingJSON(&result),
399		autorest.ByClosing())
400	result.Response = autorest.Response{Response: resp}
401	return
402}
403
404// ApplySlotConfigToProduction description for Applies the configuration settings from the target slot onto the current
405// slot.
406// Parameters:
407// resourceGroupName - name of the resource group to which the resource belongs.
408// name - name of the app.
409// slotSwapEntity - JSON object that contains the target slot name. See example.
410func (client AppsClient) ApplySlotConfigToProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result autorest.Response, err error) {
411	if tracing.IsEnabled() {
412		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApplySlotConfigToProduction")
413		defer func() {
414			sc := -1
415			if result.Response != nil {
416				sc = result.Response.StatusCode
417			}
418			tracing.EndSpan(ctx, sc, err)
419		}()
420	}
421	if err := validation.Validate([]validation.Validation{
422		{TargetValue: resourceGroupName,
423			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
424				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
425				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
426		{TargetValue: slotSwapEntity,
427			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
428				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
429		return result, validation.NewError("web.AppsClient", "ApplySlotConfigToProduction", err.Error())
430	}
431
432	req, err := client.ApplySlotConfigToProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
433	if err != nil {
434		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", nil, "Failure preparing request")
435		return
436	}
437
438	resp, err := client.ApplySlotConfigToProductionSender(req)
439	if err != nil {
440		result.Response = resp
441		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", resp, "Failure sending request")
442		return
443	}
444
445	result, err = client.ApplySlotConfigToProductionResponder(resp)
446	if err != nil {
447		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigToProduction", resp, "Failure responding to request")
448		return
449	}
450
451	return
452}
453
454// ApplySlotConfigToProductionPreparer prepares the ApplySlotConfigToProduction request.
455func (client AppsClient) ApplySlotConfigToProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
456	pathParameters := map[string]interface{}{
457		"name":              autorest.Encode("path", name),
458		"resourceGroupName": autorest.Encode("path", resourceGroupName),
459		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
460	}
461
462	const APIVersion = "2020-09-01"
463	queryParameters := map[string]interface{}{
464		"api-version": APIVersion,
465	}
466
467	preparer := autorest.CreatePreparer(
468		autorest.AsContentType("application/json; charset=utf-8"),
469		autorest.AsPost(),
470		autorest.WithBaseURL(client.BaseURI),
471		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig", pathParameters),
472		autorest.WithJSON(slotSwapEntity),
473		autorest.WithQueryParameters(queryParameters))
474	return preparer.Prepare((&http.Request{}).WithContext(ctx))
475}
476
477// ApplySlotConfigToProductionSender sends the ApplySlotConfigToProduction request. The method will close the
478// http.Response Body if it receives an error.
479func (client AppsClient) ApplySlotConfigToProductionSender(req *http.Request) (*http.Response, error) {
480	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
481}
482
483// ApplySlotConfigToProductionResponder handles the response to the ApplySlotConfigToProduction request. The method always
484// closes the http.Response Body.
485func (client AppsClient) ApplySlotConfigToProductionResponder(resp *http.Response) (result autorest.Response, err error) {
486	err = autorest.Respond(
487		resp,
488		azure.WithErrorUnlessStatusCode(http.StatusOK),
489		autorest.ByClosing())
490	result.Response = resp
491	return
492}
493
494// ApplySlotConfigurationSlot description for Applies the configuration settings from the target slot onto the current
495// slot.
496// Parameters:
497// resourceGroupName - name of the resource group to which the resource belongs.
498// name - name of the app.
499// slotSwapEntity - JSON object that contains the target slot name. See example.
500// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
501func (client AppsClient) ApplySlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result autorest.Response, err error) {
502	if tracing.IsEnabled() {
503		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApplySlotConfigurationSlot")
504		defer func() {
505			sc := -1
506			if result.Response != nil {
507				sc = result.Response.StatusCode
508			}
509			tracing.EndSpan(ctx, sc, err)
510		}()
511	}
512	if err := validation.Validate([]validation.Validation{
513		{TargetValue: resourceGroupName,
514			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
515				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
516				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
517		{TargetValue: slotSwapEntity,
518			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
519				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
520		return result, validation.NewError("web.AppsClient", "ApplySlotConfigurationSlot", err.Error())
521	}
522
523	req, err := client.ApplySlotConfigurationSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
524	if err != nil {
525		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", nil, "Failure preparing request")
526		return
527	}
528
529	resp, err := client.ApplySlotConfigurationSlotSender(req)
530	if err != nil {
531		result.Response = resp
532		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", resp, "Failure sending request")
533		return
534	}
535
536	result, err = client.ApplySlotConfigurationSlotResponder(resp)
537	if err != nil {
538		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApplySlotConfigurationSlot", resp, "Failure responding to request")
539		return
540	}
541
542	return
543}
544
545// ApplySlotConfigurationSlotPreparer prepares the ApplySlotConfigurationSlot request.
546func (client AppsClient) ApplySlotConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
547	pathParameters := map[string]interface{}{
548		"name":              autorest.Encode("path", name),
549		"resourceGroupName": autorest.Encode("path", resourceGroupName),
550		"slot":              autorest.Encode("path", slot),
551		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
552	}
553
554	const APIVersion = "2020-09-01"
555	queryParameters := map[string]interface{}{
556		"api-version": APIVersion,
557	}
558
559	preparer := autorest.CreatePreparer(
560		autorest.AsContentType("application/json; charset=utf-8"),
561		autorest.AsPost(),
562		autorest.WithBaseURL(client.BaseURI),
563		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig", pathParameters),
564		autorest.WithJSON(slotSwapEntity),
565		autorest.WithQueryParameters(queryParameters))
566	return preparer.Prepare((&http.Request{}).WithContext(ctx))
567}
568
569// ApplySlotConfigurationSlotSender sends the ApplySlotConfigurationSlot request. The method will close the
570// http.Response Body if it receives an error.
571func (client AppsClient) ApplySlotConfigurationSlotSender(req *http.Request) (*http.Response, error) {
572	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
573}
574
575// ApplySlotConfigurationSlotResponder handles the response to the ApplySlotConfigurationSlot request. The method always
576// closes the http.Response Body.
577func (client AppsClient) ApplySlotConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
578	err = autorest.Respond(
579		resp,
580		azure.WithErrorUnlessStatusCode(http.StatusOK),
581		autorest.ByClosing())
582	result.Response = resp
583	return
584}
585
586// ApproveOrRejectPrivateEndpointConnection description for Approves or rejects a private endpoint connection
587// Parameters:
588// resourceGroupName - name of the resource group to which the resource belongs.
589// name - name of the site.
590func (client AppsClient) ApproveOrRejectPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource) (result AppsApproveOrRejectPrivateEndpointConnectionFuture, err error) {
591	if tracing.IsEnabled() {
592		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ApproveOrRejectPrivateEndpointConnection")
593		defer func() {
594			sc := -1
595			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
596				sc = result.FutureAPI.Response().StatusCode
597			}
598			tracing.EndSpan(ctx, sc, err)
599		}()
600	}
601	if err := validation.Validate([]validation.Validation{
602		{TargetValue: resourceGroupName,
603			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
604				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
605				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
606		return result, validation.NewError("web.AppsClient", "ApproveOrRejectPrivateEndpointConnection", err.Error())
607	}
608
609	req, err := client.ApproveOrRejectPrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper)
610	if err != nil {
611		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApproveOrRejectPrivateEndpointConnection", nil, "Failure preparing request")
612		return
613	}
614
615	result, err = client.ApproveOrRejectPrivateEndpointConnectionSender(req)
616	if err != nil {
617		err = autorest.NewErrorWithError(err, "web.AppsClient", "ApproveOrRejectPrivateEndpointConnection", nil, "Failure sending request")
618		return
619	}
620
621	return
622}
623
624// ApproveOrRejectPrivateEndpointConnectionPreparer prepares the ApproveOrRejectPrivateEndpointConnection request.
625func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string, privateEndpointWrapper PrivateLinkConnectionApprovalRequestResource) (*http.Request, error) {
626	pathParameters := map[string]interface{}{
627		"name":                          autorest.Encode("path", name),
628		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
629		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
630		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
631	}
632
633	const APIVersion = "2020-09-01"
634	queryParameters := map[string]interface{}{
635		"api-version": APIVersion,
636	}
637
638	preparer := autorest.CreatePreparer(
639		autorest.AsContentType("application/json; charset=utf-8"),
640		autorest.AsPut(),
641		autorest.WithBaseURL(client.BaseURI),
642		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
643		autorest.WithJSON(privateEndpointWrapper),
644		autorest.WithQueryParameters(queryParameters))
645	return preparer.Prepare((&http.Request{}).WithContext(ctx))
646}
647
648// ApproveOrRejectPrivateEndpointConnectionSender sends the ApproveOrRejectPrivateEndpointConnection request. The method will close the
649// http.Response Body if it receives an error.
650func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionSender(req *http.Request) (future AppsApproveOrRejectPrivateEndpointConnectionFuture, err error) {
651	var resp *http.Response
652	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
653	if err != nil {
654		return
655	}
656	var azf azure.Future
657	azf, err = azure.NewFutureFromResponse(resp)
658	future.FutureAPI = &azf
659	future.Result = func(client AppsClient) (pecr PrivateEndpointConnectionResource, err error) {
660		var done bool
661		done, err = future.DoneWithContext(context.Background(), client)
662		if err != nil {
663			err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
664			return
665		}
666		if !done {
667			err = azure.NewAsyncOpIncompleteError("web.AppsApproveOrRejectPrivateEndpointConnectionFuture")
668			return
669		}
670		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
671		pecr.Response.Response, err = future.GetResult(sender)
672		if pecr.Response.Response == nil && err == nil {
673			err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", nil, "received nil response and error")
674		}
675		if err == nil && pecr.Response.Response.StatusCode != http.StatusNoContent {
676			pecr, err = client.ApproveOrRejectPrivateEndpointConnectionResponder(pecr.Response.Response)
677			if err != nil {
678				err = autorest.NewErrorWithError(err, "web.AppsApproveOrRejectPrivateEndpointConnectionFuture", "Result", pecr.Response.Response, "Failure responding to request")
679			}
680		}
681		return
682	}
683	return
684}
685
686// ApproveOrRejectPrivateEndpointConnectionResponder handles the response to the ApproveOrRejectPrivateEndpointConnection request. The method always
687// closes the http.Response Body.
688func (client AppsClient) ApproveOrRejectPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnectionResource, err error) {
689	err = autorest.Respond(
690		resp,
691		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
692		autorest.ByUnmarshallingJSON(&result),
693		autorest.ByClosing())
694	result.Response = autorest.Response{Response: resp}
695	return
696}
697
698// Backup description for Creates a backup of an app.
699// Parameters:
700// resourceGroupName - name of the resource group to which the resource belongs.
701// name - name of the app.
702// request - backup configuration. You can use the JSON response from the POST action as input here.
703func (client AppsClient) Backup(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (result BackupItem, err error) {
704	if tracing.IsEnabled() {
705		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Backup")
706		defer func() {
707			sc := -1
708			if result.Response.Response != nil {
709				sc = result.Response.Response.StatusCode
710			}
711			tracing.EndSpan(ctx, sc, err)
712		}()
713	}
714	if err := validation.Validate([]validation.Validation{
715		{TargetValue: resourceGroupName,
716			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
717				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
718				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
719		{TargetValue: request,
720			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
721				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
722					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
723						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
724							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
725							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
726						}},
727				}}}}}); err != nil {
728		return result, validation.NewError("web.AppsClient", "Backup", err.Error())
729	}
730
731	req, err := client.BackupPreparer(ctx, resourceGroupName, name, request)
732	if err != nil {
733		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", nil, "Failure preparing request")
734		return
735	}
736
737	resp, err := client.BackupSender(req)
738	if err != nil {
739		result.Response = autorest.Response{Response: resp}
740		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", resp, "Failure sending request")
741		return
742	}
743
744	result, err = client.BackupResponder(resp)
745	if err != nil {
746		err = autorest.NewErrorWithError(err, "web.AppsClient", "Backup", resp, "Failure responding to request")
747		return
748	}
749
750	return
751}
752
753// BackupPreparer prepares the Backup request.
754func (client AppsClient) BackupPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (*http.Request, error) {
755	pathParameters := map[string]interface{}{
756		"name":              autorest.Encode("path", name),
757		"resourceGroupName": autorest.Encode("path", resourceGroupName),
758		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
759	}
760
761	const APIVersion = "2020-09-01"
762	queryParameters := map[string]interface{}{
763		"api-version": APIVersion,
764	}
765
766	preparer := autorest.CreatePreparer(
767		autorest.AsContentType("application/json; charset=utf-8"),
768		autorest.AsPost(),
769		autorest.WithBaseURL(client.BaseURI),
770		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup", pathParameters),
771		autorest.WithJSON(request),
772		autorest.WithQueryParameters(queryParameters))
773	return preparer.Prepare((&http.Request{}).WithContext(ctx))
774}
775
776// BackupSender sends the Backup request. The method will close the
777// http.Response Body if it receives an error.
778func (client AppsClient) BackupSender(req *http.Request) (*http.Response, error) {
779	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
780}
781
782// BackupResponder handles the response to the Backup request. The method always
783// closes the http.Response Body.
784func (client AppsClient) BackupResponder(resp *http.Response) (result BackupItem, err error) {
785	err = autorest.Respond(
786		resp,
787		azure.WithErrorUnlessStatusCode(http.StatusOK),
788		autorest.ByUnmarshallingJSON(&result),
789		autorest.ByClosing())
790	result.Response = autorest.Response{Response: resp}
791	return
792}
793
794// BackupSlot description for Creates a backup of an app.
795// Parameters:
796// resourceGroupName - name of the resource group to which the resource belongs.
797// name - name of the app.
798// request - backup configuration. You can use the JSON response from the POST action as input here.
799// slot - name of the deployment slot. If a slot is not specified, the API will create a backup for the
800// production slot.
801func (client AppsClient) BackupSlot(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (result BackupItem, err error) {
802	if tracing.IsEnabled() {
803		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.BackupSlot")
804		defer func() {
805			sc := -1
806			if result.Response.Response != nil {
807				sc = result.Response.Response.StatusCode
808			}
809			tracing.EndSpan(ctx, sc, err)
810		}()
811	}
812	if err := validation.Validate([]validation.Validation{
813		{TargetValue: resourceGroupName,
814			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
815				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
816				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
817		{TargetValue: request,
818			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
819				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
820					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
821						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
822							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
823							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
824						}},
825				}}}}}); err != nil {
826		return result, validation.NewError("web.AppsClient", "BackupSlot", err.Error())
827	}
828
829	req, err := client.BackupSlotPreparer(ctx, resourceGroupName, name, request, slot)
830	if err != nil {
831		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", nil, "Failure preparing request")
832		return
833	}
834
835	resp, err := client.BackupSlotSender(req)
836	if err != nil {
837		result.Response = autorest.Response{Response: resp}
838		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", resp, "Failure sending request")
839		return
840	}
841
842	result, err = client.BackupSlotResponder(resp)
843	if err != nil {
844		err = autorest.NewErrorWithError(err, "web.AppsClient", "BackupSlot", resp, "Failure responding to request")
845		return
846	}
847
848	return
849}
850
851// BackupSlotPreparer prepares the BackupSlot request.
852func (client AppsClient) BackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (*http.Request, error) {
853	pathParameters := map[string]interface{}{
854		"name":              autorest.Encode("path", name),
855		"resourceGroupName": autorest.Encode("path", resourceGroupName),
856		"slot":              autorest.Encode("path", slot),
857		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
858	}
859
860	const APIVersion = "2020-09-01"
861	queryParameters := map[string]interface{}{
862		"api-version": APIVersion,
863	}
864
865	preparer := autorest.CreatePreparer(
866		autorest.AsContentType("application/json; charset=utf-8"),
867		autorest.AsPost(),
868		autorest.WithBaseURL(client.BaseURI),
869		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup", pathParameters),
870		autorest.WithJSON(request),
871		autorest.WithQueryParameters(queryParameters))
872	return preparer.Prepare((&http.Request{}).WithContext(ctx))
873}
874
875// BackupSlotSender sends the BackupSlot request. The method will close the
876// http.Response Body if it receives an error.
877func (client AppsClient) BackupSlotSender(req *http.Request) (*http.Response, error) {
878	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
879}
880
881// BackupSlotResponder handles the response to the BackupSlot request. The method always
882// closes the http.Response Body.
883func (client AppsClient) BackupSlotResponder(resp *http.Response) (result BackupItem, err error) {
884	err = autorest.Respond(
885		resp,
886		azure.WithErrorUnlessStatusCode(http.StatusOK),
887		autorest.ByUnmarshallingJSON(&result),
888		autorest.ByClosing())
889	result.Response = autorest.Response{Response: resp}
890	return
891}
892
893// CopyProductionSlot description for Copies a deployment slot to another deployment slot of an app.
894// Parameters:
895// resourceGroupName - name of the resource group to which the resource belongs.
896// name - name of the app.
897// copySlotEntity - JSON object that contains the target slot name and site config properties to override the
898// source slot config. See example.
899func (client AppsClient) CopyProductionSlot(ctx context.Context, resourceGroupName string, name string, copySlotEntity CsmCopySlotEntity) (result AppsCopyProductionSlotFuture, err error) {
900	if tracing.IsEnabled() {
901		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CopyProductionSlot")
902		defer func() {
903			sc := -1
904			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
905				sc = result.FutureAPI.Response().StatusCode
906			}
907			tracing.EndSpan(ctx, sc, err)
908		}()
909	}
910	if err := validation.Validate([]validation.Validation{
911		{TargetValue: resourceGroupName,
912			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
913				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
914				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
915		{TargetValue: copySlotEntity,
916			Constraints: []validation.Constraint{{Target: "copySlotEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
917				{Target: "copySlotEntity.SiteConfig", Name: validation.Null, Rule: true,
918					Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.Push", Name: validation.Null, Rule: false,
919						Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
920							Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
921						}},
922						{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
923							Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
924								{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
925							}},
926					}}}}}); err != nil {
927		return result, validation.NewError("web.AppsClient", "CopyProductionSlot", err.Error())
928	}
929
930	req, err := client.CopyProductionSlotPreparer(ctx, resourceGroupName, name, copySlotEntity)
931	if err != nil {
932		err = autorest.NewErrorWithError(err, "web.AppsClient", "CopyProductionSlot", nil, "Failure preparing request")
933		return
934	}
935
936	result, err = client.CopyProductionSlotSender(req)
937	if err != nil {
938		err = autorest.NewErrorWithError(err, "web.AppsClient", "CopyProductionSlot", nil, "Failure sending request")
939		return
940	}
941
942	return
943}
944
945// CopyProductionSlotPreparer prepares the CopyProductionSlot request.
946func (client AppsClient) CopyProductionSlotPreparer(ctx context.Context, resourceGroupName string, name string, copySlotEntity CsmCopySlotEntity) (*http.Request, error) {
947	pathParameters := map[string]interface{}{
948		"name":              autorest.Encode("path", name),
949		"resourceGroupName": autorest.Encode("path", resourceGroupName),
950		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
951	}
952
953	const APIVersion = "2020-09-01"
954	queryParameters := map[string]interface{}{
955		"api-version": APIVersion,
956	}
957
958	preparer := autorest.CreatePreparer(
959		autorest.AsContentType("application/json; charset=utf-8"),
960		autorest.AsPost(),
961		autorest.WithBaseURL(client.BaseURI),
962		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy", pathParameters),
963		autorest.WithJSON(copySlotEntity),
964		autorest.WithQueryParameters(queryParameters))
965	return preparer.Prepare((&http.Request{}).WithContext(ctx))
966}
967
968// CopyProductionSlotSender sends the CopyProductionSlot request. The method will close the
969// http.Response Body if it receives an error.
970func (client AppsClient) CopyProductionSlotSender(req *http.Request) (future AppsCopyProductionSlotFuture, err error) {
971	var resp *http.Response
972	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
973	if err != nil {
974		return
975	}
976	var azf azure.Future
977	azf, err = azure.NewFutureFromResponse(resp)
978	future.FutureAPI = &azf
979	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
980		var done bool
981		done, err = future.DoneWithContext(context.Background(), client)
982		if err != nil {
983			err = autorest.NewErrorWithError(err, "web.AppsCopyProductionSlotFuture", "Result", future.Response(), "Polling failure")
984			return
985		}
986		if !done {
987			err = azure.NewAsyncOpIncompleteError("web.AppsCopyProductionSlotFuture")
988			return
989		}
990		ar.Response = future.Response()
991		return
992	}
993	return
994}
995
996// CopyProductionSlotResponder handles the response to the CopyProductionSlot request. The method always
997// closes the http.Response Body.
998func (client AppsClient) CopyProductionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
999	err = autorest.Respond(
1000		resp,
1001		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
1002		autorest.ByClosing())
1003	result.Response = resp
1004	return
1005}
1006
1007// CopySlotSlot description for Copies a deployment slot to another deployment slot of an app.
1008// Parameters:
1009// resourceGroupName - name of the resource group to which the resource belongs.
1010// name - name of the app.
1011// copySlotEntity - JSON object that contains the target slot name and site config properties to override the
1012// source slot config. See example.
1013// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
1014func (client AppsClient) CopySlotSlot(ctx context.Context, resourceGroupName string, name string, copySlotEntity CsmCopySlotEntity, slot string) (result AppsCopySlotSlotFuture, err error) {
1015	if tracing.IsEnabled() {
1016		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CopySlotSlot")
1017		defer func() {
1018			sc := -1
1019			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1020				sc = result.FutureAPI.Response().StatusCode
1021			}
1022			tracing.EndSpan(ctx, sc, err)
1023		}()
1024	}
1025	if err := validation.Validate([]validation.Validation{
1026		{TargetValue: resourceGroupName,
1027			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1028				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1029				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
1030		{TargetValue: copySlotEntity,
1031			Constraints: []validation.Constraint{{Target: "copySlotEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
1032				{Target: "copySlotEntity.SiteConfig", Name: validation.Null, Rule: true,
1033					Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.Push", Name: validation.Null, Rule: false,
1034						Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
1035							Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
1036						}},
1037						{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
1038							Chain: []validation.Constraint{{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
1039								{Target: "copySlotEntity.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
1040							}},
1041					}}}}}); err != nil {
1042		return result, validation.NewError("web.AppsClient", "CopySlotSlot", err.Error())
1043	}
1044
1045	req, err := client.CopySlotSlotPreparer(ctx, resourceGroupName, name, copySlotEntity, slot)
1046	if err != nil {
1047		err = autorest.NewErrorWithError(err, "web.AppsClient", "CopySlotSlot", nil, "Failure preparing request")
1048		return
1049	}
1050
1051	result, err = client.CopySlotSlotSender(req)
1052	if err != nil {
1053		err = autorest.NewErrorWithError(err, "web.AppsClient", "CopySlotSlot", nil, "Failure sending request")
1054		return
1055	}
1056
1057	return
1058}
1059
1060// CopySlotSlotPreparer prepares the CopySlotSlot request.
1061func (client AppsClient) CopySlotSlotPreparer(ctx context.Context, resourceGroupName string, name string, copySlotEntity CsmCopySlotEntity, slot string) (*http.Request, error) {
1062	pathParameters := map[string]interface{}{
1063		"name":              autorest.Encode("path", name),
1064		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1065		"slot":              autorest.Encode("path", slot),
1066		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1067	}
1068
1069	const APIVersion = "2020-09-01"
1070	queryParameters := map[string]interface{}{
1071		"api-version": APIVersion,
1072	}
1073
1074	preparer := autorest.CreatePreparer(
1075		autorest.AsContentType("application/json; charset=utf-8"),
1076		autorest.AsPost(),
1077		autorest.WithBaseURL(client.BaseURI),
1078		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy", pathParameters),
1079		autorest.WithJSON(copySlotEntity),
1080		autorest.WithQueryParameters(queryParameters))
1081	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1082}
1083
1084// CopySlotSlotSender sends the CopySlotSlot request. The method will close the
1085// http.Response Body if it receives an error.
1086func (client AppsClient) CopySlotSlotSender(req *http.Request) (future AppsCopySlotSlotFuture, err error) {
1087	var resp *http.Response
1088	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1089	if err != nil {
1090		return
1091	}
1092	var azf azure.Future
1093	azf, err = azure.NewFutureFromResponse(resp)
1094	future.FutureAPI = &azf
1095	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
1096		var done bool
1097		done, err = future.DoneWithContext(context.Background(), client)
1098		if err != nil {
1099			err = autorest.NewErrorWithError(err, "web.AppsCopySlotSlotFuture", "Result", future.Response(), "Polling failure")
1100			return
1101		}
1102		if !done {
1103			err = azure.NewAsyncOpIncompleteError("web.AppsCopySlotSlotFuture")
1104			return
1105		}
1106		ar.Response = future.Response()
1107		return
1108	}
1109	return
1110}
1111
1112// CopySlotSlotResponder handles the response to the CopySlotSlot request. The method always
1113// closes the http.Response Body.
1114func (client AppsClient) CopySlotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
1115	err = autorest.Respond(
1116		resp,
1117		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
1118		autorest.ByClosing())
1119	result.Response = resp
1120	return
1121}
1122
1123// CreateDeployment description for Create a deployment for an app, or a deployment slot.
1124// Parameters:
1125// resourceGroupName - name of the resource group to which the resource belongs.
1126// name - name of the app.
1127// ID - ID of an existing deployment.
1128// deployment - deployment details.
1129func (client AppsClient) CreateDeployment(ctx context.Context, resourceGroupName string, name string, ID string, deployment Deployment) (result Deployment, err error) {
1130	if tracing.IsEnabled() {
1131		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateDeployment")
1132		defer func() {
1133			sc := -1
1134			if result.Response.Response != nil {
1135				sc = result.Response.Response.StatusCode
1136			}
1137			tracing.EndSpan(ctx, sc, err)
1138		}()
1139	}
1140	if err := validation.Validate([]validation.Validation{
1141		{TargetValue: resourceGroupName,
1142			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1143				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1144				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1145		return result, validation.NewError("web.AppsClient", "CreateDeployment", err.Error())
1146	}
1147
1148	req, err := client.CreateDeploymentPreparer(ctx, resourceGroupName, name, ID, deployment)
1149	if err != nil {
1150		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", nil, "Failure preparing request")
1151		return
1152	}
1153
1154	resp, err := client.CreateDeploymentSender(req)
1155	if err != nil {
1156		result.Response = autorest.Response{Response: resp}
1157		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", resp, "Failure sending request")
1158		return
1159	}
1160
1161	result, err = client.CreateDeploymentResponder(resp)
1162	if err != nil {
1163		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeployment", resp, "Failure responding to request")
1164		return
1165	}
1166
1167	return
1168}
1169
1170// CreateDeploymentPreparer prepares the CreateDeployment request.
1171func (client AppsClient) CreateDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string, deployment Deployment) (*http.Request, error) {
1172	pathParameters := map[string]interface{}{
1173		"id":                autorest.Encode("path", ID),
1174		"name":              autorest.Encode("path", name),
1175		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1176		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1177	}
1178
1179	const APIVersion = "2020-09-01"
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}/deployments/{id}", pathParameters),
1189		autorest.WithJSON(deployment),
1190		autorest.WithQueryParameters(queryParameters))
1191	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1192}
1193
1194// CreateDeploymentSender sends the CreateDeployment request. The method will close the
1195// http.Response Body if it receives an error.
1196func (client AppsClient) CreateDeploymentSender(req *http.Request) (*http.Response, error) {
1197	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1198}
1199
1200// CreateDeploymentResponder handles the response to the CreateDeployment request. The method always
1201// closes the http.Response Body.
1202func (client AppsClient) CreateDeploymentResponder(resp *http.Response) (result Deployment, err error) {
1203	err = autorest.Respond(
1204		resp,
1205		azure.WithErrorUnlessStatusCode(http.StatusOK),
1206		autorest.ByUnmarshallingJSON(&result),
1207		autorest.ByClosing())
1208	result.Response = autorest.Response{Response: resp}
1209	return
1210}
1211
1212// CreateDeploymentSlot description for Create a deployment for an app, or a deployment slot.
1213// Parameters:
1214// resourceGroupName - name of the resource group to which the resource belongs.
1215// name - name of the app.
1216// ID - ID of an existing deployment.
1217// slot - name of the deployment slot. If a slot is not specified, the API creates a deployment for the
1218// production slot.
1219// deployment - deployment details.
1220func (client AppsClient) CreateDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string, deployment Deployment) (result Deployment, err error) {
1221	if tracing.IsEnabled() {
1222		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateDeploymentSlot")
1223		defer func() {
1224			sc := -1
1225			if result.Response.Response != nil {
1226				sc = result.Response.Response.StatusCode
1227			}
1228			tracing.EndSpan(ctx, sc, err)
1229		}()
1230	}
1231	if err := validation.Validate([]validation.Validation{
1232		{TargetValue: resourceGroupName,
1233			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1234				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1235				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1236		return result, validation.NewError("web.AppsClient", "CreateDeploymentSlot", err.Error())
1237	}
1238
1239	req, err := client.CreateDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot, deployment)
1240	if err != nil {
1241		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", nil, "Failure preparing request")
1242		return
1243	}
1244
1245	resp, err := client.CreateDeploymentSlotSender(req)
1246	if err != nil {
1247		result.Response = autorest.Response{Response: resp}
1248		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", resp, "Failure sending request")
1249		return
1250	}
1251
1252	result, err = client.CreateDeploymentSlotResponder(resp)
1253	if err != nil {
1254		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateDeploymentSlot", resp, "Failure responding to request")
1255		return
1256	}
1257
1258	return
1259}
1260
1261// CreateDeploymentSlotPreparer prepares the CreateDeploymentSlot request.
1262func (client AppsClient) CreateDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string, deployment Deployment) (*http.Request, error) {
1263	pathParameters := map[string]interface{}{
1264		"id":                autorest.Encode("path", ID),
1265		"name":              autorest.Encode("path", name),
1266		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1267		"slot":              autorest.Encode("path", slot),
1268		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1269	}
1270
1271	const APIVersion = "2020-09-01"
1272	queryParameters := map[string]interface{}{
1273		"api-version": APIVersion,
1274	}
1275
1276	preparer := autorest.CreatePreparer(
1277		autorest.AsContentType("application/json; charset=utf-8"),
1278		autorest.AsPut(),
1279		autorest.WithBaseURL(client.BaseURI),
1280		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
1281		autorest.WithJSON(deployment),
1282		autorest.WithQueryParameters(queryParameters))
1283	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1284}
1285
1286// CreateDeploymentSlotSender sends the CreateDeploymentSlot request. The method will close the
1287// http.Response Body if it receives an error.
1288func (client AppsClient) CreateDeploymentSlotSender(req *http.Request) (*http.Response, error) {
1289	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
1290}
1291
1292// CreateDeploymentSlotResponder handles the response to the CreateDeploymentSlot request. The method always
1293// closes the http.Response Body.
1294func (client AppsClient) CreateDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) {
1295	err = autorest.Respond(
1296		resp,
1297		azure.WithErrorUnlessStatusCode(http.StatusOK),
1298		autorest.ByUnmarshallingJSON(&result),
1299		autorest.ByClosing())
1300	result.Response = autorest.Response{Response: resp}
1301	return
1302}
1303
1304// CreateFunction description for Create function for web site, or a deployment slot.
1305// Parameters:
1306// resourceGroupName - name of the resource group to which the resource belongs.
1307// name - site name.
1308// functionName - function name.
1309// functionEnvelope - function details.
1310func (client AppsClient) CreateFunction(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope) (result AppsCreateFunctionFuture, err error) {
1311	if tracing.IsEnabled() {
1312		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateFunction")
1313		defer func() {
1314			sc := -1
1315			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1316				sc = result.FutureAPI.Response().StatusCode
1317			}
1318			tracing.EndSpan(ctx, sc, err)
1319		}()
1320	}
1321	if err := validation.Validate([]validation.Validation{
1322		{TargetValue: resourceGroupName,
1323			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1324				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1325				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1326		return result, validation.NewError("web.AppsClient", "CreateFunction", err.Error())
1327	}
1328
1329	req, err := client.CreateFunctionPreparer(ctx, resourceGroupName, name, functionName, functionEnvelope)
1330	if err != nil {
1331		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure preparing request")
1332		return
1333	}
1334
1335	result, err = client.CreateFunctionSender(req)
1336	if err != nil {
1337		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure sending request")
1338		return
1339	}
1340
1341	return
1342}
1343
1344// CreateFunctionPreparer prepares the CreateFunction request.
1345func (client AppsClient) CreateFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope) (*http.Request, error) {
1346	pathParameters := map[string]interface{}{
1347		"functionName":      autorest.Encode("path", functionName),
1348		"name":              autorest.Encode("path", name),
1349		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1350		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1351	}
1352
1353	const APIVersion = "2020-09-01"
1354	queryParameters := map[string]interface{}{
1355		"api-version": APIVersion,
1356	}
1357
1358	preparer := autorest.CreatePreparer(
1359		autorest.AsContentType("application/json; charset=utf-8"),
1360		autorest.AsPut(),
1361		autorest.WithBaseURL(client.BaseURI),
1362		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
1363		autorest.WithJSON(functionEnvelope),
1364		autorest.WithQueryParameters(queryParameters))
1365	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1366}
1367
1368// CreateFunctionSender sends the CreateFunction request. The method will close the
1369// http.Response Body if it receives an error.
1370func (client AppsClient) CreateFunctionSender(req *http.Request) (future AppsCreateFunctionFuture, err error) {
1371	var resp *http.Response
1372	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1373	if err != nil {
1374		return
1375	}
1376	var azf azure.Future
1377	azf, err = azure.NewFutureFromResponse(resp)
1378	future.FutureAPI = &azf
1379	future.Result = func(client AppsClient) (fe FunctionEnvelope, err error) {
1380		var done bool
1381		done, err = future.DoneWithContext(context.Background(), client)
1382		if err != nil {
1383			err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", future.Response(), "Polling failure")
1384			return
1385		}
1386		if !done {
1387			err = azure.NewAsyncOpIncompleteError("web.AppsCreateFunctionFuture")
1388			return
1389		}
1390		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1391		fe.Response.Response, err = future.GetResult(sender)
1392		if fe.Response.Response == nil && err == nil {
1393			err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", nil, "received nil response and error")
1394		}
1395		if err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
1396			fe, err = client.CreateFunctionResponder(fe.Response.Response)
1397			if err != nil {
1398				err = autorest.NewErrorWithError(err, "web.AppsCreateFunctionFuture", "Result", fe.Response.Response, "Failure responding to request")
1399			}
1400		}
1401		return
1402	}
1403	return
1404}
1405
1406// CreateFunctionResponder handles the response to the CreateFunction request. The method always
1407// closes the http.Response Body.
1408func (client AppsClient) CreateFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) {
1409	err = autorest.Respond(
1410		resp,
1411		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1412		autorest.ByUnmarshallingJSON(&result),
1413		autorest.ByClosing())
1414	result.Response = autorest.Response{Response: resp}
1415	return
1416}
1417
1418// CreateInstanceFunctionSlot description for Create function for web site, or a deployment slot.
1419// Parameters:
1420// resourceGroupName - name of the resource group to which the resource belongs.
1421// name - site name.
1422// functionName - function name.
1423// slot - name of the deployment slot.
1424// functionEnvelope - function details.
1425func (client AppsClient) CreateInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (result AppsCreateInstanceFunctionSlotFuture, err error) {
1426	if tracing.IsEnabled() {
1427		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceFunctionSlot")
1428		defer func() {
1429			sc := -1
1430			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1431				sc = result.FutureAPI.Response().StatusCode
1432			}
1433			tracing.EndSpan(ctx, sc, err)
1434		}()
1435	}
1436	if err := validation.Validate([]validation.Validation{
1437		{TargetValue: resourceGroupName,
1438			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1439				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1440				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1441		return result, validation.NewError("web.AppsClient", "CreateInstanceFunctionSlot", err.Error())
1442	}
1443
1444	req, err := client.CreateInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot, functionEnvelope)
1445	if err != nil {
1446		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure preparing request")
1447		return
1448	}
1449
1450	result, err = client.CreateInstanceFunctionSlotSender(req)
1451	if err != nil {
1452		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure sending request")
1453		return
1454	}
1455
1456	return
1457}
1458
1459// CreateInstanceFunctionSlotPreparer prepares the CreateInstanceFunctionSlot request.
1460func (client AppsClient) CreateInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope) (*http.Request, error) {
1461	pathParameters := map[string]interface{}{
1462		"functionName":      autorest.Encode("path", functionName),
1463		"name":              autorest.Encode("path", name),
1464		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1465		"slot":              autorest.Encode("path", slot),
1466		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1467	}
1468
1469	const APIVersion = "2020-09-01"
1470	queryParameters := map[string]interface{}{
1471		"api-version": APIVersion,
1472	}
1473
1474	preparer := autorest.CreatePreparer(
1475		autorest.AsContentType("application/json; charset=utf-8"),
1476		autorest.AsPut(),
1477		autorest.WithBaseURL(client.BaseURI),
1478		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
1479		autorest.WithJSON(functionEnvelope),
1480		autorest.WithQueryParameters(queryParameters))
1481	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1482}
1483
1484// CreateInstanceFunctionSlotSender sends the CreateInstanceFunctionSlot request. The method will close the
1485// http.Response Body if it receives an error.
1486func (client AppsClient) CreateInstanceFunctionSlotSender(req *http.Request) (future AppsCreateInstanceFunctionSlotFuture, err error) {
1487	var resp *http.Response
1488	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1489	if err != nil {
1490		return
1491	}
1492	var azf azure.Future
1493	azf, err = azure.NewFutureFromResponse(resp)
1494	future.FutureAPI = &azf
1495	future.Result = func(client AppsClient) (fe FunctionEnvelope, err error) {
1496		var done bool
1497		done, err = future.DoneWithContext(context.Background(), client)
1498		if err != nil {
1499			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", future.Response(), "Polling failure")
1500			return
1501		}
1502		if !done {
1503			err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceFunctionSlotFuture")
1504			return
1505		}
1506		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1507		fe.Response.Response, err = future.GetResult(sender)
1508		if fe.Response.Response == nil && err == nil {
1509			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", nil, "received nil response and error")
1510		}
1511		if err == nil && fe.Response.Response.StatusCode != http.StatusNoContent {
1512			fe, err = client.CreateInstanceFunctionSlotResponder(fe.Response.Response)
1513			if err != nil {
1514				err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceFunctionSlotFuture", "Result", fe.Response.Response, "Failure responding to request")
1515			}
1516		}
1517		return
1518	}
1519	return
1520}
1521
1522// CreateInstanceFunctionSlotResponder handles the response to the CreateInstanceFunctionSlot request. The method always
1523// closes the http.Response Body.
1524func (client AppsClient) CreateInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) {
1525	err = autorest.Respond(
1526		resp,
1527		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
1528		autorest.ByUnmarshallingJSON(&result),
1529		autorest.ByClosing())
1530	result.Response = autorest.Response{Response: resp}
1531	return
1532}
1533
1534// CreateInstanceMSDeployOperation description for Invoke the MSDeploy web app extension.
1535// Parameters:
1536// resourceGroupName - name of the resource group to which the resource belongs.
1537// name - name of web app.
1538// instanceID - ID of web app instance.
1539// mSDeploy - details of MSDeploy operation
1540func (client AppsClient) CreateInstanceMSDeployOperation(ctx context.Context, resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy) (result AppsCreateInstanceMSDeployOperationFuture, err error) {
1541	if tracing.IsEnabled() {
1542		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceMSDeployOperation")
1543		defer func() {
1544			sc := -1
1545			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1546				sc = result.FutureAPI.Response().StatusCode
1547			}
1548			tracing.EndSpan(ctx, sc, err)
1549		}()
1550	}
1551	if err := validation.Validate([]validation.Validation{
1552		{TargetValue: resourceGroupName,
1553			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1554				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1555				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1556		return result, validation.NewError("web.AppsClient", "CreateInstanceMSDeployOperation", err.Error())
1557	}
1558
1559	req, err := client.CreateInstanceMSDeployOperationPreparer(ctx, resourceGroupName, name, instanceID, mSDeploy)
1560	if err != nil {
1561		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure preparing request")
1562		return
1563	}
1564
1565	result, err = client.CreateInstanceMSDeployOperationSender(req)
1566	if err != nil {
1567		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure sending request")
1568		return
1569	}
1570
1571	return
1572}
1573
1574// CreateInstanceMSDeployOperationPreparer prepares the CreateInstanceMSDeployOperation request.
1575func (client AppsClient) CreateInstanceMSDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy) (*http.Request, error) {
1576	pathParameters := map[string]interface{}{
1577		"instanceId":        autorest.Encode("path", instanceID),
1578		"name":              autorest.Encode("path", name),
1579		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1580		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1581	}
1582
1583	const APIVersion = "2020-09-01"
1584	queryParameters := map[string]interface{}{
1585		"api-version": APIVersion,
1586	}
1587
1588	preparer := autorest.CreatePreparer(
1589		autorest.AsContentType("application/json; charset=utf-8"),
1590		autorest.AsPut(),
1591		autorest.WithBaseURL(client.BaseURI),
1592		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
1593		autorest.WithJSON(mSDeploy),
1594		autorest.WithQueryParameters(queryParameters))
1595	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1596}
1597
1598// CreateInstanceMSDeployOperationSender sends the CreateInstanceMSDeployOperation request. The method will close the
1599// http.Response Body if it receives an error.
1600func (client AppsClient) CreateInstanceMSDeployOperationSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationFuture, err error) {
1601	var resp *http.Response
1602	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1603	if err != nil {
1604		return
1605	}
1606	var azf azure.Future
1607	azf, err = azure.NewFutureFromResponse(resp)
1608	future.FutureAPI = &azf
1609	future.Result = func(client AppsClient) (mds MSDeployStatus, err error) {
1610		var done bool
1611		done, err = future.DoneWithContext(context.Background(), client)
1612		if err != nil {
1613			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", future.Response(), "Polling failure")
1614			return
1615		}
1616		if !done {
1617			err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationFuture")
1618			return
1619		}
1620		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1621		mds.Response.Response, err = future.GetResult(sender)
1622		if mds.Response.Response == nil && err == nil {
1623			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", nil, "received nil response and error")
1624		}
1625		if err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
1626			mds, err = client.CreateInstanceMSDeployOperationResponder(mds.Response.Response)
1627			if err != nil {
1628				err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
1629			}
1630		}
1631		return
1632	}
1633	return
1634}
1635
1636// CreateInstanceMSDeployOperationResponder handles the response to the CreateInstanceMSDeployOperation request. The method always
1637// closes the http.Response Body.
1638func (client AppsClient) CreateInstanceMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) {
1639	err = autorest.Respond(
1640		resp,
1641		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1642		autorest.ByUnmarshallingJSON(&result),
1643		autorest.ByClosing())
1644	result.Response = autorest.Response{Response: resp}
1645	return
1646}
1647
1648// CreateInstanceMSDeployOperationSlot description for Invoke the MSDeploy web app extension.
1649// Parameters:
1650// resourceGroupName - name of the resource group to which the resource belongs.
1651// name - name of web app.
1652// slot - name of web app slot. If not specified then will default to production slot.
1653// instanceID - ID of web app instance.
1654// mSDeploy - details of MSDeploy operation
1655func (client AppsClient) CreateInstanceMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy) (result AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
1656	if tracing.IsEnabled() {
1657		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateInstanceMSDeployOperationSlot")
1658		defer func() {
1659			sc := -1
1660			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1661				sc = result.FutureAPI.Response().StatusCode
1662			}
1663			tracing.EndSpan(ctx, sc, err)
1664		}()
1665	}
1666	if err := validation.Validate([]validation.Validation{
1667		{TargetValue: resourceGroupName,
1668			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1669				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1670				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1671		return result, validation.NewError("web.AppsClient", "CreateInstanceMSDeployOperationSlot", err.Error())
1672	}
1673
1674	req, err := client.CreateInstanceMSDeployOperationSlotPreparer(ctx, resourceGroupName, name, slot, instanceID, mSDeploy)
1675	if err != nil {
1676		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure preparing request")
1677		return
1678	}
1679
1680	result, err = client.CreateInstanceMSDeployOperationSlotSender(req)
1681	if err != nil {
1682		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure sending request")
1683		return
1684	}
1685
1686	return
1687}
1688
1689// CreateInstanceMSDeployOperationSlotPreparer prepares the CreateInstanceMSDeployOperationSlot request.
1690func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy) (*http.Request, error) {
1691	pathParameters := map[string]interface{}{
1692		"instanceId":        autorest.Encode("path", instanceID),
1693		"name":              autorest.Encode("path", name),
1694		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1695		"slot":              autorest.Encode("path", slot),
1696		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1697	}
1698
1699	const APIVersion = "2020-09-01"
1700	queryParameters := map[string]interface{}{
1701		"api-version": APIVersion,
1702	}
1703
1704	preparer := autorest.CreatePreparer(
1705		autorest.AsContentType("application/json; charset=utf-8"),
1706		autorest.AsPut(),
1707		autorest.WithBaseURL(client.BaseURI),
1708		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
1709		autorest.WithJSON(mSDeploy),
1710		autorest.WithQueryParameters(queryParameters))
1711	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1712}
1713
1714// CreateInstanceMSDeployOperationSlotSender sends the CreateInstanceMSDeployOperationSlot request. The method will close the
1715// http.Response Body if it receives an error.
1716func (client AppsClient) CreateInstanceMSDeployOperationSlotSender(req *http.Request) (future AppsCreateInstanceMSDeployOperationSlotFuture, err error) {
1717	var resp *http.Response
1718	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1719	if err != nil {
1720		return
1721	}
1722	var azf azure.Future
1723	azf, err = azure.NewFutureFromResponse(resp)
1724	future.FutureAPI = &azf
1725	future.Result = func(client AppsClient) (mds MSDeployStatus, err error) {
1726		var done bool
1727		done, err = future.DoneWithContext(context.Background(), client)
1728		if err != nil {
1729			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure")
1730			return
1731		}
1732		if !done {
1733			err = azure.NewAsyncOpIncompleteError("web.AppsCreateInstanceMSDeployOperationSlotFuture")
1734			return
1735		}
1736		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1737		mds.Response.Response, err = future.GetResult(sender)
1738		if mds.Response.Response == nil && err == nil {
1739			err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", nil, "received nil response and error")
1740		}
1741		if err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
1742			mds, err = client.CreateInstanceMSDeployOperationSlotResponder(mds.Response.Response)
1743			if err != nil {
1744				err = autorest.NewErrorWithError(err, "web.AppsCreateInstanceMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
1745			}
1746		}
1747		return
1748	}
1749	return
1750}
1751
1752// CreateInstanceMSDeployOperationSlotResponder handles the response to the CreateInstanceMSDeployOperationSlot request. The method always
1753// closes the http.Response Body.
1754func (client AppsClient) CreateInstanceMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
1755	err = autorest.Respond(
1756		resp,
1757		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1758		autorest.ByUnmarshallingJSON(&result),
1759		autorest.ByClosing())
1760	result.Response = autorest.Response{Response: resp}
1761	return
1762}
1763
1764// CreateMSDeployOperation description for Invoke the MSDeploy web app extension.
1765// Parameters:
1766// resourceGroupName - name of the resource group to which the resource belongs.
1767// name - name of web app.
1768// mSDeploy - details of MSDeploy operation
1769func (client AppsClient) CreateMSDeployOperation(ctx context.Context, resourceGroupName string, name string, mSDeploy MSDeploy) (result AppsCreateMSDeployOperationFuture, err error) {
1770	if tracing.IsEnabled() {
1771		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateMSDeployOperation")
1772		defer func() {
1773			sc := -1
1774			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1775				sc = result.FutureAPI.Response().StatusCode
1776			}
1777			tracing.EndSpan(ctx, sc, err)
1778		}()
1779	}
1780	if err := validation.Validate([]validation.Validation{
1781		{TargetValue: resourceGroupName,
1782			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1783				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1784				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1785		return result, validation.NewError("web.AppsClient", "CreateMSDeployOperation", err.Error())
1786	}
1787
1788	req, err := client.CreateMSDeployOperationPreparer(ctx, resourceGroupName, name, mSDeploy)
1789	if err != nil {
1790		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure preparing request")
1791		return
1792	}
1793
1794	result, err = client.CreateMSDeployOperationSender(req)
1795	if err != nil {
1796		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure sending request")
1797		return
1798	}
1799
1800	return
1801}
1802
1803// CreateMSDeployOperationPreparer prepares the CreateMSDeployOperation request.
1804func (client AppsClient) CreateMSDeployOperationPreparer(ctx context.Context, resourceGroupName string, name string, mSDeploy MSDeploy) (*http.Request, error) {
1805	pathParameters := map[string]interface{}{
1806		"name":              autorest.Encode("path", name),
1807		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1808		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1809	}
1810
1811	const APIVersion = "2020-09-01"
1812	queryParameters := map[string]interface{}{
1813		"api-version": APIVersion,
1814	}
1815
1816	preparer := autorest.CreatePreparer(
1817		autorest.AsContentType("application/json; charset=utf-8"),
1818		autorest.AsPut(),
1819		autorest.WithBaseURL(client.BaseURI),
1820		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters),
1821		autorest.WithJSON(mSDeploy),
1822		autorest.WithQueryParameters(queryParameters))
1823	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1824}
1825
1826// CreateMSDeployOperationSender sends the CreateMSDeployOperation request. The method will close the
1827// http.Response Body if it receives an error.
1828func (client AppsClient) CreateMSDeployOperationSender(req *http.Request) (future AppsCreateMSDeployOperationFuture, err error) {
1829	var resp *http.Response
1830	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1831	if err != nil {
1832		return
1833	}
1834	var azf azure.Future
1835	azf, err = azure.NewFutureFromResponse(resp)
1836	future.FutureAPI = &azf
1837	future.Result = func(client AppsClient) (mds MSDeployStatus, err error) {
1838		var done bool
1839		done, err = future.DoneWithContext(context.Background(), client)
1840		if err != nil {
1841			err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", future.Response(), "Polling failure")
1842			return
1843		}
1844		if !done {
1845			err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationFuture")
1846			return
1847		}
1848		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1849		mds.Response.Response, err = future.GetResult(sender)
1850		if mds.Response.Response == nil && err == nil {
1851			err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", nil, "received nil response and error")
1852		}
1853		if err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
1854			mds, err = client.CreateMSDeployOperationResponder(mds.Response.Response)
1855			if err != nil {
1856				err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationFuture", "Result", mds.Response.Response, "Failure responding to request")
1857			}
1858		}
1859		return
1860	}
1861	return
1862}
1863
1864// CreateMSDeployOperationResponder handles the response to the CreateMSDeployOperation request. The method always
1865// closes the http.Response Body.
1866func (client AppsClient) CreateMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) {
1867	err = autorest.Respond(
1868		resp,
1869		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1870		autorest.ByUnmarshallingJSON(&result),
1871		autorest.ByClosing())
1872	result.Response = autorest.Response{Response: resp}
1873	return
1874}
1875
1876// CreateMSDeployOperationSlot description for Invoke the MSDeploy web app extension.
1877// Parameters:
1878// resourceGroupName - name of the resource group to which the resource belongs.
1879// name - name of web app.
1880// slot - name of web app slot. If not specified then will default to production slot.
1881// mSDeploy - details of MSDeploy operation
1882func (client AppsClient) CreateMSDeployOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, mSDeploy MSDeploy) (result AppsCreateMSDeployOperationSlotFuture, err error) {
1883	if tracing.IsEnabled() {
1884		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateMSDeployOperationSlot")
1885		defer func() {
1886			sc := -1
1887			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
1888				sc = result.FutureAPI.Response().StatusCode
1889			}
1890			tracing.EndSpan(ctx, sc, err)
1891		}()
1892	}
1893	if err := validation.Validate([]validation.Validation{
1894		{TargetValue: resourceGroupName,
1895			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
1896				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
1897				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
1898		return result, validation.NewError("web.AppsClient", "CreateMSDeployOperationSlot", err.Error())
1899	}
1900
1901	req, err := client.CreateMSDeployOperationSlotPreparer(ctx, resourceGroupName, name, slot, mSDeploy)
1902	if err != nil {
1903		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure preparing request")
1904		return
1905	}
1906
1907	result, err = client.CreateMSDeployOperationSlotSender(req)
1908	if err != nil {
1909		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure sending request")
1910		return
1911	}
1912
1913	return
1914}
1915
1916// CreateMSDeployOperationSlotPreparer prepares the CreateMSDeployOperationSlot request.
1917func (client AppsClient) CreateMSDeployOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, mSDeploy MSDeploy) (*http.Request, error) {
1918	pathParameters := map[string]interface{}{
1919		"name":              autorest.Encode("path", name),
1920		"resourceGroupName": autorest.Encode("path", resourceGroupName),
1921		"slot":              autorest.Encode("path", slot),
1922		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
1923	}
1924
1925	const APIVersion = "2020-09-01"
1926	queryParameters := map[string]interface{}{
1927		"api-version": APIVersion,
1928	}
1929
1930	preparer := autorest.CreatePreparer(
1931		autorest.AsContentType("application/json; charset=utf-8"),
1932		autorest.AsPut(),
1933		autorest.WithBaseURL(client.BaseURI),
1934		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters),
1935		autorest.WithJSON(mSDeploy),
1936		autorest.WithQueryParameters(queryParameters))
1937	return preparer.Prepare((&http.Request{}).WithContext(ctx))
1938}
1939
1940// CreateMSDeployOperationSlotSender sends the CreateMSDeployOperationSlot request. The method will close the
1941// http.Response Body if it receives an error.
1942func (client AppsClient) CreateMSDeployOperationSlotSender(req *http.Request) (future AppsCreateMSDeployOperationSlotFuture, err error) {
1943	var resp *http.Response
1944	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
1945	if err != nil {
1946		return
1947	}
1948	var azf azure.Future
1949	azf, err = azure.NewFutureFromResponse(resp)
1950	future.FutureAPI = &azf
1951	future.Result = func(client AppsClient) (mds MSDeployStatus, err error) {
1952		var done bool
1953		done, err = future.DoneWithContext(context.Background(), client)
1954		if err != nil {
1955			err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", future.Response(), "Polling failure")
1956			return
1957		}
1958		if !done {
1959			err = azure.NewAsyncOpIncompleteError("web.AppsCreateMSDeployOperationSlotFuture")
1960			return
1961		}
1962		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
1963		mds.Response.Response, err = future.GetResult(sender)
1964		if mds.Response.Response == nil && err == nil {
1965			err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", nil, "received nil response and error")
1966		}
1967		if err == nil && mds.Response.Response.StatusCode != http.StatusNoContent {
1968			mds, err = client.CreateMSDeployOperationSlotResponder(mds.Response.Response)
1969			if err != nil {
1970				err = autorest.NewErrorWithError(err, "web.AppsCreateMSDeployOperationSlotFuture", "Result", mds.Response.Response, "Failure responding to request")
1971			}
1972		}
1973		return
1974	}
1975	return
1976}
1977
1978// CreateMSDeployOperationSlotResponder handles the response to the CreateMSDeployOperationSlot request. The method always
1979// closes the http.Response Body.
1980func (client AppsClient) CreateMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
1981	err = autorest.Respond(
1982		resp,
1983		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict),
1984		autorest.ByUnmarshallingJSON(&result),
1985		autorest.ByClosing())
1986	result.Response = autorest.Response{Response: resp}
1987	return
1988}
1989
1990// CreateOrUpdate description for Creates a new web, mobile, or API app in an existing resource group, or updates an
1991// existing app.
1992// Parameters:
1993// resourceGroupName - name of the resource group to which the resource belongs.
1994// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
1995// parameter.
1996// siteEnvelope - a JSON representation of the app properties. See example.
1997func (client AppsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site) (result AppsCreateOrUpdateFuture, err error) {
1998	if tracing.IsEnabled() {
1999		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdate")
2000		defer func() {
2001			sc := -1
2002			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
2003				sc = result.FutureAPI.Response().StatusCode
2004			}
2005			tracing.EndSpan(ctx, sc, err)
2006		}()
2007	}
2008	if err := validation.Validate([]validation.Validation{
2009		{TargetValue: resourceGroupName,
2010			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2011				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2012				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
2013		{TargetValue: siteEnvelope,
2014			Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false,
2015				Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false,
2016					Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false,
2017						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
2018							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
2019						}},
2020						{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
2021							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
2022								{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
2023							}},
2024					}},
2025					{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false,
2026						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}},
2027				}}}}}); err != nil {
2028		return result, validation.NewError("web.AppsClient", "CreateOrUpdate", err.Error())
2029	}
2030
2031	req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, siteEnvelope)
2032	if err != nil {
2033		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdate", nil, "Failure preparing request")
2034		return
2035	}
2036
2037	result, err = client.CreateOrUpdateSender(req)
2038	if err != nil {
2039		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdate", nil, "Failure sending request")
2040		return
2041	}
2042
2043	return
2044}
2045
2046// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
2047func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site) (*http.Request, error) {
2048	pathParameters := map[string]interface{}{
2049		"name":              autorest.Encode("path", name),
2050		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2051		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2052	}
2053
2054	const APIVersion = "2020-09-01"
2055	queryParameters := map[string]interface{}{
2056		"api-version": APIVersion,
2057	}
2058
2059	preparer := autorest.CreatePreparer(
2060		autorest.AsContentType("application/json; charset=utf-8"),
2061		autorest.AsPut(),
2062		autorest.WithBaseURL(client.BaseURI),
2063		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
2064		autorest.WithJSON(siteEnvelope),
2065		autorest.WithQueryParameters(queryParameters))
2066	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2067}
2068
2069// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
2070// http.Response Body if it receives an error.
2071func (client AppsClient) CreateOrUpdateSender(req *http.Request) (future AppsCreateOrUpdateFuture, err error) {
2072	var resp *http.Response
2073	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
2074	if err != nil {
2075		return
2076	}
2077	var azf azure.Future
2078	azf, err = azure.NewFutureFromResponse(resp)
2079	future.FutureAPI = &azf
2080	future.Result = func(client AppsClient) (s Site, err error) {
2081		var done bool
2082		done, err = future.DoneWithContext(context.Background(), client)
2083		if err != nil {
2084			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
2085			return
2086		}
2087		if !done {
2088			err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateFuture")
2089			return
2090		}
2091		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
2092		s.Response.Response, err = future.GetResult(sender)
2093		if s.Response.Response == nil && err == nil {
2094			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", nil, "received nil response and error")
2095		}
2096		if err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
2097			s, err = client.CreateOrUpdateResponder(s.Response.Response)
2098			if err != nil {
2099				err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
2100			}
2101		}
2102		return
2103	}
2104	return
2105}
2106
2107// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
2108// closes the http.Response Body.
2109func (client AppsClient) CreateOrUpdateResponder(resp *http.Response) (result Site, err error) {
2110	err = autorest.Respond(
2111		resp,
2112		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
2113		autorest.ByUnmarshallingJSON(&result),
2114		autorest.ByClosing())
2115	result.Response = autorest.Response{Response: resp}
2116	return
2117}
2118
2119// CreateOrUpdateConfiguration description for Updates the configuration of an app.
2120// Parameters:
2121// resourceGroupName - name of the resource group to which the resource belongs.
2122// name - name of the app.
2123// siteConfig - JSON representation of a SiteConfig object. See example.
2124func (client AppsClient) CreateOrUpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) {
2125	if tracing.IsEnabled() {
2126		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateConfiguration")
2127		defer func() {
2128			sc := -1
2129			if result.Response.Response != nil {
2130				sc = result.Response.Response.StatusCode
2131			}
2132			tracing.EndSpan(ctx, sc, err)
2133		}()
2134	}
2135	if err := validation.Validate([]validation.Validation{
2136		{TargetValue: resourceGroupName,
2137			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2138				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2139				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
2140		{TargetValue: siteConfig,
2141			Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false,
2142				Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false,
2143					Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
2144						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
2145					}},
2146					{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
2147						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
2148							{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
2149						}},
2150				}}}}}); err != nil {
2151		return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfiguration", err.Error())
2152	}
2153
2154	req, err := client.CreateOrUpdateConfigurationPreparer(ctx, resourceGroupName, name, siteConfig)
2155	if err != nil {
2156		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", nil, "Failure preparing request")
2157		return
2158	}
2159
2160	resp, err := client.CreateOrUpdateConfigurationSender(req)
2161	if err != nil {
2162		result.Response = autorest.Response{Response: resp}
2163		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", resp, "Failure sending request")
2164		return
2165	}
2166
2167	result, err = client.CreateOrUpdateConfigurationResponder(resp)
2168	if err != nil {
2169		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfiguration", resp, "Failure responding to request")
2170		return
2171	}
2172
2173	return
2174}
2175
2176// CreateOrUpdateConfigurationPreparer prepares the CreateOrUpdateConfiguration request.
2177func (client AppsClient) CreateOrUpdateConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (*http.Request, error) {
2178	pathParameters := map[string]interface{}{
2179		"name":              autorest.Encode("path", name),
2180		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2181		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2182	}
2183
2184	const APIVersion = "2020-09-01"
2185	queryParameters := map[string]interface{}{
2186		"api-version": APIVersion,
2187	}
2188
2189	preparer := autorest.CreatePreparer(
2190		autorest.AsContentType("application/json; charset=utf-8"),
2191		autorest.AsPut(),
2192		autorest.WithBaseURL(client.BaseURI),
2193		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
2194		autorest.WithJSON(siteConfig),
2195		autorest.WithQueryParameters(queryParameters))
2196	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2197}
2198
2199// CreateOrUpdateConfigurationSender sends the CreateOrUpdateConfiguration request. The method will close the
2200// http.Response Body if it receives an error.
2201func (client AppsClient) CreateOrUpdateConfigurationSender(req *http.Request) (*http.Response, error) {
2202	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2203}
2204
2205// CreateOrUpdateConfigurationResponder handles the response to the CreateOrUpdateConfiguration request. The method always
2206// closes the http.Response Body.
2207func (client AppsClient) CreateOrUpdateConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
2208	err = autorest.Respond(
2209		resp,
2210		azure.WithErrorUnlessStatusCode(http.StatusOK),
2211		autorest.ByUnmarshallingJSON(&result),
2212		autorest.ByClosing())
2213	result.Response = autorest.Response{Response: resp}
2214	return
2215}
2216
2217// CreateOrUpdateConfigurationSlot description for Updates the configuration of an app.
2218// Parameters:
2219// resourceGroupName - name of the resource group to which the resource belongs.
2220// name - name of the app.
2221// siteConfig - JSON representation of a SiteConfig object. See example.
2222// slot - name of the deployment slot. If a slot is not specified, the API will update configuration for the
2223// production slot.
2224func (client AppsClient) CreateOrUpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) {
2225	if tracing.IsEnabled() {
2226		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateConfigurationSlot")
2227		defer func() {
2228			sc := -1
2229			if result.Response.Response != nil {
2230				sc = result.Response.Response.StatusCode
2231			}
2232			tracing.EndSpan(ctx, sc, err)
2233		}()
2234	}
2235	if err := validation.Validate([]validation.Validation{
2236		{TargetValue: resourceGroupName,
2237			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2238				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2239				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
2240		{TargetValue: siteConfig,
2241			Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false,
2242				Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false,
2243					Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
2244						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
2245					}},
2246					{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
2247						Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
2248							{Target: "siteConfig.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
2249						}},
2250				}}}}}); err != nil {
2251		return result, validation.NewError("web.AppsClient", "CreateOrUpdateConfigurationSlot", err.Error())
2252	}
2253
2254	req, err := client.CreateOrUpdateConfigurationSlotPreparer(ctx, resourceGroupName, name, siteConfig, slot)
2255	if err != nil {
2256		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", nil, "Failure preparing request")
2257		return
2258	}
2259
2260	resp, err := client.CreateOrUpdateConfigurationSlotSender(req)
2261	if err != nil {
2262		result.Response = autorest.Response{Response: resp}
2263		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", resp, "Failure sending request")
2264		return
2265	}
2266
2267	result, err = client.CreateOrUpdateConfigurationSlotResponder(resp)
2268	if err != nil {
2269		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot", resp, "Failure responding to request")
2270		return
2271	}
2272
2273	return
2274}
2275
2276// CreateOrUpdateConfigurationSlotPreparer prepares the CreateOrUpdateConfigurationSlot request.
2277func (client AppsClient) CreateOrUpdateConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (*http.Request, error) {
2278	pathParameters := map[string]interface{}{
2279		"name":              autorest.Encode("path", name),
2280		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2281		"slot":              autorest.Encode("path", slot),
2282		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2283	}
2284
2285	const APIVersion = "2020-09-01"
2286	queryParameters := map[string]interface{}{
2287		"api-version": APIVersion,
2288	}
2289
2290	preparer := autorest.CreatePreparer(
2291		autorest.AsContentType("application/json; charset=utf-8"),
2292		autorest.AsPut(),
2293		autorest.WithBaseURL(client.BaseURI),
2294		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
2295		autorest.WithJSON(siteConfig),
2296		autorest.WithQueryParameters(queryParameters))
2297	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2298}
2299
2300// CreateOrUpdateConfigurationSlotSender sends the CreateOrUpdateConfigurationSlot request. The method will close the
2301// http.Response Body if it receives an error.
2302func (client AppsClient) CreateOrUpdateConfigurationSlotSender(req *http.Request) (*http.Response, error) {
2303	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2304}
2305
2306// CreateOrUpdateConfigurationSlotResponder handles the response to the CreateOrUpdateConfigurationSlot request. The method always
2307// closes the http.Response Body.
2308func (client AppsClient) CreateOrUpdateConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
2309	err = autorest.Respond(
2310		resp,
2311		azure.WithErrorUnlessStatusCode(http.StatusOK),
2312		autorest.ByUnmarshallingJSON(&result),
2313		autorest.ByClosing())
2314	result.Response = autorest.Response{Response: resp}
2315	return
2316}
2317
2318// CreateOrUpdateDomainOwnershipIdentifier description for Creates a domain ownership identifier for web app, or
2319// updates an existing ownership identifier.
2320// Parameters:
2321// resourceGroupName - name of the resource group to which the resource belongs.
2322// name - name of the app.
2323// domainOwnershipIdentifierName - name of domain ownership identifier.
2324// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
2325func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) {
2326	if tracing.IsEnabled() {
2327		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateDomainOwnershipIdentifier")
2328		defer func() {
2329			sc := -1
2330			if result.Response.Response != nil {
2331				sc = result.Response.Response.StatusCode
2332			}
2333			tracing.EndSpan(ctx, sc, err)
2334		}()
2335	}
2336	if err := validation.Validate([]validation.Validation{
2337		{TargetValue: resourceGroupName,
2338			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2339				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2340				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2341		return result, validation.NewError("web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", err.Error())
2342	}
2343
2344	req, err := client.CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier)
2345	if err != nil {
2346		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", nil, "Failure preparing request")
2347		return
2348	}
2349
2350	resp, err := client.CreateOrUpdateDomainOwnershipIdentifierSender(req)
2351	if err != nil {
2352		result.Response = autorest.Response{Response: resp}
2353		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", resp, "Failure sending request")
2354		return
2355	}
2356
2357	result, err = client.CreateOrUpdateDomainOwnershipIdentifierResponder(resp)
2358	if err != nil {
2359		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifier", resp, "Failure responding to request")
2360		return
2361	}
2362
2363	return
2364}
2365
2366// CreateOrUpdateDomainOwnershipIdentifierPreparer prepares the CreateOrUpdateDomainOwnershipIdentifier request.
2367func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (*http.Request, error) {
2368	pathParameters := map[string]interface{}{
2369		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
2370		"name":                          autorest.Encode("path", name),
2371		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
2372		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
2373	}
2374
2375	const APIVersion = "2020-09-01"
2376	queryParameters := map[string]interface{}{
2377		"api-version": APIVersion,
2378	}
2379
2380	preparer := autorest.CreatePreparer(
2381		autorest.AsContentType("application/json; charset=utf-8"),
2382		autorest.AsPut(),
2383		autorest.WithBaseURL(client.BaseURI),
2384		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
2385		autorest.WithJSON(domainOwnershipIdentifier),
2386		autorest.WithQueryParameters(queryParameters))
2387	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2388}
2389
2390// CreateOrUpdateDomainOwnershipIdentifierSender sends the CreateOrUpdateDomainOwnershipIdentifier request. The method will close the
2391// http.Response Body if it receives an error.
2392func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
2393	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2394}
2395
2396// CreateOrUpdateDomainOwnershipIdentifierResponder handles the response to the CreateOrUpdateDomainOwnershipIdentifier request. The method always
2397// closes the http.Response Body.
2398func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
2399	err = autorest.Respond(
2400		resp,
2401		azure.WithErrorUnlessStatusCode(http.StatusOK),
2402		autorest.ByUnmarshallingJSON(&result),
2403		autorest.ByClosing())
2404	result.Response = autorest.Response{Response: resp}
2405	return
2406}
2407
2408// CreateOrUpdateDomainOwnershipIdentifierSlot description for Creates a domain ownership identifier for web app, or
2409// updates an existing ownership identifier.
2410// Parameters:
2411// resourceGroupName - name of the resource group to which the resource belongs.
2412// name - name of the app.
2413// domainOwnershipIdentifierName - name of domain ownership identifier.
2414// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
2415// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
2416// production slot.
2417func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) {
2418	if tracing.IsEnabled() {
2419		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateDomainOwnershipIdentifierSlot")
2420		defer func() {
2421			sc := -1
2422			if result.Response.Response != nil {
2423				sc = result.Response.Response.StatusCode
2424			}
2425			tracing.EndSpan(ctx, sc, err)
2426		}()
2427	}
2428	if err := validation.Validate([]validation.Validation{
2429		{TargetValue: resourceGroupName,
2430			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2431				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2432				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2433		return result, validation.NewError("web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", err.Error())
2434	}
2435
2436	req, err := client.CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot)
2437	if err != nil {
2438		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
2439		return
2440	}
2441
2442	resp, err := client.CreateOrUpdateDomainOwnershipIdentifierSlotSender(req)
2443	if err != nil {
2444		result.Response = autorest.Response{Response: resp}
2445		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", resp, "Failure sending request")
2446		return
2447	}
2448
2449	result, err = client.CreateOrUpdateDomainOwnershipIdentifierSlotResponder(resp)
2450	if err != nil {
2451		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
2452		return
2453	}
2454
2455	return
2456}
2457
2458// CreateOrUpdateDomainOwnershipIdentifierSlotPreparer prepares the CreateOrUpdateDomainOwnershipIdentifierSlot request.
2459func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (*http.Request, error) {
2460	pathParameters := map[string]interface{}{
2461		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
2462		"name":                          autorest.Encode("path", name),
2463		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
2464		"slot":                          autorest.Encode("path", slot),
2465		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
2466	}
2467
2468	const APIVersion = "2020-09-01"
2469	queryParameters := map[string]interface{}{
2470		"api-version": APIVersion,
2471	}
2472
2473	preparer := autorest.CreatePreparer(
2474		autorest.AsContentType("application/json; charset=utf-8"),
2475		autorest.AsPut(),
2476		autorest.WithBaseURL(client.BaseURI),
2477		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
2478		autorest.WithJSON(domainOwnershipIdentifier),
2479		autorest.WithQueryParameters(queryParameters))
2480	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2481}
2482
2483// CreateOrUpdateDomainOwnershipIdentifierSlotSender sends the CreateOrUpdateDomainOwnershipIdentifierSlot request. The method will close the
2484// http.Response Body if it receives an error.
2485func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
2486	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2487}
2488
2489// CreateOrUpdateDomainOwnershipIdentifierSlotResponder handles the response to the CreateOrUpdateDomainOwnershipIdentifierSlot request. The method always
2490// closes the http.Response Body.
2491func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
2492	err = autorest.Respond(
2493		resp,
2494		azure.WithErrorUnlessStatusCode(http.StatusOK),
2495		autorest.ByUnmarshallingJSON(&result),
2496		autorest.ByClosing())
2497	result.Response = autorest.Response{Response: resp}
2498	return
2499}
2500
2501// CreateOrUpdateFunctionSecret description for Add or update a function secret.
2502// Parameters:
2503// resourceGroupName - name of the resource group to which the resource belongs.
2504// name - site name.
2505// functionName - the name of the function.
2506// keyName - the name of the key.
2507// key - the key to create or update
2508func (client AppsClient) CreateOrUpdateFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (result KeyInfo, err error) {
2509	if tracing.IsEnabled() {
2510		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecret")
2511		defer func() {
2512			sc := -1
2513			if result.Response.Response != nil {
2514				sc = result.Response.Response.StatusCode
2515			}
2516			tracing.EndSpan(ctx, sc, err)
2517		}()
2518	}
2519	if err := validation.Validate([]validation.Validation{
2520		{TargetValue: resourceGroupName,
2521			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2522				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2523				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2524		return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecret", err.Error())
2525	}
2526
2527	req, err := client.CreateOrUpdateFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName, key)
2528	if err != nil {
2529		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", nil, "Failure preparing request")
2530		return
2531	}
2532
2533	resp, err := client.CreateOrUpdateFunctionSecretSender(req)
2534	if err != nil {
2535		result.Response = autorest.Response{Response: resp}
2536		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure sending request")
2537		return
2538	}
2539
2540	result, err = client.CreateOrUpdateFunctionSecretResponder(resp)
2541	if err != nil {
2542		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecret", resp, "Failure responding to request")
2543		return
2544	}
2545
2546	return
2547}
2548
2549// CreateOrUpdateFunctionSecretPreparer prepares the CreateOrUpdateFunctionSecret request.
2550func (client AppsClient) CreateOrUpdateFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, key KeyInfo) (*http.Request, error) {
2551	pathParameters := map[string]interface{}{
2552		"functionName":      autorest.Encode("path", functionName),
2553		"keyName":           autorest.Encode("path", keyName),
2554		"name":              autorest.Encode("path", name),
2555		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2556		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2557	}
2558
2559	const APIVersion = "2020-09-01"
2560	queryParameters := map[string]interface{}{
2561		"api-version": APIVersion,
2562	}
2563
2564	preparer := autorest.CreatePreparer(
2565		autorest.AsContentType("application/json; charset=utf-8"),
2566		autorest.AsPut(),
2567		autorest.WithBaseURL(client.BaseURI),
2568		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters),
2569		autorest.WithJSON(key),
2570		autorest.WithQueryParameters(queryParameters))
2571	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2572}
2573
2574// CreateOrUpdateFunctionSecretSender sends the CreateOrUpdateFunctionSecret request. The method will close the
2575// http.Response Body if it receives an error.
2576func (client AppsClient) CreateOrUpdateFunctionSecretSender(req *http.Request) (*http.Response, error) {
2577	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2578}
2579
2580// CreateOrUpdateFunctionSecretResponder handles the response to the CreateOrUpdateFunctionSecret request. The method always
2581// closes the http.Response Body.
2582func (client AppsClient) CreateOrUpdateFunctionSecretResponder(resp *http.Response) (result KeyInfo, err error) {
2583	err = autorest.Respond(
2584		resp,
2585		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2586		autorest.ByUnmarshallingJSON(&result),
2587		autorest.ByClosing())
2588	result.Response = autorest.Response{Response: resp}
2589	return
2590}
2591
2592// CreateOrUpdateFunctionSecretSlot description for Add or update a function secret.
2593// Parameters:
2594// resourceGroupName - name of the resource group to which the resource belongs.
2595// name - site name.
2596// functionName - the name of the function.
2597// keyName - the name of the key.
2598// slot - name of the deployment slot.
2599// key - the key to create or update
2600func (client AppsClient) CreateOrUpdateFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) {
2601	if tracing.IsEnabled() {
2602		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateFunctionSecretSlot")
2603		defer func() {
2604			sc := -1
2605			if result.Response.Response != nil {
2606				sc = result.Response.Response.StatusCode
2607			}
2608			tracing.EndSpan(ctx, sc, err)
2609		}()
2610	}
2611	if err := validation.Validate([]validation.Validation{
2612		{TargetValue: resourceGroupName,
2613			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2614				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2615				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2616		return result, validation.NewError("web.AppsClient", "CreateOrUpdateFunctionSecretSlot", err.Error())
2617	}
2618
2619	req, err := client.CreateOrUpdateFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot, key)
2620	if err != nil {
2621		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", nil, "Failure preparing request")
2622		return
2623	}
2624
2625	resp, err := client.CreateOrUpdateFunctionSecretSlotSender(req)
2626	if err != nil {
2627		result.Response = autorest.Response{Response: resp}
2628		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure sending request")
2629		return
2630	}
2631
2632	result, err = client.CreateOrUpdateFunctionSecretSlotResponder(resp)
2633	if err != nil {
2634		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateFunctionSecretSlot", resp, "Failure responding to request")
2635		return
2636	}
2637
2638	return
2639}
2640
2641// CreateOrUpdateFunctionSecretSlotPreparer prepares the CreateOrUpdateFunctionSecretSlot request.
2642func (client AppsClient) CreateOrUpdateFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string, key KeyInfo) (*http.Request, error) {
2643	pathParameters := map[string]interface{}{
2644		"functionName":      autorest.Encode("path", functionName),
2645		"keyName":           autorest.Encode("path", keyName),
2646		"name":              autorest.Encode("path", name),
2647		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2648		"slot":              autorest.Encode("path", slot),
2649		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2650	}
2651
2652	const APIVersion = "2020-09-01"
2653	queryParameters := map[string]interface{}{
2654		"api-version": APIVersion,
2655	}
2656
2657	preparer := autorest.CreatePreparer(
2658		autorest.AsContentType("application/json; charset=utf-8"),
2659		autorest.AsPut(),
2660		autorest.WithBaseURL(client.BaseURI),
2661		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters),
2662		autorest.WithJSON(key),
2663		autorest.WithQueryParameters(queryParameters))
2664	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2665}
2666
2667// CreateOrUpdateFunctionSecretSlotSender sends the CreateOrUpdateFunctionSecretSlot request. The method will close the
2668// http.Response Body if it receives an error.
2669func (client AppsClient) CreateOrUpdateFunctionSecretSlotSender(req *http.Request) (*http.Response, error) {
2670	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2671}
2672
2673// CreateOrUpdateFunctionSecretSlotResponder handles the response to the CreateOrUpdateFunctionSecretSlot request. The method always
2674// closes the http.Response Body.
2675func (client AppsClient) CreateOrUpdateFunctionSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) {
2676	err = autorest.Respond(
2677		resp,
2678		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2679		autorest.ByUnmarshallingJSON(&result),
2680		autorest.ByClosing())
2681	result.Response = autorest.Response{Response: resp}
2682	return
2683}
2684
2685// CreateOrUpdateHostNameBinding description for Creates a hostname binding for an app.
2686// Parameters:
2687// resourceGroupName - name of the resource group to which the resource belongs.
2688// name - name of the app.
2689// hostName - hostname in the hostname binding.
2690// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object.
2691func (client AppsClient) CreateOrUpdateHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) {
2692	if tracing.IsEnabled() {
2693		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBinding")
2694		defer func() {
2695			sc := -1
2696			if result.Response.Response != nil {
2697				sc = result.Response.Response.StatusCode
2698			}
2699			tracing.EndSpan(ctx, sc, err)
2700		}()
2701	}
2702	if err := validation.Validate([]validation.Validation{
2703		{TargetValue: resourceGroupName,
2704			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2705				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2706				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2707		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBinding", err.Error())
2708	}
2709
2710	req, err := client.CreateOrUpdateHostNameBindingPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding)
2711	if err != nil {
2712		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", nil, "Failure preparing request")
2713		return
2714	}
2715
2716	resp, err := client.CreateOrUpdateHostNameBindingSender(req)
2717	if err != nil {
2718		result.Response = autorest.Response{Response: resp}
2719		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure sending request")
2720		return
2721	}
2722
2723	result, err = client.CreateOrUpdateHostNameBindingResponder(resp)
2724	if err != nil {
2725		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBinding", resp, "Failure responding to request")
2726		return
2727	}
2728
2729	return
2730}
2731
2732// CreateOrUpdateHostNameBindingPreparer prepares the CreateOrUpdateHostNameBinding request.
2733func (client AppsClient) CreateOrUpdateHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (*http.Request, error) {
2734	pathParameters := map[string]interface{}{
2735		"hostName":          autorest.Encode("path", hostName),
2736		"name":              autorest.Encode("path", name),
2737		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2738		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2739	}
2740
2741	const APIVersion = "2020-09-01"
2742	queryParameters := map[string]interface{}{
2743		"api-version": APIVersion,
2744	}
2745
2746	preparer := autorest.CreatePreparer(
2747		autorest.AsContentType("application/json; charset=utf-8"),
2748		autorest.AsPut(),
2749		autorest.WithBaseURL(client.BaseURI),
2750		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
2751		autorest.WithJSON(hostNameBinding),
2752		autorest.WithQueryParameters(queryParameters))
2753	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2754}
2755
2756// CreateOrUpdateHostNameBindingSender sends the CreateOrUpdateHostNameBinding request. The method will close the
2757// http.Response Body if it receives an error.
2758func (client AppsClient) CreateOrUpdateHostNameBindingSender(req *http.Request) (*http.Response, error) {
2759	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2760}
2761
2762// CreateOrUpdateHostNameBindingResponder handles the response to the CreateOrUpdateHostNameBinding request. The method always
2763// closes the http.Response Body.
2764func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) {
2765	err = autorest.Respond(
2766		resp,
2767		azure.WithErrorUnlessStatusCode(http.StatusOK),
2768		autorest.ByUnmarshallingJSON(&result),
2769		autorest.ByClosing())
2770	result.Response = autorest.Response{Response: resp}
2771	return
2772}
2773
2774// CreateOrUpdateHostNameBindingSlot description for Creates a hostname binding for an app.
2775// Parameters:
2776// resourceGroupName - name of the resource group to which the resource belongs.
2777// name - name of the app.
2778// hostName - hostname in the hostname binding.
2779// hostNameBinding - binding details. This is the JSON representation of a HostNameBinding object.
2780// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the
2781// production slot.
2782func (client AppsClient) CreateOrUpdateHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) {
2783	if tracing.IsEnabled() {
2784		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostNameBindingSlot")
2785		defer func() {
2786			sc := -1
2787			if result.Response.Response != nil {
2788				sc = result.Response.Response.StatusCode
2789			}
2790			tracing.EndSpan(ctx, sc, err)
2791		}()
2792	}
2793	if err := validation.Validate([]validation.Validation{
2794		{TargetValue: resourceGroupName,
2795			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2796				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2797				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2798		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostNameBindingSlot", err.Error())
2799	}
2800
2801	req, err := client.CreateOrUpdateHostNameBindingSlotPreparer(ctx, resourceGroupName, name, hostName, hostNameBinding, slot)
2802	if err != nil {
2803		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", nil, "Failure preparing request")
2804		return
2805	}
2806
2807	resp, err := client.CreateOrUpdateHostNameBindingSlotSender(req)
2808	if err != nil {
2809		result.Response = autorest.Response{Response: resp}
2810		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure sending request")
2811		return
2812	}
2813
2814	result, err = client.CreateOrUpdateHostNameBindingSlotResponder(resp)
2815	if err != nil {
2816		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostNameBindingSlot", resp, "Failure responding to request")
2817		return
2818	}
2819
2820	return
2821}
2822
2823// CreateOrUpdateHostNameBindingSlotPreparer prepares the CreateOrUpdateHostNameBindingSlot request.
2824func (client AppsClient) CreateOrUpdateHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (*http.Request, error) {
2825	pathParameters := map[string]interface{}{
2826		"hostName":          autorest.Encode("path", hostName),
2827		"name":              autorest.Encode("path", name),
2828		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2829		"slot":              autorest.Encode("path", slot),
2830		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2831	}
2832
2833	const APIVersion = "2020-09-01"
2834	queryParameters := map[string]interface{}{
2835		"api-version": APIVersion,
2836	}
2837
2838	preparer := autorest.CreatePreparer(
2839		autorest.AsContentType("application/json; charset=utf-8"),
2840		autorest.AsPut(),
2841		autorest.WithBaseURL(client.BaseURI),
2842		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
2843		autorest.WithJSON(hostNameBinding),
2844		autorest.WithQueryParameters(queryParameters))
2845	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2846}
2847
2848// CreateOrUpdateHostNameBindingSlotSender sends the CreateOrUpdateHostNameBindingSlot request. The method will close the
2849// http.Response Body if it receives an error.
2850func (client AppsClient) CreateOrUpdateHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
2851	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2852}
2853
2854// CreateOrUpdateHostNameBindingSlotResponder handles the response to the CreateOrUpdateHostNameBindingSlot request. The method always
2855// closes the http.Response Body.
2856func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) {
2857	err = autorest.Respond(
2858		resp,
2859		azure.WithErrorUnlessStatusCode(http.StatusOK),
2860		autorest.ByUnmarshallingJSON(&result),
2861		autorest.ByClosing())
2862	result.Response = autorest.Response{Response: resp}
2863	return
2864}
2865
2866// CreateOrUpdateHostSecret description for Add or update a host level secret.
2867// Parameters:
2868// resourceGroupName - name of the resource group to which the resource belongs.
2869// name - site name.
2870// keyType - the type of host key.
2871// keyName - the name of the key.
2872// key - the key to create or update
2873func (client AppsClient) CreateOrUpdateHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (result KeyInfo, err error) {
2874	if tracing.IsEnabled() {
2875		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecret")
2876		defer func() {
2877			sc := -1
2878			if result.Response.Response != nil {
2879				sc = result.Response.Response.StatusCode
2880			}
2881			tracing.EndSpan(ctx, sc, err)
2882		}()
2883	}
2884	if err := validation.Validate([]validation.Validation{
2885		{TargetValue: resourceGroupName,
2886			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2887				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2888				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2889		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecret", err.Error())
2890	}
2891
2892	req, err := client.CreateOrUpdateHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName, key)
2893	if err != nil {
2894		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", nil, "Failure preparing request")
2895		return
2896	}
2897
2898	resp, err := client.CreateOrUpdateHostSecretSender(req)
2899	if err != nil {
2900		result.Response = autorest.Response{Response: resp}
2901		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure sending request")
2902		return
2903	}
2904
2905	result, err = client.CreateOrUpdateHostSecretResponder(resp)
2906	if err != nil {
2907		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecret", resp, "Failure responding to request")
2908		return
2909	}
2910
2911	return
2912}
2913
2914// CreateOrUpdateHostSecretPreparer prepares the CreateOrUpdateHostSecret request.
2915func (client AppsClient) CreateOrUpdateHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, key KeyInfo) (*http.Request, error) {
2916	pathParameters := map[string]interface{}{
2917		"keyName":           autorest.Encode("path", keyName),
2918		"keyType":           autorest.Encode("path", keyType),
2919		"name":              autorest.Encode("path", name),
2920		"resourceGroupName": autorest.Encode("path", resourceGroupName),
2921		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
2922	}
2923
2924	const APIVersion = "2020-09-01"
2925	queryParameters := map[string]interface{}{
2926		"api-version": APIVersion,
2927	}
2928
2929	preparer := autorest.CreatePreparer(
2930		autorest.AsContentType("application/json; charset=utf-8"),
2931		autorest.AsPut(),
2932		autorest.WithBaseURL(client.BaseURI),
2933		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters),
2934		autorest.WithJSON(key),
2935		autorest.WithQueryParameters(queryParameters))
2936	return preparer.Prepare((&http.Request{}).WithContext(ctx))
2937}
2938
2939// CreateOrUpdateHostSecretSender sends the CreateOrUpdateHostSecret request. The method will close the
2940// http.Response Body if it receives an error.
2941func (client AppsClient) CreateOrUpdateHostSecretSender(req *http.Request) (*http.Response, error) {
2942	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
2943}
2944
2945// CreateOrUpdateHostSecretResponder handles the response to the CreateOrUpdateHostSecret request. The method always
2946// closes the http.Response Body.
2947func (client AppsClient) CreateOrUpdateHostSecretResponder(resp *http.Response) (result KeyInfo, err error) {
2948	err = autorest.Respond(
2949		resp,
2950		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
2951		autorest.ByUnmarshallingJSON(&result),
2952		autorest.ByClosing())
2953	result.Response = autorest.Response{Response: resp}
2954	return
2955}
2956
2957// CreateOrUpdateHostSecretSlot description for Add or update a host level secret.
2958// Parameters:
2959// resourceGroupName - name of the resource group to which the resource belongs.
2960// name - site name.
2961// keyType - the type of host key.
2962// keyName - the name of the key.
2963// slot - name of the deployment slot.
2964// key - the key to create or update
2965func (client AppsClient) CreateOrUpdateHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (result KeyInfo, err error) {
2966	if tracing.IsEnabled() {
2967		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHostSecretSlot")
2968		defer func() {
2969			sc := -1
2970			if result.Response.Response != nil {
2971				sc = result.Response.Response.StatusCode
2972			}
2973			tracing.EndSpan(ctx, sc, err)
2974		}()
2975	}
2976	if err := validation.Validate([]validation.Validation{
2977		{TargetValue: resourceGroupName,
2978			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
2979				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
2980				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
2981		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHostSecretSlot", err.Error())
2982	}
2983
2984	req, err := client.CreateOrUpdateHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot, key)
2985	if err != nil {
2986		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", nil, "Failure preparing request")
2987		return
2988	}
2989
2990	resp, err := client.CreateOrUpdateHostSecretSlotSender(req)
2991	if err != nil {
2992		result.Response = autorest.Response{Response: resp}
2993		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure sending request")
2994		return
2995	}
2996
2997	result, err = client.CreateOrUpdateHostSecretSlotResponder(resp)
2998	if err != nil {
2999		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHostSecretSlot", resp, "Failure responding to request")
3000		return
3001	}
3002
3003	return
3004}
3005
3006// CreateOrUpdateHostSecretSlotPreparer prepares the CreateOrUpdateHostSecretSlot request.
3007func (client AppsClient) CreateOrUpdateHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string, key KeyInfo) (*http.Request, error) {
3008	pathParameters := map[string]interface{}{
3009		"keyName":           autorest.Encode("path", keyName),
3010		"keyType":           autorest.Encode("path", keyType),
3011		"name":              autorest.Encode("path", name),
3012		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3013		"slot":              autorest.Encode("path", slot),
3014		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3015	}
3016
3017	const APIVersion = "2020-09-01"
3018	queryParameters := map[string]interface{}{
3019		"api-version": APIVersion,
3020	}
3021
3022	preparer := autorest.CreatePreparer(
3023		autorest.AsContentType("application/json; charset=utf-8"),
3024		autorest.AsPut(),
3025		autorest.WithBaseURL(client.BaseURI),
3026		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters),
3027		autorest.WithJSON(key),
3028		autorest.WithQueryParameters(queryParameters))
3029	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3030}
3031
3032// CreateOrUpdateHostSecretSlotSender sends the CreateOrUpdateHostSecretSlot request. The method will close the
3033// http.Response Body if it receives an error.
3034func (client AppsClient) CreateOrUpdateHostSecretSlotSender(req *http.Request) (*http.Response, error) {
3035	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3036}
3037
3038// CreateOrUpdateHostSecretSlotResponder handles the response to the CreateOrUpdateHostSecretSlot request. The method always
3039// closes the http.Response Body.
3040func (client AppsClient) CreateOrUpdateHostSecretSlotResponder(resp *http.Response) (result KeyInfo, err error) {
3041	err = autorest.Respond(
3042		resp,
3043		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
3044		autorest.ByUnmarshallingJSON(&result),
3045		autorest.ByClosing())
3046	result.Response = autorest.Response{Response: resp}
3047	return
3048}
3049
3050// CreateOrUpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay.
3051// Parameters:
3052// resourceGroupName - name of the resource group to which the resource belongs.
3053// name - the name of the web app.
3054// namespaceName - the namespace for this hybrid connection.
3055// relayName - the relay name for this hybrid connection.
3056// connectionEnvelope - the details of the hybrid connection.
3057func (client AppsClient) CreateOrUpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) {
3058	if tracing.IsEnabled() {
3059		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnection")
3060		defer func() {
3061			sc := -1
3062			if result.Response.Response != nil {
3063				sc = result.Response.Response.StatusCode
3064			}
3065			tracing.EndSpan(ctx, sc, err)
3066		}()
3067	}
3068	if err := validation.Validate([]validation.Validation{
3069		{TargetValue: resourceGroupName,
3070			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3071				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3072				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3073		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnection", err.Error())
3074	}
3075
3076	req, err := client.CreateOrUpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope)
3077	if err != nil {
3078		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", nil, "Failure preparing request")
3079		return
3080	}
3081
3082	resp, err := client.CreateOrUpdateHybridConnectionSender(req)
3083	if err != nil {
3084		result.Response = autorest.Response{Response: resp}
3085		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure sending request")
3086		return
3087	}
3088
3089	result, err = client.CreateOrUpdateHybridConnectionResponder(resp)
3090	if err != nil {
3091		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnection", resp, "Failure responding to request")
3092		return
3093	}
3094
3095	return
3096}
3097
3098// CreateOrUpdateHybridConnectionPreparer prepares the CreateOrUpdateHybridConnection request.
3099func (client AppsClient) CreateOrUpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) {
3100	pathParameters := map[string]interface{}{
3101		"name":              autorest.Encode("path", name),
3102		"namespaceName":     autorest.Encode("path", namespaceName),
3103		"relayName":         autorest.Encode("path", relayName),
3104		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3105		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3106	}
3107
3108	const APIVersion = "2020-09-01"
3109	queryParameters := map[string]interface{}{
3110		"api-version": APIVersion,
3111	}
3112
3113	preparer := autorest.CreatePreparer(
3114		autorest.AsContentType("application/json; charset=utf-8"),
3115		autorest.AsPut(),
3116		autorest.WithBaseURL(client.BaseURI),
3117		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
3118		autorest.WithJSON(connectionEnvelope),
3119		autorest.WithQueryParameters(queryParameters))
3120	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3121}
3122
3123// CreateOrUpdateHybridConnectionSender sends the CreateOrUpdateHybridConnection request. The method will close the
3124// http.Response Body if it receives an error.
3125func (client AppsClient) CreateOrUpdateHybridConnectionSender(req *http.Request) (*http.Response, error) {
3126	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3127}
3128
3129// CreateOrUpdateHybridConnectionResponder handles the response to the CreateOrUpdateHybridConnection request. The method always
3130// closes the http.Response Body.
3131func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
3132	err = autorest.Respond(
3133		resp,
3134		azure.WithErrorUnlessStatusCode(http.StatusOK),
3135		autorest.ByUnmarshallingJSON(&result),
3136		autorest.ByClosing())
3137	result.Response = autorest.Response{Response: resp}
3138	return
3139}
3140
3141// CreateOrUpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay.
3142// Parameters:
3143// resourceGroupName - name of the resource group to which the resource belongs.
3144// name - the name of the web app.
3145// namespaceName - the namespace for this hybrid connection.
3146// relayName - the relay name for this hybrid connection.
3147// connectionEnvelope - the details of the hybrid connection.
3148// slot - the name of the slot for the web app.
3149func (client AppsClient) CreateOrUpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) {
3150	if tracing.IsEnabled() {
3151		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateHybridConnectionSlot")
3152		defer func() {
3153			sc := -1
3154			if result.Response.Response != nil {
3155				sc = result.Response.Response.StatusCode
3156			}
3157			tracing.EndSpan(ctx, sc, err)
3158		}()
3159	}
3160	if err := validation.Validate([]validation.Validation{
3161		{TargetValue: resourceGroupName,
3162			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3163				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3164				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3165		return result, validation.NewError("web.AppsClient", "CreateOrUpdateHybridConnectionSlot", err.Error())
3166	}
3167
3168	req, err := client.CreateOrUpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot)
3169	if err != nil {
3170		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", nil, "Failure preparing request")
3171		return
3172	}
3173
3174	resp, err := client.CreateOrUpdateHybridConnectionSlotSender(req)
3175	if err != nil {
3176		result.Response = autorest.Response{Response: resp}
3177		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure sending request")
3178		return
3179	}
3180
3181	result, err = client.CreateOrUpdateHybridConnectionSlotResponder(resp)
3182	if err != nil {
3183		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateHybridConnectionSlot", resp, "Failure responding to request")
3184		return
3185	}
3186
3187	return
3188}
3189
3190// CreateOrUpdateHybridConnectionSlotPreparer prepares the CreateOrUpdateHybridConnectionSlot request.
3191func (client AppsClient) CreateOrUpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) {
3192	pathParameters := map[string]interface{}{
3193		"name":              autorest.Encode("path", name),
3194		"namespaceName":     autorest.Encode("path", namespaceName),
3195		"relayName":         autorest.Encode("path", relayName),
3196		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3197		"slot":              autorest.Encode("path", slot),
3198		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3199	}
3200
3201	const APIVersion = "2020-09-01"
3202	queryParameters := map[string]interface{}{
3203		"api-version": APIVersion,
3204	}
3205
3206	preparer := autorest.CreatePreparer(
3207		autorest.AsContentType("application/json; charset=utf-8"),
3208		autorest.AsPut(),
3209		autorest.WithBaseURL(client.BaseURI),
3210		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
3211		autorest.WithJSON(connectionEnvelope),
3212		autorest.WithQueryParameters(queryParameters))
3213	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3214}
3215
3216// CreateOrUpdateHybridConnectionSlotSender sends the CreateOrUpdateHybridConnectionSlot request. The method will close the
3217// http.Response Body if it receives an error.
3218func (client AppsClient) CreateOrUpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
3219	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3220}
3221
3222// CreateOrUpdateHybridConnectionSlotResponder handles the response to the CreateOrUpdateHybridConnectionSlot request. The method always
3223// closes the http.Response Body.
3224func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
3225	err = autorest.Respond(
3226		resp,
3227		azure.WithErrorUnlessStatusCode(http.StatusOK),
3228		autorest.ByUnmarshallingJSON(&result),
3229		autorest.ByClosing())
3230	result.Response = autorest.Response{Response: resp}
3231	return
3232}
3233
3234// CreateOrUpdatePublicCertificate description for Creates a hostname binding for an app.
3235// Parameters:
3236// resourceGroupName - name of the resource group to which the resource belongs.
3237// name - name of the app.
3238// publicCertificateName - public certificate name.
3239// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate
3240// object.
3241func (client AppsClient) CreateOrUpdatePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) {
3242	if tracing.IsEnabled() {
3243		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificate")
3244		defer func() {
3245			sc := -1
3246			if result.Response.Response != nil {
3247				sc = result.Response.Response.StatusCode
3248			}
3249			tracing.EndSpan(ctx, sc, err)
3250		}()
3251	}
3252	if err := validation.Validate([]validation.Validation{
3253		{TargetValue: resourceGroupName,
3254			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3255				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3256				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3257		return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificate", err.Error())
3258	}
3259
3260	req, err := client.CreateOrUpdatePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate)
3261	if err != nil {
3262		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request")
3263		return
3264	}
3265
3266	resp, err := client.CreateOrUpdatePublicCertificateSender(req)
3267	if err != nil {
3268		result.Response = autorest.Response{Response: resp}
3269		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request")
3270		return
3271	}
3272
3273	result, err = client.CreateOrUpdatePublicCertificateResponder(resp)
3274	if err != nil {
3275		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request")
3276		return
3277	}
3278
3279	return
3280}
3281
3282// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request.
3283func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) {
3284	pathParameters := map[string]interface{}{
3285		"name":                  autorest.Encode("path", name),
3286		"publicCertificateName": autorest.Encode("path", publicCertificateName),
3287		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
3288		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
3289	}
3290
3291	const APIVersion = "2020-09-01"
3292	queryParameters := map[string]interface{}{
3293		"api-version": APIVersion,
3294	}
3295
3296	preparer := autorest.CreatePreparer(
3297		autorest.AsContentType("application/json; charset=utf-8"),
3298		autorest.AsPut(),
3299		autorest.WithBaseURL(client.BaseURI),
3300		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
3301		autorest.WithJSON(publicCertificate),
3302		autorest.WithQueryParameters(queryParameters))
3303	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3304}
3305
3306// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the
3307// http.Response Body if it receives an error.
3308func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) {
3309	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3310}
3311
3312// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always
3313// closes the http.Response Body.
3314func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) {
3315	err = autorest.Respond(
3316		resp,
3317		azure.WithErrorUnlessStatusCode(http.StatusOK),
3318		autorest.ByUnmarshallingJSON(&result),
3319		autorest.ByClosing())
3320	result.Response = autorest.Response{Response: resp}
3321	return
3322}
3323
3324// CreateOrUpdatePublicCertificateSlot description for Creates a hostname binding for an app.
3325// Parameters:
3326// resourceGroupName - name of the resource group to which the resource belongs.
3327// name - name of the app.
3328// publicCertificateName - public certificate name.
3329// publicCertificate - public certificate details. This is the JSON representation of a PublicCertificate
3330// object.
3331// slot - name of the deployment slot. If a slot is not specified, the API will create a binding for the
3332// production slot.
3333func (client AppsClient) CreateOrUpdatePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) {
3334	if tracing.IsEnabled() {
3335		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdatePublicCertificateSlot")
3336		defer func() {
3337			sc := -1
3338			if result.Response.Response != nil {
3339				sc = result.Response.Response.StatusCode
3340			}
3341			tracing.EndSpan(ctx, sc, err)
3342		}()
3343	}
3344	if err := validation.Validate([]validation.Validation{
3345		{TargetValue: resourceGroupName,
3346			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3347				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3348				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3349		return result, validation.NewError("web.AppsClient", "CreateOrUpdatePublicCertificateSlot", err.Error())
3350	}
3351
3352	req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(ctx, resourceGroupName, name, publicCertificateName, publicCertificate, slot)
3353	if err != nil {
3354		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request")
3355		return
3356	}
3357
3358	resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req)
3359	if err != nil {
3360		result.Response = autorest.Response{Response: resp}
3361		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request")
3362		return
3363	}
3364
3365	result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp)
3366	if err != nil {
3367		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request")
3368		return
3369	}
3370
3371	return
3372}
3373
3374// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request.
3375func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) {
3376	pathParameters := map[string]interface{}{
3377		"name":                  autorest.Encode("path", name),
3378		"publicCertificateName": autorest.Encode("path", publicCertificateName),
3379		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
3380		"slot":                  autorest.Encode("path", slot),
3381		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
3382	}
3383
3384	const APIVersion = "2020-09-01"
3385	queryParameters := map[string]interface{}{
3386		"api-version": APIVersion,
3387	}
3388
3389	preparer := autorest.CreatePreparer(
3390		autorest.AsContentType("application/json; charset=utf-8"),
3391		autorest.AsPut(),
3392		autorest.WithBaseURL(client.BaseURI),
3393		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
3394		autorest.WithJSON(publicCertificate),
3395		autorest.WithQueryParameters(queryParameters))
3396	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3397}
3398
3399// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the
3400// http.Response Body if it receives an error.
3401func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
3402	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3403}
3404
3405// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always
3406// closes the http.Response Body.
3407func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) {
3408	err = autorest.Respond(
3409		resp,
3410		azure.WithErrorUnlessStatusCode(http.StatusOK),
3411		autorest.ByUnmarshallingJSON(&result),
3412		autorest.ByClosing())
3413	result.Response = autorest.Response{Response: resp}
3414	return
3415}
3416
3417// CreateOrUpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates
3418// an existing one (PATCH).
3419// Parameters:
3420// resourceGroupName - name of the resource group to which the resource belongs.
3421// name - name of the app.
3422// entityName - name of the hybrid connection configuration.
3423// connectionEnvelope - details of the hybrid connection configuration.
3424func (client AppsClient) CreateOrUpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) {
3425	if tracing.IsEnabled() {
3426		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnection")
3427		defer func() {
3428			sc := -1
3429			if result.Response.Response != nil {
3430				sc = result.Response.Response.StatusCode
3431			}
3432			tracing.EndSpan(ctx, sc, err)
3433		}()
3434	}
3435	if err := validation.Validate([]validation.Validation{
3436		{TargetValue: resourceGroupName,
3437			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3438				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3439				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3440		return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnection", err.Error())
3441	}
3442
3443	req, err := client.CreateOrUpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope)
3444	if err != nil {
3445		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", nil, "Failure preparing request")
3446		return
3447	}
3448
3449	resp, err := client.CreateOrUpdateRelayServiceConnectionSender(req)
3450	if err != nil {
3451		result.Response = autorest.Response{Response: resp}
3452		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure sending request")
3453		return
3454	}
3455
3456	result, err = client.CreateOrUpdateRelayServiceConnectionResponder(resp)
3457	if err != nil {
3458		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnection", resp, "Failure responding to request")
3459		return
3460	}
3461
3462	return
3463}
3464
3465// CreateOrUpdateRelayServiceConnectionPreparer prepares the CreateOrUpdateRelayServiceConnection request.
3466func (client AppsClient) CreateOrUpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) {
3467	pathParameters := map[string]interface{}{
3468		"entityName":        autorest.Encode("path", entityName),
3469		"name":              autorest.Encode("path", name),
3470		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3471		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3472	}
3473
3474	const APIVersion = "2020-09-01"
3475	queryParameters := map[string]interface{}{
3476		"api-version": APIVersion,
3477	}
3478
3479	preparer := autorest.CreatePreparer(
3480		autorest.AsContentType("application/json; charset=utf-8"),
3481		autorest.AsPut(),
3482		autorest.WithBaseURL(client.BaseURI),
3483		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
3484		autorest.WithJSON(connectionEnvelope),
3485		autorest.WithQueryParameters(queryParameters))
3486	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3487}
3488
3489// CreateOrUpdateRelayServiceConnectionSender sends the CreateOrUpdateRelayServiceConnection request. The method will close the
3490// http.Response Body if it receives an error.
3491func (client AppsClient) CreateOrUpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
3492	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3493}
3494
3495// CreateOrUpdateRelayServiceConnectionResponder handles the response to the CreateOrUpdateRelayServiceConnection request. The method always
3496// closes the http.Response Body.
3497func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
3498	err = autorest.Respond(
3499		resp,
3500		azure.WithErrorUnlessStatusCode(http.StatusOK),
3501		autorest.ByUnmarshallingJSON(&result),
3502		autorest.ByClosing())
3503	result.Response = autorest.Response{Response: resp}
3504	return
3505}
3506
3507// CreateOrUpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or
3508// updates an existing one (PATCH).
3509// Parameters:
3510// resourceGroupName - name of the resource group to which the resource belongs.
3511// name - name of the app.
3512// entityName - name of the hybrid connection configuration.
3513// connectionEnvelope - details of the hybrid connection configuration.
3514// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid
3515// connection for the production slot.
3516func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) {
3517	if tracing.IsEnabled() {
3518		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateRelayServiceConnectionSlot")
3519		defer func() {
3520			sc := -1
3521			if result.Response.Response != nil {
3522				sc = result.Response.Response.StatusCode
3523			}
3524			tracing.EndSpan(ctx, sc, err)
3525		}()
3526	}
3527	if err := validation.Validate([]validation.Validation{
3528		{TargetValue: resourceGroupName,
3529			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3530				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3531				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3532		return result, validation.NewError("web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", err.Error())
3533	}
3534
3535	req, err := client.CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot)
3536	if err != nil {
3537		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", nil, "Failure preparing request")
3538		return
3539	}
3540
3541	resp, err := client.CreateOrUpdateRelayServiceConnectionSlotSender(req)
3542	if err != nil {
3543		result.Response = autorest.Response{Response: resp}
3544		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure sending request")
3545		return
3546	}
3547
3548	result, err = client.CreateOrUpdateRelayServiceConnectionSlotResponder(resp)
3549	if err != nil {
3550		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateRelayServiceConnectionSlot", resp, "Failure responding to request")
3551		return
3552	}
3553
3554	return
3555}
3556
3557// CreateOrUpdateRelayServiceConnectionSlotPreparer prepares the CreateOrUpdateRelayServiceConnectionSlot request.
3558func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) {
3559	pathParameters := map[string]interface{}{
3560		"entityName":        autorest.Encode("path", entityName),
3561		"name":              autorest.Encode("path", name),
3562		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3563		"slot":              autorest.Encode("path", slot),
3564		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3565	}
3566
3567	const APIVersion = "2020-09-01"
3568	queryParameters := map[string]interface{}{
3569		"api-version": APIVersion,
3570	}
3571
3572	preparer := autorest.CreatePreparer(
3573		autorest.AsContentType("application/json; charset=utf-8"),
3574		autorest.AsPut(),
3575		autorest.WithBaseURL(client.BaseURI),
3576		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
3577		autorest.WithJSON(connectionEnvelope),
3578		autorest.WithQueryParameters(queryParameters))
3579	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3580}
3581
3582// CreateOrUpdateRelayServiceConnectionSlotSender sends the CreateOrUpdateRelayServiceConnectionSlot request. The method will close the
3583// http.Response Body if it receives an error.
3584func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
3585	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
3586}
3587
3588// CreateOrUpdateRelayServiceConnectionSlotResponder handles the response to the CreateOrUpdateRelayServiceConnectionSlot request. The method always
3589// closes the http.Response Body.
3590func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
3591	err = autorest.Respond(
3592		resp,
3593		azure.WithErrorUnlessStatusCode(http.StatusOK),
3594		autorest.ByUnmarshallingJSON(&result),
3595		autorest.ByClosing())
3596	result.Response = autorest.Response{Response: resp}
3597	return
3598}
3599
3600// CreateOrUpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates
3601// an existing app.
3602// Parameters:
3603// resourceGroupName - name of the resource group to which the resource belongs.
3604// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
3605// parameter.
3606// siteEnvelope - a JSON representation of the app properties. See example.
3607// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify
3608// the production slot.
3609func (client AppsClient) CreateOrUpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (result AppsCreateOrUpdateSlotFuture, err error) {
3610	if tracing.IsEnabled() {
3611		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSlot")
3612		defer func() {
3613			sc := -1
3614			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3615				sc = result.FutureAPI.Response().StatusCode
3616			}
3617			tracing.EndSpan(ctx, sc, err)
3618		}()
3619	}
3620	if err := validation.Validate([]validation.Validation{
3621		{TargetValue: resourceGroupName,
3622			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3623				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3624				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
3625		{TargetValue: siteEnvelope,
3626			Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false,
3627				Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false,
3628					Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false,
3629						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties", Name: validation.Null, Rule: false,
3630							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}},
3631						}},
3632						{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.Null, Rule: false,
3633							Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMaximum, Rule: int64(10), Chain: nil},
3634								{Target: "siteEnvelope.SiteProperties.SiteConfig.PreWarmedInstanceCount", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
3635							}},
3636					}},
3637					{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false,
3638						Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}},
3639				}}}}}); err != nil {
3640		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSlot", err.Error())
3641	}
3642
3643	req, err := client.CreateOrUpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot)
3644	if err != nil {
3645		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure preparing request")
3646		return
3647	}
3648
3649	result, err = client.CreateOrUpdateSlotSender(req)
3650	if err != nil {
3651		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSlot", nil, "Failure sending request")
3652		return
3653	}
3654
3655	return
3656}
3657
3658// CreateOrUpdateSlotPreparer prepares the CreateOrUpdateSlot request.
3659func (client AppsClient) CreateOrUpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope Site, slot string) (*http.Request, error) {
3660	pathParameters := map[string]interface{}{
3661		"name":              autorest.Encode("path", name),
3662		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3663		"slot":              autorest.Encode("path", slot),
3664		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3665	}
3666
3667	const APIVersion = "2020-09-01"
3668	queryParameters := map[string]interface{}{
3669		"api-version": APIVersion,
3670	}
3671
3672	preparer := autorest.CreatePreparer(
3673		autorest.AsContentType("application/json; charset=utf-8"),
3674		autorest.AsPut(),
3675		autorest.WithBaseURL(client.BaseURI),
3676		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
3677		autorest.WithJSON(siteEnvelope),
3678		autorest.WithQueryParameters(queryParameters))
3679	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3680}
3681
3682// CreateOrUpdateSlotSender sends the CreateOrUpdateSlot request. The method will close the
3683// http.Response Body if it receives an error.
3684func (client AppsClient) CreateOrUpdateSlotSender(req *http.Request) (future AppsCreateOrUpdateSlotFuture, err error) {
3685	var resp *http.Response
3686	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3687	if err != nil {
3688		return
3689	}
3690	var azf azure.Future
3691	azf, err = azure.NewFutureFromResponse(resp)
3692	future.FutureAPI = &azf
3693	future.Result = func(client AppsClient) (s Site, err error) {
3694		var done bool
3695		done, err = future.DoneWithContext(context.Background(), client)
3696		if err != nil {
3697			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", future.Response(), "Polling failure")
3698			return
3699		}
3700		if !done {
3701			err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSlotFuture")
3702			return
3703		}
3704		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3705		s.Response.Response, err = future.GetResult(sender)
3706		if s.Response.Response == nil && err == nil {
3707			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", nil, "received nil response and error")
3708		}
3709		if err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
3710			s, err = client.CreateOrUpdateSlotResponder(s.Response.Response)
3711			if err != nil {
3712				err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSlotFuture", "Result", s.Response.Response, "Failure responding to request")
3713			}
3714		}
3715		return
3716	}
3717	return
3718}
3719
3720// CreateOrUpdateSlotResponder handles the response to the CreateOrUpdateSlot request. The method always
3721// closes the http.Response Body.
3722func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (result Site, err error) {
3723	err = autorest.Respond(
3724		resp,
3725		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
3726		autorest.ByUnmarshallingJSON(&result),
3727		autorest.ByClosing())
3728	result.Response = autorest.Response{Response: resp}
3729	return
3730}
3731
3732// CreateOrUpdateSourceControl description for Updates the source control configuration of an app.
3733// Parameters:
3734// resourceGroupName - name of the resource group to which the resource belongs.
3735// name - name of the app.
3736// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
3737func (client AppsClient) CreateOrUpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result AppsCreateOrUpdateSourceControlFuture, err error) {
3738	if tracing.IsEnabled() {
3739		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControl")
3740		defer func() {
3741			sc := -1
3742			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3743				sc = result.FutureAPI.Response().StatusCode
3744			}
3745			tracing.EndSpan(ctx, sc, err)
3746		}()
3747	}
3748	if err := validation.Validate([]validation.Validation{
3749		{TargetValue: resourceGroupName,
3750			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3751				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3752				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3753		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControl", err.Error())
3754	}
3755
3756	req, err := client.CreateOrUpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl)
3757	if err != nil {
3758		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure preparing request")
3759		return
3760	}
3761
3762	result, err = client.CreateOrUpdateSourceControlSender(req)
3763	if err != nil {
3764		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControl", nil, "Failure sending request")
3765		return
3766	}
3767
3768	return
3769}
3770
3771// CreateOrUpdateSourceControlPreparer prepares the CreateOrUpdateSourceControl request.
3772func (client AppsClient) CreateOrUpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) {
3773	pathParameters := map[string]interface{}{
3774		"name":              autorest.Encode("path", name),
3775		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3776		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3777	}
3778
3779	const APIVersion = "2020-09-01"
3780	queryParameters := map[string]interface{}{
3781		"api-version": APIVersion,
3782	}
3783
3784	preparer := autorest.CreatePreparer(
3785		autorest.AsContentType("application/json; charset=utf-8"),
3786		autorest.AsPut(),
3787		autorest.WithBaseURL(client.BaseURI),
3788		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
3789		autorest.WithJSON(siteSourceControl),
3790		autorest.WithQueryParameters(queryParameters))
3791	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3792}
3793
3794// CreateOrUpdateSourceControlSender sends the CreateOrUpdateSourceControl request. The method will close the
3795// http.Response Body if it receives an error.
3796func (client AppsClient) CreateOrUpdateSourceControlSender(req *http.Request) (future AppsCreateOrUpdateSourceControlFuture, err error) {
3797	var resp *http.Response
3798	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3799	if err != nil {
3800		return
3801	}
3802	var azf azure.Future
3803	azf, err = azure.NewFutureFromResponse(resp)
3804	future.FutureAPI = &azf
3805	future.Result = func(client AppsClient) (ssc SiteSourceControl, err error) {
3806		var done bool
3807		done, err = future.DoneWithContext(context.Background(), client)
3808		if err != nil {
3809			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", future.Response(), "Polling failure")
3810			return
3811		}
3812		if !done {
3813			err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlFuture")
3814			return
3815		}
3816		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3817		ssc.Response.Response, err = future.GetResult(sender)
3818		if ssc.Response.Response == nil && err == nil {
3819			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", nil, "received nil response and error")
3820		}
3821		if err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
3822			ssc, err = client.CreateOrUpdateSourceControlResponder(ssc.Response.Response)
3823			if err != nil {
3824				err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlFuture", "Result", ssc.Response.Response, "Failure responding to request")
3825			}
3826		}
3827		return
3828	}
3829	return
3830}
3831
3832// CreateOrUpdateSourceControlResponder handles the response to the CreateOrUpdateSourceControl request. The method always
3833// closes the http.Response Body.
3834func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
3835	err = autorest.Respond(
3836		resp,
3837		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
3838		autorest.ByUnmarshallingJSON(&result),
3839		autorest.ByClosing())
3840	result.Response = autorest.Response{Response: resp}
3841	return
3842}
3843
3844// CreateOrUpdateSourceControlSlot description for Updates the source control configuration of an app.
3845// Parameters:
3846// resourceGroupName - name of the resource group to which the resource belongs.
3847// name - name of the app.
3848// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
3849// slot - name of the deployment slot. If a slot is not specified, the API will update the source control
3850// configuration for the production slot.
3851func (client AppsClient) CreateOrUpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result AppsCreateOrUpdateSourceControlSlotFuture, err error) {
3852	if tracing.IsEnabled() {
3853		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSourceControlSlot")
3854		defer func() {
3855			sc := -1
3856			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
3857				sc = result.FutureAPI.Response().StatusCode
3858			}
3859			tracing.EndSpan(ctx, sc, err)
3860		}()
3861	}
3862	if err := validation.Validate([]validation.Validation{
3863		{TargetValue: resourceGroupName,
3864			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3865				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3866				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3867		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSourceControlSlot", err.Error())
3868	}
3869
3870	req, err := client.CreateOrUpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot)
3871	if err != nil {
3872		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure preparing request")
3873		return
3874	}
3875
3876	result, err = client.CreateOrUpdateSourceControlSlotSender(req)
3877	if err != nil {
3878		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSourceControlSlot", nil, "Failure sending request")
3879		return
3880	}
3881
3882	return
3883}
3884
3885// CreateOrUpdateSourceControlSlotPreparer prepares the CreateOrUpdateSourceControlSlot request.
3886func (client AppsClient) CreateOrUpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) {
3887	pathParameters := map[string]interface{}{
3888		"name":              autorest.Encode("path", name),
3889		"resourceGroupName": autorest.Encode("path", resourceGroupName),
3890		"slot":              autorest.Encode("path", slot),
3891		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
3892	}
3893
3894	const APIVersion = "2020-09-01"
3895	queryParameters := map[string]interface{}{
3896		"api-version": APIVersion,
3897	}
3898
3899	preparer := autorest.CreatePreparer(
3900		autorest.AsContentType("application/json; charset=utf-8"),
3901		autorest.AsPut(),
3902		autorest.WithBaseURL(client.BaseURI),
3903		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
3904		autorest.WithJSON(siteSourceControl),
3905		autorest.WithQueryParameters(queryParameters))
3906	return preparer.Prepare((&http.Request{}).WithContext(ctx))
3907}
3908
3909// CreateOrUpdateSourceControlSlotSender sends the CreateOrUpdateSourceControlSlot request. The method will close the
3910// http.Response Body if it receives an error.
3911func (client AppsClient) CreateOrUpdateSourceControlSlotSender(req *http.Request) (future AppsCreateOrUpdateSourceControlSlotFuture, err error) {
3912	var resp *http.Response
3913	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
3914	if err != nil {
3915		return
3916	}
3917	var azf azure.Future
3918	azf, err = azure.NewFutureFromResponse(resp)
3919	future.FutureAPI = &azf
3920	future.Result = func(client AppsClient) (ssc SiteSourceControl, err error) {
3921		var done bool
3922		done, err = future.DoneWithContext(context.Background(), client)
3923		if err != nil {
3924			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", future.Response(), "Polling failure")
3925			return
3926		}
3927		if !done {
3928			err = azure.NewAsyncOpIncompleteError("web.AppsCreateOrUpdateSourceControlSlotFuture")
3929			return
3930		}
3931		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
3932		ssc.Response.Response, err = future.GetResult(sender)
3933		if ssc.Response.Response == nil && err == nil {
3934			err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", nil, "received nil response and error")
3935		}
3936		if err == nil && ssc.Response.Response.StatusCode != http.StatusNoContent {
3937			ssc, err = client.CreateOrUpdateSourceControlSlotResponder(ssc.Response.Response)
3938			if err != nil {
3939				err = autorest.NewErrorWithError(err, "web.AppsCreateOrUpdateSourceControlSlotFuture", "Result", ssc.Response.Response, "Failure responding to request")
3940			}
3941		}
3942		return
3943	}
3944	return
3945}
3946
3947// CreateOrUpdateSourceControlSlotResponder handles the response to the CreateOrUpdateSourceControlSlot request. The method always
3948// closes the http.Response Body.
3949func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
3950	err = autorest.Respond(
3951		resp,
3952		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
3953		autorest.ByUnmarshallingJSON(&result),
3954		autorest.ByClosing())
3955	result.Response = autorest.Response{Response: resp}
3956	return
3957}
3958
3959// CreateOrUpdateSwiftVirtualNetworkConnection description for Integrates this Web App with a Virtual Network. This
3960// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has
3961// already been delegated, and is not
3962// in use by another App Service Plan other than the one this App is in.
3963// Parameters:
3964// resourceGroupName - name of the resource group to which the resource belongs.
3965// name - name of the app.
3966// connectionEnvelope - properties of the Virtual Network connection. See example.
3967func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) {
3968	if tracing.IsEnabled() {
3969		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnection")
3970		defer func() {
3971			sc := -1
3972			if result.Response.Response != nil {
3973				sc = result.Response.Response.StatusCode
3974			}
3975			tracing.EndSpan(ctx, sc, err)
3976		}()
3977	}
3978	if err := validation.Validate([]validation.Validation{
3979		{TargetValue: resourceGroupName,
3980			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
3981				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
3982				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
3983		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", err.Error())
3984	}
3985
3986	req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope)
3987	if err != nil {
3988		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request")
3989		return
3990	}
3991
3992	resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSender(req)
3993	if err != nil {
3994		result.Response = autorest.Response{Response: resp}
3995		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure sending request")
3996		return
3997	}
3998
3999	result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp)
4000	if err != nil {
4001		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request")
4002		return
4003	}
4004
4005	return
4006}
4007
4008// CreateOrUpdateSwiftVirtualNetworkConnectionPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnection request.
4009func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) {
4010	pathParameters := map[string]interface{}{
4011		"name":              autorest.Encode("path", name),
4012		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4013		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4014	}
4015
4016	const APIVersion = "2020-09-01"
4017	queryParameters := map[string]interface{}{
4018		"api-version": APIVersion,
4019	}
4020
4021	preparer := autorest.CreatePreparer(
4022		autorest.AsContentType("application/json; charset=utf-8"),
4023		autorest.AsPut(),
4024		autorest.WithBaseURL(client.BaseURI),
4025		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
4026		autorest.WithJSON(connectionEnvelope),
4027		autorest.WithQueryParameters(queryParameters))
4028	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4029}
4030
4031// CreateOrUpdateSwiftVirtualNetworkConnectionSender sends the CreateOrUpdateSwiftVirtualNetworkConnection request. The method will close the
4032// http.Response Body if it receives an error.
4033func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
4034	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4035}
4036
4037// CreateOrUpdateSwiftVirtualNetworkConnectionResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnection request. The method always
4038// closes the http.Response Body.
4039func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
4040	err = autorest.Respond(
4041		resp,
4042		azure.WithErrorUnlessStatusCode(http.StatusOK),
4043		autorest.ByUnmarshallingJSON(&result),
4044		autorest.ByClosing())
4045	result.Response = autorest.Response{Response: resp}
4046	return
4047}
4048
4049// CreateOrUpdateSwiftVirtualNetworkConnectionSlot description for Integrates this Web App with a Virtual Network. This
4050// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has
4051// already been delegated, and is not
4052// in use by another App Service Plan other than the one this App is in.
4053// Parameters:
4054// resourceGroupName - name of the resource group to which the resource belongs.
4055// name - name of the app.
4056// connectionEnvelope - properties of the Virtual Network connection. See example.
4057// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
4058// the production slot.
4059func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) {
4060	if tracing.IsEnabled() {
4061		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateSwiftVirtualNetworkConnectionSlot")
4062		defer func() {
4063			sc := -1
4064			if result.Response.Response != nil {
4065				sc = result.Response.Response.StatusCode
4066			}
4067			tracing.EndSpan(ctx, sc, err)
4068		}()
4069	}
4070	if err := validation.Validate([]validation.Validation{
4071		{TargetValue: resourceGroupName,
4072			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4073				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4074				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4075		return result, validation.NewError("web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", err.Error())
4076	}
4077
4078	req, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot)
4079	if err != nil {
4080		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
4081		return
4082	}
4083
4084	resp, err := client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req)
4085	if err != nil {
4086		result.Response = autorest.Response{Response: resp}
4087		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
4088		return
4089	}
4090
4091	result, err = client.CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp)
4092	if err != nil {
4093		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
4094		return
4095	}
4096
4097	return
4098}
4099
4100// CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request.
4101func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) {
4102	pathParameters := map[string]interface{}{
4103		"name":              autorest.Encode("path", name),
4104		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4105		"slot":              autorest.Encode("path", slot),
4106		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4107	}
4108
4109	const APIVersion = "2020-09-01"
4110	queryParameters := map[string]interface{}{
4111		"api-version": APIVersion,
4112	}
4113
4114	preparer := autorest.CreatePreparer(
4115		autorest.AsContentType("application/json; charset=utf-8"),
4116		autorest.AsPut(),
4117		autorest.WithBaseURL(client.BaseURI),
4118		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
4119		autorest.WithJSON(connectionEnvelope),
4120		autorest.WithQueryParameters(queryParameters))
4121	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4122}
4123
4124// CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender sends the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method will close the
4125// http.Response Body if it receives an error.
4126func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
4127	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4128}
4129
4130// CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the CreateOrUpdateSwiftVirtualNetworkConnectionSlot request. The method always
4131// closes the http.Response Body.
4132func (client AppsClient) CreateOrUpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
4133	err = autorest.Respond(
4134		resp,
4135		azure.WithErrorUnlessStatusCode(http.StatusOK),
4136		autorest.ByUnmarshallingJSON(&result),
4137		autorest.ByClosing())
4138	result.Response = autorest.Response{Response: resp}
4139	return
4140}
4141
4142// CreateOrUpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates
4143// the connection properties (PATCH).
4144// Parameters:
4145// resourceGroupName - name of the resource group to which the resource belongs.
4146// name - name of the app.
4147// vnetName - name of an existing Virtual Network.
4148// connectionEnvelope - properties of the Virtual Network connection. See example.
4149func (client AppsClient) CreateOrUpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) {
4150	if tracing.IsEnabled() {
4151		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnection")
4152		defer func() {
4153			sc := -1
4154			if result.Response.Response != nil {
4155				sc = result.Response.Response.StatusCode
4156			}
4157			tracing.EndSpan(ctx, sc, err)
4158		}()
4159	}
4160	if err := validation.Validate([]validation.Validation{
4161		{TargetValue: resourceGroupName,
4162			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4163				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4164				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4165		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnection", err.Error())
4166	}
4167
4168	req, err := client.CreateOrUpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope)
4169	if err != nil {
4170		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", nil, "Failure preparing request")
4171		return
4172	}
4173
4174	resp, err := client.CreateOrUpdateVnetConnectionSender(req)
4175	if err != nil {
4176		result.Response = autorest.Response{Response: resp}
4177		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure sending request")
4178		return
4179	}
4180
4181	result, err = client.CreateOrUpdateVnetConnectionResponder(resp)
4182	if err != nil {
4183		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnection", resp, "Failure responding to request")
4184		return
4185	}
4186
4187	return
4188}
4189
4190// CreateOrUpdateVnetConnectionPreparer prepares the CreateOrUpdateVnetConnection request.
4191func (client AppsClient) CreateOrUpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) {
4192	pathParameters := map[string]interface{}{
4193		"name":              autorest.Encode("path", name),
4194		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4195		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4196		"vnetName":          autorest.Encode("path", vnetName),
4197	}
4198
4199	const APIVersion = "2020-09-01"
4200	queryParameters := map[string]interface{}{
4201		"api-version": APIVersion,
4202	}
4203
4204	preparer := autorest.CreatePreparer(
4205		autorest.AsContentType("application/json; charset=utf-8"),
4206		autorest.AsPut(),
4207		autorest.WithBaseURL(client.BaseURI),
4208		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
4209		autorest.WithJSON(connectionEnvelope),
4210		autorest.WithQueryParameters(queryParameters))
4211	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4212}
4213
4214// CreateOrUpdateVnetConnectionSender sends the CreateOrUpdateVnetConnection request. The method will close the
4215// http.Response Body if it receives an error.
4216func (client AppsClient) CreateOrUpdateVnetConnectionSender(req *http.Request) (*http.Response, error) {
4217	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4218}
4219
4220// CreateOrUpdateVnetConnectionResponder handles the response to the CreateOrUpdateVnetConnection request. The method always
4221// closes the http.Response Body.
4222func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
4223	err = autorest.Respond(
4224		resp,
4225		azure.WithErrorUnlessStatusCode(http.StatusOK),
4226		autorest.ByUnmarshallingJSON(&result),
4227		autorest.ByClosing())
4228	result.Response = autorest.Response{Response: resp}
4229	return
4230}
4231
4232// CreateOrUpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates
4233// it (PATCH).
4234// Parameters:
4235// resourceGroupName - name of the resource group to which the resource belongs.
4236// name - name of the app.
4237// vnetName - name of the Virtual Network.
4238// gatewayName - name of the gateway. Currently, the only supported string is "primary".
4239// connectionEnvelope - the properties to update this gateway with.
4240func (client AppsClient) CreateOrUpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) {
4241	if tracing.IsEnabled() {
4242		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGateway")
4243		defer func() {
4244			sc := -1
4245			if result.Response.Response != nil {
4246				sc = result.Response.Response.StatusCode
4247			}
4248			tracing.EndSpan(ctx, sc, err)
4249		}()
4250	}
4251	if err := validation.Validate([]validation.Validation{
4252		{TargetValue: resourceGroupName,
4253			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4254				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4255				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
4256		{TargetValue: connectionEnvelope,
4257			Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false,
4258				Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
4259		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGateway", err.Error())
4260	}
4261
4262	req, err := client.CreateOrUpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope)
4263	if err != nil {
4264		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", nil, "Failure preparing request")
4265		return
4266	}
4267
4268	resp, err := client.CreateOrUpdateVnetConnectionGatewaySender(req)
4269	if err != nil {
4270		result.Response = autorest.Response{Response: resp}
4271		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure sending request")
4272		return
4273	}
4274
4275	result, err = client.CreateOrUpdateVnetConnectionGatewayResponder(resp)
4276	if err != nil {
4277		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGateway", resp, "Failure responding to request")
4278		return
4279	}
4280
4281	return
4282}
4283
4284// CreateOrUpdateVnetConnectionGatewayPreparer prepares the CreateOrUpdateVnetConnectionGateway request.
4285func (client AppsClient) CreateOrUpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) {
4286	pathParameters := map[string]interface{}{
4287		"gatewayName":       autorest.Encode("path", gatewayName),
4288		"name":              autorest.Encode("path", name),
4289		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4290		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4291		"vnetName":          autorest.Encode("path", vnetName),
4292	}
4293
4294	const APIVersion = "2020-09-01"
4295	queryParameters := map[string]interface{}{
4296		"api-version": APIVersion,
4297	}
4298
4299	preparer := autorest.CreatePreparer(
4300		autorest.AsContentType("application/json; charset=utf-8"),
4301		autorest.AsPut(),
4302		autorest.WithBaseURL(client.BaseURI),
4303		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
4304		autorest.WithJSON(connectionEnvelope),
4305		autorest.WithQueryParameters(queryParameters))
4306	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4307}
4308
4309// CreateOrUpdateVnetConnectionGatewaySender sends the CreateOrUpdateVnetConnectionGateway request. The method will close the
4310// http.Response Body if it receives an error.
4311func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
4312	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4313}
4314
4315// CreateOrUpdateVnetConnectionGatewayResponder handles the response to the CreateOrUpdateVnetConnectionGateway request. The method always
4316// closes the http.Response Body.
4317func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
4318	err = autorest.Respond(
4319		resp,
4320		azure.WithErrorUnlessStatusCode(http.StatusOK),
4321		autorest.ByUnmarshallingJSON(&result),
4322		autorest.ByClosing())
4323	result.Response = autorest.Response{Response: resp}
4324	return
4325}
4326
4327// CreateOrUpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or
4328// updates it (PATCH).
4329// Parameters:
4330// resourceGroupName - name of the resource group to which the resource belongs.
4331// name - name of the app.
4332// vnetName - name of the Virtual Network.
4333// gatewayName - name of the gateway. Currently, the only supported string is "primary".
4334// connectionEnvelope - the properties to update this gateway with.
4335// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the
4336// production slot's Virtual Network.
4337func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) {
4338	if tracing.IsEnabled() {
4339		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionGatewaySlot")
4340		defer func() {
4341			sc := -1
4342			if result.Response.Response != nil {
4343				sc = result.Response.Response.StatusCode
4344			}
4345			tracing.EndSpan(ctx, sc, err)
4346		}()
4347	}
4348	if err := validation.Validate([]validation.Validation{
4349		{TargetValue: resourceGroupName,
4350			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4351				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4352				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
4353		{TargetValue: connectionEnvelope,
4354			Constraints: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties", Name: validation.Null, Rule: false,
4355				Chain: []validation.Constraint{{Target: "connectionEnvelope.VnetGatewayProperties.VpnPackageURI", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
4356		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", err.Error())
4357	}
4358
4359	req, err := client.CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot)
4360	if err != nil {
4361		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", nil, "Failure preparing request")
4362		return
4363	}
4364
4365	resp, err := client.CreateOrUpdateVnetConnectionGatewaySlotSender(req)
4366	if err != nil {
4367		result.Response = autorest.Response{Response: resp}
4368		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure sending request")
4369		return
4370	}
4371
4372	result, err = client.CreateOrUpdateVnetConnectionGatewaySlotResponder(resp)
4373	if err != nil {
4374		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionGatewaySlot", resp, "Failure responding to request")
4375		return
4376	}
4377
4378	return
4379}
4380
4381// CreateOrUpdateVnetConnectionGatewaySlotPreparer prepares the CreateOrUpdateVnetConnectionGatewaySlot request.
4382func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) {
4383	pathParameters := map[string]interface{}{
4384		"gatewayName":       autorest.Encode("path", gatewayName),
4385		"name":              autorest.Encode("path", name),
4386		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4387		"slot":              autorest.Encode("path", slot),
4388		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4389		"vnetName":          autorest.Encode("path", vnetName),
4390	}
4391
4392	const APIVersion = "2020-09-01"
4393	queryParameters := map[string]interface{}{
4394		"api-version": APIVersion,
4395	}
4396
4397	preparer := autorest.CreatePreparer(
4398		autorest.AsContentType("application/json; charset=utf-8"),
4399		autorest.AsPut(),
4400		autorest.WithBaseURL(client.BaseURI),
4401		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
4402		autorest.WithJSON(connectionEnvelope),
4403		autorest.WithQueryParameters(queryParameters))
4404	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4405}
4406
4407// CreateOrUpdateVnetConnectionGatewaySlotSender sends the CreateOrUpdateVnetConnectionGatewaySlot request. The method will close the
4408// http.Response Body if it receives an error.
4409func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
4410	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4411}
4412
4413// CreateOrUpdateVnetConnectionGatewaySlotResponder handles the response to the CreateOrUpdateVnetConnectionGatewaySlot request. The method always
4414// closes the http.Response Body.
4415func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
4416	err = autorest.Respond(
4417		resp,
4418		azure.WithErrorUnlessStatusCode(http.StatusOK),
4419		autorest.ByUnmarshallingJSON(&result),
4420		autorest.ByClosing())
4421	result.Response = autorest.Response{Response: resp}
4422	return
4423}
4424
4425// CreateOrUpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or
4426// updates the connection properties (PATCH).
4427// Parameters:
4428// resourceGroupName - name of the resource group to which the resource belongs.
4429// name - name of the app.
4430// vnetName - name of an existing Virtual Network.
4431// connectionEnvelope - properties of the Virtual Network connection. See example.
4432// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
4433// the production slot.
4434func (client AppsClient) CreateOrUpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) {
4435	if tracing.IsEnabled() {
4436		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.CreateOrUpdateVnetConnectionSlot")
4437		defer func() {
4438			sc := -1
4439			if result.Response.Response != nil {
4440				sc = result.Response.Response.StatusCode
4441			}
4442			tracing.EndSpan(ctx, sc, err)
4443		}()
4444	}
4445	if err := validation.Validate([]validation.Validation{
4446		{TargetValue: resourceGroupName,
4447			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4448				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4449				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4450		return result, validation.NewError("web.AppsClient", "CreateOrUpdateVnetConnectionSlot", err.Error())
4451	}
4452
4453	req, err := client.CreateOrUpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot)
4454	if err != nil {
4455		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", nil, "Failure preparing request")
4456		return
4457	}
4458
4459	resp, err := client.CreateOrUpdateVnetConnectionSlotSender(req)
4460	if err != nil {
4461		result.Response = autorest.Response{Response: resp}
4462		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure sending request")
4463		return
4464	}
4465
4466	result, err = client.CreateOrUpdateVnetConnectionSlotResponder(resp)
4467	if err != nil {
4468		err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdateVnetConnectionSlot", resp, "Failure responding to request")
4469		return
4470	}
4471
4472	return
4473}
4474
4475// CreateOrUpdateVnetConnectionSlotPreparer prepares the CreateOrUpdateVnetConnectionSlot request.
4476func (client AppsClient) CreateOrUpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) {
4477	pathParameters := map[string]interface{}{
4478		"name":              autorest.Encode("path", name),
4479		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4480		"slot":              autorest.Encode("path", slot),
4481		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4482		"vnetName":          autorest.Encode("path", vnetName),
4483	}
4484
4485	const APIVersion = "2020-09-01"
4486	queryParameters := map[string]interface{}{
4487		"api-version": APIVersion,
4488	}
4489
4490	preparer := autorest.CreatePreparer(
4491		autorest.AsContentType("application/json; charset=utf-8"),
4492		autorest.AsPut(),
4493		autorest.WithBaseURL(client.BaseURI),
4494		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
4495		autorest.WithJSON(connectionEnvelope),
4496		autorest.WithQueryParameters(queryParameters))
4497	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4498}
4499
4500// CreateOrUpdateVnetConnectionSlotSender sends the CreateOrUpdateVnetConnectionSlot request. The method will close the
4501// http.Response Body if it receives an error.
4502func (client AppsClient) CreateOrUpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
4503	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4504}
4505
4506// CreateOrUpdateVnetConnectionSlotResponder handles the response to the CreateOrUpdateVnetConnectionSlot request. The method always
4507// closes the http.Response Body.
4508func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
4509	err = autorest.Respond(
4510		resp,
4511		azure.WithErrorUnlessStatusCode(http.StatusOK),
4512		autorest.ByUnmarshallingJSON(&result),
4513		autorest.ByClosing())
4514	result.Response = autorest.Response{Response: resp}
4515	return
4516}
4517
4518// Delete description for Deletes a web, mobile, or API app, or one of the deployment slots.
4519// Parameters:
4520// resourceGroupName - name of the resource group to which the resource belongs.
4521// name - name of the app to delete.
4522// deleteMetrics - if true, web app metrics are also deleted.
4523// deleteEmptyServerFarm - specify false if you want to keep empty App Service plan. By default, empty App
4524// Service plan is deleted.
4525func (client AppsClient) Delete(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) {
4526	if tracing.IsEnabled() {
4527		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Delete")
4528		defer func() {
4529			sc := -1
4530			if result.Response != nil {
4531				sc = result.Response.StatusCode
4532			}
4533			tracing.EndSpan(ctx, sc, err)
4534		}()
4535	}
4536	if err := validation.Validate([]validation.Validation{
4537		{TargetValue: resourceGroupName,
4538			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4539				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4540				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4541		return result, validation.NewError("web.AppsClient", "Delete", err.Error())
4542	}
4543
4544	req, err := client.DeletePreparer(ctx, resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm)
4545	if err != nil {
4546		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", nil, "Failure preparing request")
4547		return
4548	}
4549
4550	resp, err := client.DeleteSender(req)
4551	if err != nil {
4552		result.Response = resp
4553		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure sending request")
4554		return
4555	}
4556
4557	result, err = client.DeleteResponder(resp)
4558	if err != nil {
4559		err = autorest.NewErrorWithError(err, "web.AppsClient", "Delete", resp, "Failure responding to request")
4560		return
4561	}
4562
4563	return
4564}
4565
4566// DeletePreparer prepares the Delete request.
4567func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) {
4568	pathParameters := map[string]interface{}{
4569		"name":              autorest.Encode("path", name),
4570		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4571		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4572	}
4573
4574	const APIVersion = "2020-09-01"
4575	queryParameters := map[string]interface{}{
4576		"api-version": APIVersion,
4577	}
4578	if deleteMetrics != nil {
4579		queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics)
4580	}
4581	if deleteEmptyServerFarm != nil {
4582		queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm)
4583	}
4584
4585	preparer := autorest.CreatePreparer(
4586		autorest.AsDelete(),
4587		autorest.WithBaseURL(client.BaseURI),
4588		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
4589		autorest.WithQueryParameters(queryParameters))
4590	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4591}
4592
4593// DeleteSender sends the Delete request. The method will close the
4594// http.Response Body if it receives an error.
4595func (client AppsClient) DeleteSender(req *http.Request) (*http.Response, error) {
4596	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4597}
4598
4599// DeleteResponder handles the response to the Delete request. The method always
4600// closes the http.Response Body.
4601func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
4602	err = autorest.Respond(
4603		resp,
4604		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
4605		autorest.ByClosing())
4606	result.Response = resp
4607	return
4608}
4609
4610// DeleteBackup description for Deletes a backup of an app by its ID.
4611// Parameters:
4612// resourceGroupName - name of the resource group to which the resource belongs.
4613// name - name of the app.
4614// backupID - ID of the backup.
4615func (client AppsClient) DeleteBackup(ctx context.Context, resourceGroupName string, name string, backupID string) (result autorest.Response, err error) {
4616	if tracing.IsEnabled() {
4617		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackup")
4618		defer func() {
4619			sc := -1
4620			if result.Response != nil {
4621				sc = result.Response.StatusCode
4622			}
4623			tracing.EndSpan(ctx, sc, err)
4624		}()
4625	}
4626	if err := validation.Validate([]validation.Validation{
4627		{TargetValue: resourceGroupName,
4628			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4629				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4630				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4631		return result, validation.NewError("web.AppsClient", "DeleteBackup", err.Error())
4632	}
4633
4634	req, err := client.DeleteBackupPreparer(ctx, resourceGroupName, name, backupID)
4635	if err != nil {
4636		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", nil, "Failure preparing request")
4637		return
4638	}
4639
4640	resp, err := client.DeleteBackupSender(req)
4641	if err != nil {
4642		result.Response = resp
4643		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure sending request")
4644		return
4645	}
4646
4647	result, err = client.DeleteBackupResponder(resp)
4648	if err != nil {
4649		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackup", resp, "Failure responding to request")
4650		return
4651	}
4652
4653	return
4654}
4655
4656// DeleteBackupPreparer prepares the DeleteBackup request.
4657func (client AppsClient) DeleteBackupPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) {
4658	pathParameters := map[string]interface{}{
4659		"backupId":          autorest.Encode("path", backupID),
4660		"name":              autorest.Encode("path", name),
4661		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4662		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4663	}
4664
4665	const APIVersion = "2020-09-01"
4666	queryParameters := map[string]interface{}{
4667		"api-version": APIVersion,
4668	}
4669
4670	preparer := autorest.CreatePreparer(
4671		autorest.AsDelete(),
4672		autorest.WithBaseURL(client.BaseURI),
4673		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters),
4674		autorest.WithQueryParameters(queryParameters))
4675	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4676}
4677
4678// DeleteBackupSender sends the DeleteBackup request. The method will close the
4679// http.Response Body if it receives an error.
4680func (client AppsClient) DeleteBackupSender(req *http.Request) (*http.Response, error) {
4681	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4682}
4683
4684// DeleteBackupResponder handles the response to the DeleteBackup request. The method always
4685// closes the http.Response Body.
4686func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result autorest.Response, err error) {
4687	err = autorest.Respond(
4688		resp,
4689		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
4690		autorest.ByClosing())
4691	result.Response = resp
4692	return
4693}
4694
4695// DeleteBackupConfiguration description for Deletes the backup configuration of an app.
4696// Parameters:
4697// resourceGroupName - name of the resource group to which the resource belongs.
4698// name - name of the app.
4699func (client AppsClient) DeleteBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
4700	if tracing.IsEnabled() {
4701		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfiguration")
4702		defer func() {
4703			sc := -1
4704			if result.Response != nil {
4705				sc = result.Response.StatusCode
4706			}
4707			tracing.EndSpan(ctx, sc, err)
4708		}()
4709	}
4710	if err := validation.Validate([]validation.Validation{
4711		{TargetValue: resourceGroupName,
4712			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4713				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4714				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4715		return result, validation.NewError("web.AppsClient", "DeleteBackupConfiguration", err.Error())
4716	}
4717
4718	req, err := client.DeleteBackupConfigurationPreparer(ctx, resourceGroupName, name)
4719	if err != nil {
4720		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", nil, "Failure preparing request")
4721		return
4722	}
4723
4724	resp, err := client.DeleteBackupConfigurationSender(req)
4725	if err != nil {
4726		result.Response = resp
4727		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure sending request")
4728		return
4729	}
4730
4731	result, err = client.DeleteBackupConfigurationResponder(resp)
4732	if err != nil {
4733		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfiguration", resp, "Failure responding to request")
4734		return
4735	}
4736
4737	return
4738}
4739
4740// DeleteBackupConfigurationPreparer prepares the DeleteBackupConfiguration request.
4741func (client AppsClient) DeleteBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
4742	pathParameters := map[string]interface{}{
4743		"name":              autorest.Encode("path", name),
4744		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4745		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4746	}
4747
4748	const APIVersion = "2020-09-01"
4749	queryParameters := map[string]interface{}{
4750		"api-version": APIVersion,
4751	}
4752
4753	preparer := autorest.CreatePreparer(
4754		autorest.AsDelete(),
4755		autorest.WithBaseURL(client.BaseURI),
4756		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters),
4757		autorest.WithQueryParameters(queryParameters))
4758	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4759}
4760
4761// DeleteBackupConfigurationSender sends the DeleteBackupConfiguration request. The method will close the
4762// http.Response Body if it receives an error.
4763func (client AppsClient) DeleteBackupConfigurationSender(req *http.Request) (*http.Response, error) {
4764	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4765}
4766
4767// DeleteBackupConfigurationResponder handles the response to the DeleteBackupConfiguration request. The method always
4768// closes the http.Response Body.
4769func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) (result autorest.Response, err error) {
4770	err = autorest.Respond(
4771		resp,
4772		azure.WithErrorUnlessStatusCode(http.StatusOK),
4773		autorest.ByClosing())
4774	result.Response = resp
4775	return
4776}
4777
4778// DeleteBackupConfigurationSlot description for Deletes the backup configuration of an app.
4779// Parameters:
4780// resourceGroupName - name of the resource group to which the resource belongs.
4781// name - name of the app.
4782// slot - name of the deployment slot. If a slot is not specified, the API will delete the backup configuration
4783// for the production slot.
4784func (client AppsClient) DeleteBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
4785	if tracing.IsEnabled() {
4786		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupConfigurationSlot")
4787		defer func() {
4788			sc := -1
4789			if result.Response != nil {
4790				sc = result.Response.StatusCode
4791			}
4792			tracing.EndSpan(ctx, sc, err)
4793		}()
4794	}
4795	if err := validation.Validate([]validation.Validation{
4796		{TargetValue: resourceGroupName,
4797			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4798				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4799				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4800		return result, validation.NewError("web.AppsClient", "DeleteBackupConfigurationSlot", err.Error())
4801	}
4802
4803	req, err := client.DeleteBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
4804	if err != nil {
4805		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", nil, "Failure preparing request")
4806		return
4807	}
4808
4809	resp, err := client.DeleteBackupConfigurationSlotSender(req)
4810	if err != nil {
4811		result.Response = resp
4812		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure sending request")
4813		return
4814	}
4815
4816	result, err = client.DeleteBackupConfigurationSlotResponder(resp)
4817	if err != nil {
4818		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupConfigurationSlot", resp, "Failure responding to request")
4819		return
4820	}
4821
4822	return
4823}
4824
4825// DeleteBackupConfigurationSlotPreparer prepares the DeleteBackupConfigurationSlot request.
4826func (client AppsClient) DeleteBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
4827	pathParameters := map[string]interface{}{
4828		"name":              autorest.Encode("path", name),
4829		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4830		"slot":              autorest.Encode("path", slot),
4831		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4832	}
4833
4834	const APIVersion = "2020-09-01"
4835	queryParameters := map[string]interface{}{
4836		"api-version": APIVersion,
4837	}
4838
4839	preparer := autorest.CreatePreparer(
4840		autorest.AsDelete(),
4841		autorest.WithBaseURL(client.BaseURI),
4842		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters),
4843		autorest.WithQueryParameters(queryParameters))
4844	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4845}
4846
4847// DeleteBackupConfigurationSlotSender sends the DeleteBackupConfigurationSlot request. The method will close the
4848// http.Response Body if it receives an error.
4849func (client AppsClient) DeleteBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
4850	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4851}
4852
4853// DeleteBackupConfigurationSlotResponder handles the response to the DeleteBackupConfigurationSlot request. The method always
4854// closes the http.Response Body.
4855func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4856	err = autorest.Respond(
4857		resp,
4858		azure.WithErrorUnlessStatusCode(http.StatusOK),
4859		autorest.ByClosing())
4860	result.Response = resp
4861	return
4862}
4863
4864// DeleteBackupSlot description for Deletes a backup of an app by its ID.
4865// Parameters:
4866// resourceGroupName - name of the resource group to which the resource belongs.
4867// name - name of the app.
4868// backupID - ID of the backup.
4869// slot - name of the deployment slot. If a slot is not specified, the API will delete a backup of the
4870// production slot.
4871func (client AppsClient) DeleteBackupSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) {
4872	if tracing.IsEnabled() {
4873		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteBackupSlot")
4874		defer func() {
4875			sc := -1
4876			if result.Response != nil {
4877				sc = result.Response.StatusCode
4878			}
4879			tracing.EndSpan(ctx, sc, err)
4880		}()
4881	}
4882	if err := validation.Validate([]validation.Validation{
4883		{TargetValue: resourceGroupName,
4884			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4885				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4886				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4887		return result, validation.NewError("web.AppsClient", "DeleteBackupSlot", err.Error())
4888	}
4889
4890	req, err := client.DeleteBackupSlotPreparer(ctx, resourceGroupName, name, backupID, slot)
4891	if err != nil {
4892		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", nil, "Failure preparing request")
4893		return
4894	}
4895
4896	resp, err := client.DeleteBackupSlotSender(req)
4897	if err != nil {
4898		result.Response = resp
4899		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure sending request")
4900		return
4901	}
4902
4903	result, err = client.DeleteBackupSlotResponder(resp)
4904	if err != nil {
4905		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteBackupSlot", resp, "Failure responding to request")
4906		return
4907	}
4908
4909	return
4910}
4911
4912// DeleteBackupSlotPreparer prepares the DeleteBackupSlot request.
4913func (client AppsClient) DeleteBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) {
4914	pathParameters := map[string]interface{}{
4915		"backupId":          autorest.Encode("path", backupID),
4916		"name":              autorest.Encode("path", name),
4917		"resourceGroupName": autorest.Encode("path", resourceGroupName),
4918		"slot":              autorest.Encode("path", slot),
4919		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
4920	}
4921
4922	const APIVersion = "2020-09-01"
4923	queryParameters := map[string]interface{}{
4924		"api-version": APIVersion,
4925	}
4926
4927	preparer := autorest.CreatePreparer(
4928		autorest.AsDelete(),
4929		autorest.WithBaseURL(client.BaseURI),
4930		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters),
4931		autorest.WithQueryParameters(queryParameters))
4932	return preparer.Prepare((&http.Request{}).WithContext(ctx))
4933}
4934
4935// DeleteBackupSlotSender sends the DeleteBackupSlot request. The method will close the
4936// http.Response Body if it receives an error.
4937func (client AppsClient) DeleteBackupSlotSender(req *http.Request) (*http.Response, error) {
4938	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
4939}
4940
4941// DeleteBackupSlotResponder handles the response to the DeleteBackupSlot request. The method always
4942// closes the http.Response Body.
4943func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result autorest.Response, err error) {
4944	err = autorest.Respond(
4945		resp,
4946		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
4947		autorest.ByClosing())
4948	result.Response = resp
4949	return
4950}
4951
4952// DeleteContinuousWebJob description for Delete a continuous web job by its ID for an app, or a deployment slot.
4953// Parameters:
4954// resourceGroupName - name of the resource group to which the resource belongs.
4955// name - site name.
4956// webJobName - name of Web Job.
4957func (client AppsClient) DeleteContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
4958	if tracing.IsEnabled() {
4959		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJob")
4960		defer func() {
4961			sc := -1
4962			if result.Response != nil {
4963				sc = result.Response.StatusCode
4964			}
4965			tracing.EndSpan(ctx, sc, err)
4966		}()
4967	}
4968	if err := validation.Validate([]validation.Validation{
4969		{TargetValue: resourceGroupName,
4970			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
4971				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
4972				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
4973		return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJob", err.Error())
4974	}
4975
4976	req, err := client.DeleteContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
4977	if err != nil {
4978		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request")
4979		return
4980	}
4981
4982	resp, err := client.DeleteContinuousWebJobSender(req)
4983	if err != nil {
4984		result.Response = resp
4985		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request")
4986		return
4987	}
4988
4989	result, err = client.DeleteContinuousWebJobResponder(resp)
4990	if err != nil {
4991		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request")
4992		return
4993	}
4994
4995	return
4996}
4997
4998// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request.
4999func (client AppsClient) DeleteContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
5000	pathParameters := map[string]interface{}{
5001		"name":              autorest.Encode("path", name),
5002		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5003		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5004		"webJobName":        autorest.Encode("path", webJobName),
5005	}
5006
5007	const APIVersion = "2020-09-01"
5008	queryParameters := map[string]interface{}{
5009		"api-version": APIVersion,
5010	}
5011
5012	preparer := autorest.CreatePreparer(
5013		autorest.AsDelete(),
5014		autorest.WithBaseURL(client.BaseURI),
5015		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters),
5016		autorest.WithQueryParameters(queryParameters))
5017	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5018}
5019
5020// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the
5021// http.Response Body if it receives an error.
5022func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) {
5023	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5024}
5025
5026// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always
5027// closes the http.Response Body.
5028func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
5029	err = autorest.Respond(
5030		resp,
5031		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5032		autorest.ByClosing())
5033	result.Response = resp
5034	return
5035}
5036
5037// DeleteContinuousWebJobSlot description for Delete a continuous web job by its ID for an app, or a deployment slot.
5038// Parameters:
5039// resourceGroupName - name of the resource group to which the resource belongs.
5040// name - site name.
5041// webJobName - name of Web Job.
5042// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
5043// production slot.
5044func (client AppsClient) DeleteContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
5045	if tracing.IsEnabled() {
5046		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteContinuousWebJobSlot")
5047		defer func() {
5048			sc := -1
5049			if result.Response != nil {
5050				sc = result.Response.StatusCode
5051			}
5052			tracing.EndSpan(ctx, sc, err)
5053		}()
5054	}
5055	if err := validation.Validate([]validation.Validation{
5056		{TargetValue: resourceGroupName,
5057			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5058				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5059				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5060		return result, validation.NewError("web.AppsClient", "DeleteContinuousWebJobSlot", err.Error())
5061	}
5062
5063	req, err := client.DeleteContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
5064	if err != nil {
5065		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request")
5066		return
5067	}
5068
5069	resp, err := client.DeleteContinuousWebJobSlotSender(req)
5070	if err != nil {
5071		result.Response = resp
5072		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request")
5073		return
5074	}
5075
5076	result, err = client.DeleteContinuousWebJobSlotResponder(resp)
5077	if err != nil {
5078		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request")
5079		return
5080	}
5081
5082	return
5083}
5084
5085// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request.
5086func (client AppsClient) DeleteContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
5087	pathParameters := map[string]interface{}{
5088		"name":              autorest.Encode("path", name),
5089		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5090		"slot":              autorest.Encode("path", slot),
5091		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5092		"webJobName":        autorest.Encode("path", webJobName),
5093	}
5094
5095	const APIVersion = "2020-09-01"
5096	queryParameters := map[string]interface{}{
5097		"api-version": APIVersion,
5098	}
5099
5100	preparer := autorest.CreatePreparer(
5101		autorest.AsDelete(),
5102		autorest.WithBaseURL(client.BaseURI),
5103		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters),
5104		autorest.WithQueryParameters(queryParameters))
5105	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5106}
5107
5108// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the
5109// http.Response Body if it receives an error.
5110func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
5111	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5112}
5113
5114// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always
5115// closes the http.Response Body.
5116func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5117	err = autorest.Respond(
5118		resp,
5119		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5120		autorest.ByClosing())
5121	result.Response = resp
5122	return
5123}
5124
5125// DeleteDeployment description for Delete a deployment by its ID for an app, or a deployment slot.
5126// Parameters:
5127// resourceGroupName - name of the resource group to which the resource belongs.
5128// name - name of the app.
5129// ID - deployment ID.
5130func (client AppsClient) DeleteDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result autorest.Response, err error) {
5131	if tracing.IsEnabled() {
5132		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeployment")
5133		defer func() {
5134			sc := -1
5135			if result.Response != nil {
5136				sc = result.Response.StatusCode
5137			}
5138			tracing.EndSpan(ctx, sc, err)
5139		}()
5140	}
5141	if err := validation.Validate([]validation.Validation{
5142		{TargetValue: resourceGroupName,
5143			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5144				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5145				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5146		return result, validation.NewError("web.AppsClient", "DeleteDeployment", err.Error())
5147	}
5148
5149	req, err := client.DeleteDeploymentPreparer(ctx, resourceGroupName, name, ID)
5150	if err != nil {
5151		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", nil, "Failure preparing request")
5152		return
5153	}
5154
5155	resp, err := client.DeleteDeploymentSender(req)
5156	if err != nil {
5157		result.Response = resp
5158		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure sending request")
5159		return
5160	}
5161
5162	result, err = client.DeleteDeploymentResponder(resp)
5163	if err != nil {
5164		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeployment", resp, "Failure responding to request")
5165		return
5166	}
5167
5168	return
5169}
5170
5171// DeleteDeploymentPreparer prepares the DeleteDeployment request.
5172func (client AppsClient) DeleteDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
5173	pathParameters := map[string]interface{}{
5174		"id":                autorest.Encode("path", ID),
5175		"name":              autorest.Encode("path", name),
5176		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5177		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5178	}
5179
5180	const APIVersion = "2020-09-01"
5181	queryParameters := map[string]interface{}{
5182		"api-version": APIVersion,
5183	}
5184
5185	preparer := autorest.CreatePreparer(
5186		autorest.AsDelete(),
5187		autorest.WithBaseURL(client.BaseURI),
5188		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
5189		autorest.WithQueryParameters(queryParameters))
5190	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5191}
5192
5193// DeleteDeploymentSender sends the DeleteDeployment request. The method will close the
5194// http.Response Body if it receives an error.
5195func (client AppsClient) DeleteDeploymentSender(req *http.Request) (*http.Response, error) {
5196	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5197}
5198
5199// DeleteDeploymentResponder handles the response to the DeleteDeployment request. The method always
5200// closes the http.Response Body.
5201func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result autorest.Response, err error) {
5202	err = autorest.Respond(
5203		resp,
5204		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5205		autorest.ByClosing())
5206	result.Response = resp
5207	return
5208}
5209
5210// DeleteDeploymentSlot description for Delete a deployment by its ID for an app, or a deployment slot.
5211// Parameters:
5212// resourceGroupName - name of the resource group to which the resource belongs.
5213// name - name of the app.
5214// ID - deployment ID.
5215// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
5216// production slot.
5217func (client AppsClient) DeleteDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) {
5218	if tracing.IsEnabled() {
5219		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDeploymentSlot")
5220		defer func() {
5221			sc := -1
5222			if result.Response != nil {
5223				sc = result.Response.StatusCode
5224			}
5225			tracing.EndSpan(ctx, sc, err)
5226		}()
5227	}
5228	if err := validation.Validate([]validation.Validation{
5229		{TargetValue: resourceGroupName,
5230			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5231				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5232				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5233		return result, validation.NewError("web.AppsClient", "DeleteDeploymentSlot", err.Error())
5234	}
5235
5236	req, err := client.DeleteDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot)
5237	if err != nil {
5238		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", nil, "Failure preparing request")
5239		return
5240	}
5241
5242	resp, err := client.DeleteDeploymentSlotSender(req)
5243	if err != nil {
5244		result.Response = resp
5245		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure sending request")
5246		return
5247	}
5248
5249	result, err = client.DeleteDeploymentSlotResponder(resp)
5250	if err != nil {
5251		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDeploymentSlot", resp, "Failure responding to request")
5252		return
5253	}
5254
5255	return
5256}
5257
5258// DeleteDeploymentSlotPreparer prepares the DeleteDeploymentSlot request.
5259func (client AppsClient) DeleteDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
5260	pathParameters := map[string]interface{}{
5261		"id":                autorest.Encode("path", ID),
5262		"name":              autorest.Encode("path", name),
5263		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5264		"slot":              autorest.Encode("path", slot),
5265		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5266	}
5267
5268	const APIVersion = "2020-09-01"
5269	queryParameters := map[string]interface{}{
5270		"api-version": APIVersion,
5271	}
5272
5273	preparer := autorest.CreatePreparer(
5274		autorest.AsDelete(),
5275		autorest.WithBaseURL(client.BaseURI),
5276		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
5277		autorest.WithQueryParameters(queryParameters))
5278	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5279}
5280
5281// DeleteDeploymentSlotSender sends the DeleteDeploymentSlot request. The method will close the
5282// http.Response Body if it receives an error.
5283func (client AppsClient) DeleteDeploymentSlotSender(req *http.Request) (*http.Response, error) {
5284	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5285}
5286
5287// DeleteDeploymentSlotResponder handles the response to the DeleteDeploymentSlot request. The method always
5288// closes the http.Response Body.
5289func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5290	err = autorest.Respond(
5291		resp,
5292		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5293		autorest.ByClosing())
5294	result.Response = resp
5295	return
5296}
5297
5298// DeleteDomainOwnershipIdentifier description for Deletes a domain ownership identifier for a web app.
5299// Parameters:
5300// resourceGroupName - name of the resource group to which the resource belongs.
5301// name - name of the app.
5302// domainOwnershipIdentifierName - name of domain ownership identifier.
5303func (client AppsClient) DeleteDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) {
5304	if tracing.IsEnabled() {
5305		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifier")
5306		defer func() {
5307			sc := -1
5308			if result.Response != nil {
5309				sc = result.Response.StatusCode
5310			}
5311			tracing.EndSpan(ctx, sc, err)
5312		}()
5313	}
5314	if err := validation.Validate([]validation.Validation{
5315		{TargetValue: resourceGroupName,
5316			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5317				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5318				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5319		return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifier", err.Error())
5320	}
5321
5322	req, err := client.DeleteDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName)
5323	if err != nil {
5324		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", nil, "Failure preparing request")
5325		return
5326	}
5327
5328	resp, err := client.DeleteDomainOwnershipIdentifierSender(req)
5329	if err != nil {
5330		result.Response = resp
5331		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure sending request")
5332		return
5333	}
5334
5335	result, err = client.DeleteDomainOwnershipIdentifierResponder(resp)
5336	if err != nil {
5337		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifier", resp, "Failure responding to request")
5338		return
5339	}
5340
5341	return
5342}
5343
5344// DeleteDomainOwnershipIdentifierPreparer prepares the DeleteDomainOwnershipIdentifier request.
5345func (client AppsClient) DeleteDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) {
5346	pathParameters := map[string]interface{}{
5347		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
5348		"name":                          autorest.Encode("path", name),
5349		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
5350		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
5351	}
5352
5353	const APIVersion = "2020-09-01"
5354	queryParameters := map[string]interface{}{
5355		"api-version": APIVersion,
5356	}
5357
5358	preparer := autorest.CreatePreparer(
5359		autorest.AsDelete(),
5360		autorest.WithBaseURL(client.BaseURI),
5361		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
5362		autorest.WithQueryParameters(queryParameters))
5363	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5364}
5365
5366// DeleteDomainOwnershipIdentifierSender sends the DeleteDomainOwnershipIdentifier request. The method will close the
5367// http.Response Body if it receives an error.
5368func (client AppsClient) DeleteDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
5369	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5370}
5371
5372// DeleteDomainOwnershipIdentifierResponder handles the response to the DeleteDomainOwnershipIdentifier request. The method always
5373// closes the http.Response Body.
5374func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Response) (result autorest.Response, err error) {
5375	err = autorest.Respond(
5376		resp,
5377		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5378		autorest.ByClosing())
5379	result.Response = resp
5380	return
5381}
5382
5383// DeleteDomainOwnershipIdentifierSlot description for Deletes a domain ownership identifier for a web app.
5384// Parameters:
5385// resourceGroupName - name of the resource group to which the resource belongs.
5386// name - name of the app.
5387// domainOwnershipIdentifierName - name of domain ownership identifier.
5388// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
5389// production slot.
5390func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) {
5391	if tracing.IsEnabled() {
5392		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteDomainOwnershipIdentifierSlot")
5393		defer func() {
5394			sc := -1
5395			if result.Response != nil {
5396				sc = result.Response.StatusCode
5397			}
5398			tracing.EndSpan(ctx, sc, err)
5399		}()
5400	}
5401	if err := validation.Validate([]validation.Validation{
5402		{TargetValue: resourceGroupName,
5403			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5404				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5405				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5406		return result, validation.NewError("web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", err.Error())
5407	}
5408
5409	req, err := client.DeleteDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot)
5410	if err != nil {
5411		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
5412		return
5413	}
5414
5415	resp, err := client.DeleteDomainOwnershipIdentifierSlotSender(req)
5416	if err != nil {
5417		result.Response = resp
5418		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure sending request")
5419		return
5420	}
5421
5422	result, err = client.DeleteDomainOwnershipIdentifierSlotResponder(resp)
5423	if err != nil {
5424		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
5425		return
5426	}
5427
5428	return
5429}
5430
5431// DeleteDomainOwnershipIdentifierSlotPreparer prepares the DeleteDomainOwnershipIdentifierSlot request.
5432func (client AppsClient) DeleteDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) {
5433	pathParameters := map[string]interface{}{
5434		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
5435		"name":                          autorest.Encode("path", name),
5436		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
5437		"slot":                          autorest.Encode("path", slot),
5438		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
5439	}
5440
5441	const APIVersion = "2020-09-01"
5442	queryParameters := map[string]interface{}{
5443		"api-version": APIVersion,
5444	}
5445
5446	preparer := autorest.CreatePreparer(
5447		autorest.AsDelete(),
5448		autorest.WithBaseURL(client.BaseURI),
5449		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
5450		autorest.WithQueryParameters(queryParameters))
5451	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5452}
5453
5454// DeleteDomainOwnershipIdentifierSlotSender sends the DeleteDomainOwnershipIdentifierSlot request. The method will close the
5455// http.Response Body if it receives an error.
5456func (client AppsClient) DeleteDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
5457	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5458}
5459
5460// DeleteDomainOwnershipIdentifierSlotResponder handles the response to the DeleteDomainOwnershipIdentifierSlot request. The method always
5461// closes the http.Response Body.
5462func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5463	err = autorest.Respond(
5464		resp,
5465		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5466		autorest.ByClosing())
5467	result.Response = resp
5468	return
5469}
5470
5471// DeleteFunction description for Delete a function for web site, or a deployment slot.
5472// Parameters:
5473// resourceGroupName - name of the resource group to which the resource belongs.
5474// name - site name.
5475// functionName - function name.
5476func (client AppsClient) DeleteFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result autorest.Response, err error) {
5477	if tracing.IsEnabled() {
5478		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunction")
5479		defer func() {
5480			sc := -1
5481			if result.Response != nil {
5482				sc = result.Response.StatusCode
5483			}
5484			tracing.EndSpan(ctx, sc, err)
5485		}()
5486	}
5487	if err := validation.Validate([]validation.Validation{
5488		{TargetValue: resourceGroupName,
5489			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5490				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5491				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5492		return result, validation.NewError("web.AppsClient", "DeleteFunction", err.Error())
5493	}
5494
5495	req, err := client.DeleteFunctionPreparer(ctx, resourceGroupName, name, functionName)
5496	if err != nil {
5497		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request")
5498		return
5499	}
5500
5501	resp, err := client.DeleteFunctionSender(req)
5502	if err != nil {
5503		result.Response = resp
5504		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request")
5505		return
5506	}
5507
5508	result, err = client.DeleteFunctionResponder(resp)
5509	if err != nil {
5510		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request")
5511		return
5512	}
5513
5514	return
5515}
5516
5517// DeleteFunctionPreparer prepares the DeleteFunction request.
5518func (client AppsClient) DeleteFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
5519	pathParameters := map[string]interface{}{
5520		"functionName":      autorest.Encode("path", functionName),
5521		"name":              autorest.Encode("path", name),
5522		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5523		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5524	}
5525
5526	const APIVersion = "2020-09-01"
5527	queryParameters := map[string]interface{}{
5528		"api-version": APIVersion,
5529	}
5530
5531	preparer := autorest.CreatePreparer(
5532		autorest.AsDelete(),
5533		autorest.WithBaseURL(client.BaseURI),
5534		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
5535		autorest.WithQueryParameters(queryParameters))
5536	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5537}
5538
5539// DeleteFunctionSender sends the DeleteFunction request. The method will close the
5540// http.Response Body if it receives an error.
5541func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) {
5542	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5543}
5544
5545// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always
5546// closes the http.Response Body.
5547func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) {
5548	err = autorest.Respond(
5549		resp,
5550		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5551		autorest.ByClosing())
5552	result.Response = resp
5553	return
5554}
5555
5556// DeleteFunctionSecret description for Delete a function secret.
5557// Parameters:
5558// resourceGroupName - name of the resource group to which the resource belongs.
5559// name - site name.
5560// functionName - the name of the function.
5561// keyName - the name of the key.
5562func (client AppsClient) DeleteFunctionSecret(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (result autorest.Response, err error) {
5563	if tracing.IsEnabled() {
5564		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecret")
5565		defer func() {
5566			sc := -1
5567			if result.Response != nil {
5568				sc = result.Response.StatusCode
5569			}
5570			tracing.EndSpan(ctx, sc, err)
5571		}()
5572	}
5573	if err := validation.Validate([]validation.Validation{
5574		{TargetValue: resourceGroupName,
5575			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5576				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5577				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5578		return result, validation.NewError("web.AppsClient", "DeleteFunctionSecret", err.Error())
5579	}
5580
5581	req, err := client.DeleteFunctionSecretPreparer(ctx, resourceGroupName, name, functionName, keyName)
5582	if err != nil {
5583		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", nil, "Failure preparing request")
5584		return
5585	}
5586
5587	resp, err := client.DeleteFunctionSecretSender(req)
5588	if err != nil {
5589		result.Response = resp
5590		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure sending request")
5591		return
5592	}
5593
5594	result, err = client.DeleteFunctionSecretResponder(resp)
5595	if err != nil {
5596		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecret", resp, "Failure responding to request")
5597		return
5598	}
5599
5600	return
5601}
5602
5603// DeleteFunctionSecretPreparer prepares the DeleteFunctionSecret request.
5604func (client AppsClient) DeleteFunctionSecretPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string) (*http.Request, error) {
5605	pathParameters := map[string]interface{}{
5606		"functionName":      autorest.Encode("path", functionName),
5607		"keyName":           autorest.Encode("path", keyName),
5608		"name":              autorest.Encode("path", name),
5609		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5610		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5611	}
5612
5613	const APIVersion = "2020-09-01"
5614	queryParameters := map[string]interface{}{
5615		"api-version": APIVersion,
5616	}
5617
5618	preparer := autorest.CreatePreparer(
5619		autorest.AsDelete(),
5620		autorest.WithBaseURL(client.BaseURI),
5621		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}", pathParameters),
5622		autorest.WithQueryParameters(queryParameters))
5623	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5624}
5625
5626// DeleteFunctionSecretSender sends the DeleteFunctionSecret request. The method will close the
5627// http.Response Body if it receives an error.
5628func (client AppsClient) DeleteFunctionSecretSender(req *http.Request) (*http.Response, error) {
5629	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5630}
5631
5632// DeleteFunctionSecretResponder handles the response to the DeleteFunctionSecret request. The method always
5633// closes the http.Response Body.
5634func (client AppsClient) DeleteFunctionSecretResponder(resp *http.Response) (result autorest.Response, err error) {
5635	err = autorest.Respond(
5636		resp,
5637		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5638		autorest.ByClosing())
5639	result.Response = resp
5640	return
5641}
5642
5643// DeleteFunctionSecretSlot description for Delete a function secret.
5644// Parameters:
5645// resourceGroupName - name of the resource group to which the resource belongs.
5646// name - site name.
5647// functionName - the name of the function.
5648// keyName - the name of the key.
5649// slot - name of the deployment slot.
5650func (client AppsClient) DeleteFunctionSecretSlot(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (result autorest.Response, err error) {
5651	if tracing.IsEnabled() {
5652		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteFunctionSecretSlot")
5653		defer func() {
5654			sc := -1
5655			if result.Response != nil {
5656				sc = result.Response.StatusCode
5657			}
5658			tracing.EndSpan(ctx, sc, err)
5659		}()
5660	}
5661	if err := validation.Validate([]validation.Validation{
5662		{TargetValue: resourceGroupName,
5663			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5664				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5665				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5666		return result, validation.NewError("web.AppsClient", "DeleteFunctionSecretSlot", err.Error())
5667	}
5668
5669	req, err := client.DeleteFunctionSecretSlotPreparer(ctx, resourceGroupName, name, functionName, keyName, slot)
5670	if err != nil {
5671		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", nil, "Failure preparing request")
5672		return
5673	}
5674
5675	resp, err := client.DeleteFunctionSecretSlotSender(req)
5676	if err != nil {
5677		result.Response = resp
5678		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure sending request")
5679		return
5680	}
5681
5682	result, err = client.DeleteFunctionSecretSlotResponder(resp)
5683	if err != nil {
5684		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunctionSecretSlot", resp, "Failure responding to request")
5685		return
5686	}
5687
5688	return
5689}
5690
5691// DeleteFunctionSecretSlotPreparer prepares the DeleteFunctionSecretSlot request.
5692func (client AppsClient) DeleteFunctionSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, keyName string, slot string) (*http.Request, error) {
5693	pathParameters := map[string]interface{}{
5694		"functionName":      autorest.Encode("path", functionName),
5695		"keyName":           autorest.Encode("path", keyName),
5696		"name":              autorest.Encode("path", name),
5697		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5698		"slot":              autorest.Encode("path", slot),
5699		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5700	}
5701
5702	const APIVersion = "2020-09-01"
5703	queryParameters := map[string]interface{}{
5704		"api-version": APIVersion,
5705	}
5706
5707	preparer := autorest.CreatePreparer(
5708		autorest.AsDelete(),
5709		autorest.WithBaseURL(client.BaseURI),
5710		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}", pathParameters),
5711		autorest.WithQueryParameters(queryParameters))
5712	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5713}
5714
5715// DeleteFunctionSecretSlotSender sends the DeleteFunctionSecretSlot request. The method will close the
5716// http.Response Body if it receives an error.
5717func (client AppsClient) DeleteFunctionSecretSlotSender(req *http.Request) (*http.Response, error) {
5718	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5719}
5720
5721// DeleteFunctionSecretSlotResponder handles the response to the DeleteFunctionSecretSlot request. The method always
5722// closes the http.Response Body.
5723func (client AppsClient) DeleteFunctionSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5724	err = autorest.Respond(
5725		resp,
5726		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5727		autorest.ByClosing())
5728	result.Response = resp
5729	return
5730}
5731
5732// DeleteHostNameBinding description for Deletes a hostname binding for an app.
5733// Parameters:
5734// resourceGroupName - name of the resource group to which the resource belongs.
5735// name - name of the app.
5736// hostName - hostname in the hostname binding.
5737func (client AppsClient) DeleteHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result autorest.Response, err error) {
5738	if tracing.IsEnabled() {
5739		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBinding")
5740		defer func() {
5741			sc := -1
5742			if result.Response != nil {
5743				sc = result.Response.StatusCode
5744			}
5745			tracing.EndSpan(ctx, sc, err)
5746		}()
5747	}
5748	if err := validation.Validate([]validation.Validation{
5749		{TargetValue: resourceGroupName,
5750			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5751				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5752				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5753		return result, validation.NewError("web.AppsClient", "DeleteHostNameBinding", err.Error())
5754	}
5755
5756	req, err := client.DeleteHostNameBindingPreparer(ctx, resourceGroupName, name, hostName)
5757	if err != nil {
5758		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", nil, "Failure preparing request")
5759		return
5760	}
5761
5762	resp, err := client.DeleteHostNameBindingSender(req)
5763	if err != nil {
5764		result.Response = resp
5765		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure sending request")
5766		return
5767	}
5768
5769	result, err = client.DeleteHostNameBindingResponder(resp)
5770	if err != nil {
5771		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBinding", resp, "Failure responding to request")
5772		return
5773	}
5774
5775	return
5776}
5777
5778// DeleteHostNameBindingPreparer prepares the DeleteHostNameBinding request.
5779func (client AppsClient) DeleteHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
5780	pathParameters := map[string]interface{}{
5781		"hostName":          autorest.Encode("path", hostName),
5782		"name":              autorest.Encode("path", name),
5783		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5784		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5785	}
5786
5787	const APIVersion = "2020-09-01"
5788	queryParameters := map[string]interface{}{
5789		"api-version": APIVersion,
5790	}
5791
5792	preparer := autorest.CreatePreparer(
5793		autorest.AsDelete(),
5794		autorest.WithBaseURL(client.BaseURI),
5795		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
5796		autorest.WithQueryParameters(queryParameters))
5797	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5798}
5799
5800// DeleteHostNameBindingSender sends the DeleteHostNameBinding request. The method will close the
5801// http.Response Body if it receives an error.
5802func (client AppsClient) DeleteHostNameBindingSender(req *http.Request) (*http.Response, error) {
5803	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5804}
5805
5806// DeleteHostNameBindingResponder handles the response to the DeleteHostNameBinding request. The method always
5807// closes the http.Response Body.
5808func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (result autorest.Response, err error) {
5809	err = autorest.Respond(
5810		resp,
5811		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5812		autorest.ByClosing())
5813	result.Response = resp
5814	return
5815}
5816
5817// DeleteHostNameBindingSlot description for Deletes a hostname binding for an app.
5818// Parameters:
5819// resourceGroupName - name of the resource group to which the resource belongs.
5820// name - name of the app.
5821// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
5822// production slot.
5823// hostName - hostname in the hostname binding.
5824func (client AppsClient) DeleteHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) {
5825	if tracing.IsEnabled() {
5826		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostNameBindingSlot")
5827		defer func() {
5828			sc := -1
5829			if result.Response != nil {
5830				sc = result.Response.StatusCode
5831			}
5832			tracing.EndSpan(ctx, sc, err)
5833		}()
5834	}
5835	if err := validation.Validate([]validation.Validation{
5836		{TargetValue: resourceGroupName,
5837			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5838				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5839				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5840		return result, validation.NewError("web.AppsClient", "DeleteHostNameBindingSlot", err.Error())
5841	}
5842
5843	req, err := client.DeleteHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
5844	if err != nil {
5845		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", nil, "Failure preparing request")
5846		return
5847	}
5848
5849	resp, err := client.DeleteHostNameBindingSlotSender(req)
5850	if err != nil {
5851		result.Response = resp
5852		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure sending request")
5853		return
5854	}
5855
5856	result, err = client.DeleteHostNameBindingSlotResponder(resp)
5857	if err != nil {
5858		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostNameBindingSlot", resp, "Failure responding to request")
5859		return
5860	}
5861
5862	return
5863}
5864
5865// DeleteHostNameBindingSlotPreparer prepares the DeleteHostNameBindingSlot request.
5866func (client AppsClient) DeleteHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
5867	pathParameters := map[string]interface{}{
5868		"hostName":          autorest.Encode("path", hostName),
5869		"name":              autorest.Encode("path", name),
5870		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5871		"slot":              autorest.Encode("path", slot),
5872		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5873	}
5874
5875	const APIVersion = "2020-09-01"
5876	queryParameters := map[string]interface{}{
5877		"api-version": APIVersion,
5878	}
5879
5880	preparer := autorest.CreatePreparer(
5881		autorest.AsDelete(),
5882		autorest.WithBaseURL(client.BaseURI),
5883		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
5884		autorest.WithQueryParameters(queryParameters))
5885	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5886}
5887
5888// DeleteHostNameBindingSlotSender sends the DeleteHostNameBindingSlot request. The method will close the
5889// http.Response Body if it receives an error.
5890func (client AppsClient) DeleteHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
5891	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5892}
5893
5894// DeleteHostNameBindingSlotResponder handles the response to the DeleteHostNameBindingSlot request. The method always
5895// closes the http.Response Body.
5896func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) (result autorest.Response, err error) {
5897	err = autorest.Respond(
5898		resp,
5899		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
5900		autorest.ByClosing())
5901	result.Response = resp
5902	return
5903}
5904
5905// DeleteHostSecret description for Delete a host level secret.
5906// Parameters:
5907// resourceGroupName - name of the resource group to which the resource belongs.
5908// name - site name.
5909// keyType - the type of host key.
5910// keyName - the name of the key.
5911func (client AppsClient) DeleteHostSecret(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (result autorest.Response, err error) {
5912	if tracing.IsEnabled() {
5913		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecret")
5914		defer func() {
5915			sc := -1
5916			if result.Response != nil {
5917				sc = result.Response.StatusCode
5918			}
5919			tracing.EndSpan(ctx, sc, err)
5920		}()
5921	}
5922	if err := validation.Validate([]validation.Validation{
5923		{TargetValue: resourceGroupName,
5924			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
5925				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
5926				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
5927		return result, validation.NewError("web.AppsClient", "DeleteHostSecret", err.Error())
5928	}
5929
5930	req, err := client.DeleteHostSecretPreparer(ctx, resourceGroupName, name, keyType, keyName)
5931	if err != nil {
5932		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", nil, "Failure preparing request")
5933		return
5934	}
5935
5936	resp, err := client.DeleteHostSecretSender(req)
5937	if err != nil {
5938		result.Response = resp
5939		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure sending request")
5940		return
5941	}
5942
5943	result, err = client.DeleteHostSecretResponder(resp)
5944	if err != nil {
5945		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecret", resp, "Failure responding to request")
5946		return
5947	}
5948
5949	return
5950}
5951
5952// DeleteHostSecretPreparer prepares the DeleteHostSecret request.
5953func (client AppsClient) DeleteHostSecretPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string) (*http.Request, error) {
5954	pathParameters := map[string]interface{}{
5955		"keyName":           autorest.Encode("path", keyName),
5956		"keyType":           autorest.Encode("path", keyType),
5957		"name":              autorest.Encode("path", name),
5958		"resourceGroupName": autorest.Encode("path", resourceGroupName),
5959		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
5960	}
5961
5962	const APIVersion = "2020-09-01"
5963	queryParameters := map[string]interface{}{
5964		"api-version": APIVersion,
5965	}
5966
5967	preparer := autorest.CreatePreparer(
5968		autorest.AsDelete(),
5969		autorest.WithBaseURL(client.BaseURI),
5970		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}", pathParameters),
5971		autorest.WithQueryParameters(queryParameters))
5972	return preparer.Prepare((&http.Request{}).WithContext(ctx))
5973}
5974
5975// DeleteHostSecretSender sends the DeleteHostSecret request. The method will close the
5976// http.Response Body if it receives an error.
5977func (client AppsClient) DeleteHostSecretSender(req *http.Request) (*http.Response, error) {
5978	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
5979}
5980
5981// DeleteHostSecretResponder handles the response to the DeleteHostSecret request. The method always
5982// closes the http.Response Body.
5983func (client AppsClient) DeleteHostSecretResponder(resp *http.Response) (result autorest.Response, err error) {
5984	err = autorest.Respond(
5985		resp,
5986		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
5987		autorest.ByClosing())
5988	result.Response = resp
5989	return
5990}
5991
5992// DeleteHostSecretSlot description for Delete a host level secret.
5993// Parameters:
5994// resourceGroupName - name of the resource group to which the resource belongs.
5995// name - site name.
5996// keyType - the type of host key.
5997// keyName - the name of the key.
5998// slot - name of the deployment slot.
5999func (client AppsClient) DeleteHostSecretSlot(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (result autorest.Response, err error) {
6000	if tracing.IsEnabled() {
6001		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHostSecretSlot")
6002		defer func() {
6003			sc := -1
6004			if result.Response != nil {
6005				sc = result.Response.StatusCode
6006			}
6007			tracing.EndSpan(ctx, sc, err)
6008		}()
6009	}
6010	if err := validation.Validate([]validation.Validation{
6011		{TargetValue: resourceGroupName,
6012			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6013				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6014				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6015		return result, validation.NewError("web.AppsClient", "DeleteHostSecretSlot", err.Error())
6016	}
6017
6018	req, err := client.DeleteHostSecretSlotPreparer(ctx, resourceGroupName, name, keyType, keyName, slot)
6019	if err != nil {
6020		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", nil, "Failure preparing request")
6021		return
6022	}
6023
6024	resp, err := client.DeleteHostSecretSlotSender(req)
6025	if err != nil {
6026		result.Response = resp
6027		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure sending request")
6028		return
6029	}
6030
6031	result, err = client.DeleteHostSecretSlotResponder(resp)
6032	if err != nil {
6033		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHostSecretSlot", resp, "Failure responding to request")
6034		return
6035	}
6036
6037	return
6038}
6039
6040// DeleteHostSecretSlotPreparer prepares the DeleteHostSecretSlot request.
6041func (client AppsClient) DeleteHostSecretSlotPreparer(ctx context.Context, resourceGroupName string, name string, keyType string, keyName string, slot string) (*http.Request, error) {
6042	pathParameters := map[string]interface{}{
6043		"keyName":           autorest.Encode("path", keyName),
6044		"keyType":           autorest.Encode("path", keyType),
6045		"name":              autorest.Encode("path", name),
6046		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6047		"slot":              autorest.Encode("path", slot),
6048		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6049	}
6050
6051	const APIVersion = "2020-09-01"
6052	queryParameters := map[string]interface{}{
6053		"api-version": APIVersion,
6054	}
6055
6056	preparer := autorest.CreatePreparer(
6057		autorest.AsDelete(),
6058		autorest.WithBaseURL(client.BaseURI),
6059		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}", pathParameters),
6060		autorest.WithQueryParameters(queryParameters))
6061	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6062}
6063
6064// DeleteHostSecretSlotSender sends the DeleteHostSecretSlot request. The method will close the
6065// http.Response Body if it receives an error.
6066func (client AppsClient) DeleteHostSecretSlotSender(req *http.Request) (*http.Response, error) {
6067	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6068}
6069
6070// DeleteHostSecretSlotResponder handles the response to the DeleteHostSecretSlot request. The method always
6071// closes the http.Response Body.
6072func (client AppsClient) DeleteHostSecretSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6073	err = autorest.Respond(
6074		resp,
6075		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6076		autorest.ByClosing())
6077	result.Response = resp
6078	return
6079}
6080
6081// DeleteHybridConnection description for Removes a Hybrid Connection from this site.
6082// Parameters:
6083// resourceGroupName - name of the resource group to which the resource belongs.
6084// name - the name of the web app.
6085// namespaceName - the namespace for this hybrid connection.
6086// relayName - the relay name for this hybrid connection.
6087func (client AppsClient) DeleteHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) {
6088	if tracing.IsEnabled() {
6089		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnection")
6090		defer func() {
6091			sc := -1
6092			if result.Response != nil {
6093				sc = result.Response.StatusCode
6094			}
6095			tracing.EndSpan(ctx, sc, err)
6096		}()
6097	}
6098	if err := validation.Validate([]validation.Validation{
6099		{TargetValue: resourceGroupName,
6100			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6101				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6102				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6103		return result, validation.NewError("web.AppsClient", "DeleteHybridConnection", err.Error())
6104	}
6105
6106	req, err := client.DeleteHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
6107	if err != nil {
6108		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", nil, "Failure preparing request")
6109		return
6110	}
6111
6112	resp, err := client.DeleteHybridConnectionSender(req)
6113	if err != nil {
6114		result.Response = resp
6115		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure sending request")
6116		return
6117	}
6118
6119	result, err = client.DeleteHybridConnectionResponder(resp)
6120	if err != nil {
6121		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnection", resp, "Failure responding to request")
6122		return
6123	}
6124
6125	return
6126}
6127
6128// DeleteHybridConnectionPreparer prepares the DeleteHybridConnection request.
6129func (client AppsClient) DeleteHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
6130	pathParameters := map[string]interface{}{
6131		"name":              autorest.Encode("path", name),
6132		"namespaceName":     autorest.Encode("path", namespaceName),
6133		"relayName":         autorest.Encode("path", relayName),
6134		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6135		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6136	}
6137
6138	const APIVersion = "2020-09-01"
6139	queryParameters := map[string]interface{}{
6140		"api-version": APIVersion,
6141	}
6142
6143	preparer := autorest.CreatePreparer(
6144		autorest.AsDelete(),
6145		autorest.WithBaseURL(client.BaseURI),
6146		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
6147		autorest.WithQueryParameters(queryParameters))
6148	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6149}
6150
6151// DeleteHybridConnectionSender sends the DeleteHybridConnection request. The method will close the
6152// http.Response Body if it receives an error.
6153func (client AppsClient) DeleteHybridConnectionSender(req *http.Request) (*http.Response, error) {
6154	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6155}
6156
6157// DeleteHybridConnectionResponder handles the response to the DeleteHybridConnection request. The method always
6158// closes the http.Response Body.
6159func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
6160	err = autorest.Respond(
6161		resp,
6162		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
6163		autorest.ByClosing())
6164	result.Response = resp
6165	return
6166}
6167
6168// DeleteHybridConnectionSlot description for Removes a Hybrid Connection from this site.
6169// Parameters:
6170// resourceGroupName - name of the resource group to which the resource belongs.
6171// name - the name of the web app.
6172// namespaceName - the namespace for this hybrid connection.
6173// relayName - the relay name for this hybrid connection.
6174// slot - the name of the slot for the web app.
6175func (client AppsClient) DeleteHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) {
6176	if tracing.IsEnabled() {
6177		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteHybridConnectionSlot")
6178		defer func() {
6179			sc := -1
6180			if result.Response != nil {
6181				sc = result.Response.StatusCode
6182			}
6183			tracing.EndSpan(ctx, sc, err)
6184		}()
6185	}
6186	if err := validation.Validate([]validation.Validation{
6187		{TargetValue: resourceGroupName,
6188			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6189				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6190				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6191		return result, validation.NewError("web.AppsClient", "DeleteHybridConnectionSlot", err.Error())
6192	}
6193
6194	req, err := client.DeleteHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
6195	if err != nil {
6196		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", nil, "Failure preparing request")
6197		return
6198	}
6199
6200	resp, err := client.DeleteHybridConnectionSlotSender(req)
6201	if err != nil {
6202		result.Response = resp
6203		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure sending request")
6204		return
6205	}
6206
6207	result, err = client.DeleteHybridConnectionSlotResponder(resp)
6208	if err != nil {
6209		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteHybridConnectionSlot", resp, "Failure responding to request")
6210		return
6211	}
6212
6213	return
6214}
6215
6216// DeleteHybridConnectionSlotPreparer prepares the DeleteHybridConnectionSlot request.
6217func (client AppsClient) DeleteHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
6218	pathParameters := map[string]interface{}{
6219		"name":              autorest.Encode("path", name),
6220		"namespaceName":     autorest.Encode("path", namespaceName),
6221		"relayName":         autorest.Encode("path", relayName),
6222		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6223		"slot":              autorest.Encode("path", slot),
6224		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6225	}
6226
6227	const APIVersion = "2020-09-01"
6228	queryParameters := map[string]interface{}{
6229		"api-version": APIVersion,
6230	}
6231
6232	preparer := autorest.CreatePreparer(
6233		autorest.AsDelete(),
6234		autorest.WithBaseURL(client.BaseURI),
6235		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
6236		autorest.WithQueryParameters(queryParameters))
6237	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6238}
6239
6240// DeleteHybridConnectionSlotSender sends the DeleteHybridConnectionSlot request. The method will close the
6241// http.Response Body if it receives an error.
6242func (client AppsClient) DeleteHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
6243	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6244}
6245
6246// DeleteHybridConnectionSlotResponder handles the response to the DeleteHybridConnectionSlot request. The method always
6247// closes the http.Response Body.
6248func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6249	err = autorest.Respond(
6250		resp,
6251		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
6252		autorest.ByClosing())
6253	result.Response = resp
6254	return
6255}
6256
6257// DeleteInstanceFunctionSlot description for Delete a function for web site, or a deployment slot.
6258// Parameters:
6259// resourceGroupName - name of the resource group to which the resource belongs.
6260// name - site name.
6261// functionName - function name.
6262// slot - name of the deployment slot.
6263func (client AppsClient) DeleteInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) {
6264	if tracing.IsEnabled() {
6265		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceFunctionSlot")
6266		defer func() {
6267			sc := -1
6268			if result.Response != nil {
6269				sc = result.Response.StatusCode
6270			}
6271			tracing.EndSpan(ctx, sc, err)
6272		}()
6273	}
6274	if err := validation.Validate([]validation.Validation{
6275		{TargetValue: resourceGroupName,
6276			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6277				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6278				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6279		return result, validation.NewError("web.AppsClient", "DeleteInstanceFunctionSlot", err.Error())
6280	}
6281
6282	req, err := client.DeleteInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
6283	if err != nil {
6284		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request")
6285		return
6286	}
6287
6288	resp, err := client.DeleteInstanceFunctionSlotSender(req)
6289	if err != nil {
6290		result.Response = resp
6291		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request")
6292		return
6293	}
6294
6295	result, err = client.DeleteInstanceFunctionSlotResponder(resp)
6296	if err != nil {
6297		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request")
6298		return
6299	}
6300
6301	return
6302}
6303
6304// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request.
6305func (client AppsClient) DeleteInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
6306	pathParameters := map[string]interface{}{
6307		"functionName":      autorest.Encode("path", functionName),
6308		"name":              autorest.Encode("path", name),
6309		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6310		"slot":              autorest.Encode("path", slot),
6311		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6312	}
6313
6314	const APIVersion = "2020-09-01"
6315	queryParameters := map[string]interface{}{
6316		"api-version": APIVersion,
6317	}
6318
6319	preparer := autorest.CreatePreparer(
6320		autorest.AsDelete(),
6321		autorest.WithBaseURL(client.BaseURI),
6322		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
6323		autorest.WithQueryParameters(queryParameters))
6324	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6325}
6326
6327// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the
6328// http.Response Body if it receives an error.
6329func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) {
6330	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6331}
6332
6333// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always
6334// closes the http.Response Body.
6335func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6336	err = autorest.Respond(
6337		resp,
6338		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6339		autorest.ByClosing())
6340	result.Response = resp
6341	return
6342}
6343
6344// DeleteInstanceProcess description for Terminate a process by its ID for a web site, or a deployment slot, or
6345// specific scaled-out instance in a web site.
6346// Parameters:
6347// resourceGroupName - name of the resource group to which the resource belongs.
6348// name - site name.
6349// processID - pID.
6350// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
6351// response from "GET api/sites/{siteName}/instances".
6352func (client AppsClient) DeleteInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) {
6353	if tracing.IsEnabled() {
6354		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcess")
6355		defer func() {
6356			sc := -1
6357			if result.Response != nil {
6358				sc = result.Response.StatusCode
6359			}
6360			tracing.EndSpan(ctx, sc, err)
6361		}()
6362	}
6363	if err := validation.Validate([]validation.Validation{
6364		{TargetValue: resourceGroupName,
6365			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6366				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6367				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6368		return result, validation.NewError("web.AppsClient", "DeleteInstanceProcess", err.Error())
6369	}
6370
6371	req, err := client.DeleteInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID)
6372	if err != nil {
6373		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request")
6374		return
6375	}
6376
6377	resp, err := client.DeleteInstanceProcessSender(req)
6378	if err != nil {
6379		result.Response = resp
6380		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request")
6381		return
6382	}
6383
6384	result, err = client.DeleteInstanceProcessResponder(resp)
6385	if err != nil {
6386		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request")
6387		return
6388	}
6389
6390	return
6391}
6392
6393// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request.
6394func (client AppsClient) DeleteInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
6395	pathParameters := map[string]interface{}{
6396		"instanceId":        autorest.Encode("path", instanceID),
6397		"name":              autorest.Encode("path", name),
6398		"processId":         autorest.Encode("path", processID),
6399		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6400		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6401	}
6402
6403	const APIVersion = "2020-09-01"
6404	queryParameters := map[string]interface{}{
6405		"api-version": APIVersion,
6406	}
6407
6408	preparer := autorest.CreatePreparer(
6409		autorest.AsDelete(),
6410		autorest.WithBaseURL(client.BaseURI),
6411		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters),
6412		autorest.WithQueryParameters(queryParameters))
6413	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6414}
6415
6416// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the
6417// http.Response Body if it receives an error.
6418func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) {
6419	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6420}
6421
6422// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always
6423// closes the http.Response Body.
6424func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) {
6425	err = autorest.Respond(
6426		resp,
6427		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6428		autorest.ByClosing())
6429	result.Response = resp
6430	return
6431}
6432
6433// DeleteInstanceProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or
6434// specific scaled-out instance in a web site.
6435// Parameters:
6436// resourceGroupName - name of the resource group to which the resource belongs.
6437// name - site name.
6438// processID - pID.
6439// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
6440// production slot.
6441// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
6442// response from "GET api/sites/{siteName}/instances".
6443func (client AppsClient) DeleteInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) {
6444	if tracing.IsEnabled() {
6445		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteInstanceProcessSlot")
6446		defer func() {
6447			sc := -1
6448			if result.Response != nil {
6449				sc = result.Response.StatusCode
6450			}
6451			tracing.EndSpan(ctx, sc, err)
6452		}()
6453	}
6454	if err := validation.Validate([]validation.Validation{
6455		{TargetValue: resourceGroupName,
6456			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6457				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6458				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6459		return result, validation.NewError("web.AppsClient", "DeleteInstanceProcessSlot", err.Error())
6460	}
6461
6462	req, err := client.DeleteInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
6463	if err != nil {
6464		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request")
6465		return
6466	}
6467
6468	resp, err := client.DeleteInstanceProcessSlotSender(req)
6469	if err != nil {
6470		result.Response = resp
6471		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request")
6472		return
6473	}
6474
6475	result, err = client.DeleteInstanceProcessSlotResponder(resp)
6476	if err != nil {
6477		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request")
6478		return
6479	}
6480
6481	return
6482}
6483
6484// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request.
6485func (client AppsClient) DeleteInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
6486	pathParameters := map[string]interface{}{
6487		"instanceId":        autorest.Encode("path", instanceID),
6488		"name":              autorest.Encode("path", name),
6489		"processId":         autorest.Encode("path", processID),
6490		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6491		"slot":              autorest.Encode("path", slot),
6492		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6493	}
6494
6495	const APIVersion = "2020-09-01"
6496	queryParameters := map[string]interface{}{
6497		"api-version": APIVersion,
6498	}
6499
6500	preparer := autorest.CreatePreparer(
6501		autorest.AsDelete(),
6502		autorest.WithBaseURL(client.BaseURI),
6503		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters),
6504		autorest.WithQueryParameters(queryParameters))
6505	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6506}
6507
6508// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the
6509// http.Response Body if it receives an error.
6510func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) {
6511	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6512}
6513
6514// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always
6515// closes the http.Response Body.
6516func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6517	err = autorest.Respond(
6518		resp,
6519		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6520		autorest.ByClosing())
6521	result.Response = resp
6522	return
6523}
6524
6525// DeletePremierAddOn description for Delete a premier add-on from an app.
6526// Parameters:
6527// resourceGroupName - name of the resource group to which the resource belongs.
6528// name - name of the app.
6529// premierAddOnName - add-on name.
6530func (client AppsClient) DeletePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) {
6531	if tracing.IsEnabled() {
6532		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOn")
6533		defer func() {
6534			sc := -1
6535			if result.Response != nil {
6536				sc = result.Response.StatusCode
6537			}
6538			tracing.EndSpan(ctx, sc, err)
6539		}()
6540	}
6541	if err := validation.Validate([]validation.Validation{
6542		{TargetValue: resourceGroupName,
6543			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6544				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6545				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6546		return result, validation.NewError("web.AppsClient", "DeletePremierAddOn", err.Error())
6547	}
6548
6549	req, err := client.DeletePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName)
6550	if err != nil {
6551		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", nil, "Failure preparing request")
6552		return
6553	}
6554
6555	resp, err := client.DeletePremierAddOnSender(req)
6556	if err != nil {
6557		result.Response = resp
6558		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure sending request")
6559		return
6560	}
6561
6562	result, err = client.DeletePremierAddOnResponder(resp)
6563	if err != nil {
6564		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOn", resp, "Failure responding to request")
6565		return
6566	}
6567
6568	return
6569}
6570
6571// DeletePremierAddOnPreparer prepares the DeletePremierAddOn request.
6572func (client AppsClient) DeletePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) {
6573	pathParameters := map[string]interface{}{
6574		"name":              autorest.Encode("path", name),
6575		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
6576		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6577		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6578	}
6579
6580	const APIVersion = "2020-09-01"
6581	queryParameters := map[string]interface{}{
6582		"api-version": APIVersion,
6583	}
6584
6585	preparer := autorest.CreatePreparer(
6586		autorest.AsDelete(),
6587		autorest.WithBaseURL(client.BaseURI),
6588		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
6589		autorest.WithQueryParameters(queryParameters))
6590	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6591}
6592
6593// DeletePremierAddOnSender sends the DeletePremierAddOn request. The method will close the
6594// http.Response Body if it receives an error.
6595func (client AppsClient) DeletePremierAddOnSender(req *http.Request) (*http.Response, error) {
6596	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6597}
6598
6599// DeletePremierAddOnResponder handles the response to the DeletePremierAddOn request. The method always
6600// closes the http.Response Body.
6601func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (result autorest.Response, err error) {
6602	err = autorest.Respond(
6603		resp,
6604		azure.WithErrorUnlessStatusCode(http.StatusOK),
6605		autorest.ByClosing())
6606	result.Response = resp
6607	return
6608}
6609
6610// DeletePremierAddOnSlot description for Delete a premier add-on from an app.
6611// Parameters:
6612// resourceGroupName - name of the resource group to which the resource belongs.
6613// name - name of the app.
6614// premierAddOnName - add-on name.
6615// slot - name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the
6616// production slot.
6617func (client AppsClient) DeletePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) {
6618	if tracing.IsEnabled() {
6619		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePremierAddOnSlot")
6620		defer func() {
6621			sc := -1
6622			if result.Response != nil {
6623				sc = result.Response.StatusCode
6624			}
6625			tracing.EndSpan(ctx, sc, err)
6626		}()
6627	}
6628	if err := validation.Validate([]validation.Validation{
6629		{TargetValue: resourceGroupName,
6630			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6631				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6632				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6633		return result, validation.NewError("web.AppsClient", "DeletePremierAddOnSlot", err.Error())
6634	}
6635
6636	req, err := client.DeletePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot)
6637	if err != nil {
6638		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", nil, "Failure preparing request")
6639		return
6640	}
6641
6642	resp, err := client.DeletePremierAddOnSlotSender(req)
6643	if err != nil {
6644		result.Response = resp
6645		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure sending request")
6646		return
6647	}
6648
6649	result, err = client.DeletePremierAddOnSlotResponder(resp)
6650	if err != nil {
6651		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePremierAddOnSlot", resp, "Failure responding to request")
6652		return
6653	}
6654
6655	return
6656}
6657
6658// DeletePremierAddOnSlotPreparer prepares the DeletePremierAddOnSlot request.
6659func (client AppsClient) DeletePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) {
6660	pathParameters := map[string]interface{}{
6661		"name":              autorest.Encode("path", name),
6662		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
6663		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6664		"slot":              autorest.Encode("path", slot),
6665		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6666	}
6667
6668	const APIVersion = "2020-09-01"
6669	queryParameters := map[string]interface{}{
6670		"api-version": APIVersion,
6671	}
6672
6673	preparer := autorest.CreatePreparer(
6674		autorest.AsDelete(),
6675		autorest.WithBaseURL(client.BaseURI),
6676		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
6677		autorest.WithQueryParameters(queryParameters))
6678	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6679}
6680
6681// DeletePremierAddOnSlotSender sends the DeletePremierAddOnSlot request. The method will close the
6682// http.Response Body if it receives an error.
6683func (client AppsClient) DeletePremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
6684	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6685}
6686
6687// DeletePremierAddOnSlotResponder handles the response to the DeletePremierAddOnSlot request. The method always
6688// closes the http.Response Body.
6689func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6690	err = autorest.Respond(
6691		resp,
6692		azure.WithErrorUnlessStatusCode(http.StatusOK),
6693		autorest.ByClosing())
6694	result.Response = resp
6695	return
6696}
6697
6698// DeletePrivateEndpointConnection description for Deletes a private endpoint connection
6699// Parameters:
6700// resourceGroupName - name of the resource group to which the resource belongs.
6701// name - name of the site.
6702func (client AppsClient) DeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result AppsDeletePrivateEndpointConnectionFuture, err error) {
6703	if tracing.IsEnabled() {
6704		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePrivateEndpointConnection")
6705		defer func() {
6706			sc := -1
6707			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
6708				sc = result.FutureAPI.Response().StatusCode
6709			}
6710			tracing.EndSpan(ctx, sc, err)
6711		}()
6712	}
6713	if err := validation.Validate([]validation.Validation{
6714		{TargetValue: resourceGroupName,
6715			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6716				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6717				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6718		return result, validation.NewError("web.AppsClient", "DeletePrivateEndpointConnection", err.Error())
6719	}
6720
6721	req, err := client.DeletePrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName)
6722	if err != nil {
6723		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePrivateEndpointConnection", nil, "Failure preparing request")
6724		return
6725	}
6726
6727	result, err = client.DeletePrivateEndpointConnectionSender(req)
6728	if err != nil {
6729		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePrivateEndpointConnection", nil, "Failure sending request")
6730		return
6731	}
6732
6733	return
6734}
6735
6736// DeletePrivateEndpointConnectionPreparer prepares the DeletePrivateEndpointConnection request.
6737func (client AppsClient) DeletePrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) {
6738	pathParameters := map[string]interface{}{
6739		"name":                          autorest.Encode("path", name),
6740		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
6741		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
6742		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
6743	}
6744
6745	const APIVersion = "2020-09-01"
6746	queryParameters := map[string]interface{}{
6747		"api-version": APIVersion,
6748	}
6749
6750	preparer := autorest.CreatePreparer(
6751		autorest.AsDelete(),
6752		autorest.WithBaseURL(client.BaseURI),
6753		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
6754		autorest.WithQueryParameters(queryParameters))
6755	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6756}
6757
6758// DeletePrivateEndpointConnectionSender sends the DeletePrivateEndpointConnection request. The method will close the
6759// http.Response Body if it receives an error.
6760func (client AppsClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future AppsDeletePrivateEndpointConnectionFuture, err error) {
6761	var resp *http.Response
6762	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
6763	if err != nil {
6764		return
6765	}
6766	var azf azure.Future
6767	azf, err = azure.NewFutureFromResponse(resp)
6768	future.FutureAPI = &azf
6769	future.Result = func(client AppsClient) (so SetObject, err error) {
6770		var done bool
6771		done, err = future.DoneWithContext(context.Background(), client)
6772		if err != nil {
6773			err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
6774			return
6775		}
6776		if !done {
6777			err = azure.NewAsyncOpIncompleteError("web.AppsDeletePrivateEndpointConnectionFuture")
6778			return
6779		}
6780		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
6781		so.Response.Response, err = future.GetResult(sender)
6782		if so.Response.Response == nil && err == nil {
6783			err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", nil, "received nil response and error")
6784		}
6785		if err == nil && so.Response.Response.StatusCode != http.StatusNoContent {
6786			so, err = client.DeletePrivateEndpointConnectionResponder(so.Response.Response)
6787			if err != nil {
6788				err = autorest.NewErrorWithError(err, "web.AppsDeletePrivateEndpointConnectionFuture", "Result", so.Response.Response, "Failure responding to request")
6789			}
6790		}
6791		return
6792	}
6793	return
6794}
6795
6796// DeletePrivateEndpointConnectionResponder handles the response to the DeletePrivateEndpointConnection request. The method always
6797// closes the http.Response Body.
6798func (client AppsClient) DeletePrivateEndpointConnectionResponder(resp *http.Response) (result SetObject, err error) {
6799	err = autorest.Respond(
6800		resp,
6801		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
6802		autorest.ByUnmarshallingJSON(&result),
6803		autorest.ByClosing())
6804	result.Response = autorest.Response{Response: resp}
6805	return
6806}
6807
6808// DeleteProcess description for Terminate a process by its ID for a web site, or a deployment slot, or specific
6809// scaled-out instance in a web site.
6810// Parameters:
6811// resourceGroupName - name of the resource group to which the resource belongs.
6812// name - site name.
6813// processID - pID.
6814func (client AppsClient) DeleteProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result autorest.Response, err error) {
6815	if tracing.IsEnabled() {
6816		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcess")
6817		defer func() {
6818			sc := -1
6819			if result.Response != nil {
6820				sc = result.Response.StatusCode
6821			}
6822			tracing.EndSpan(ctx, sc, err)
6823		}()
6824	}
6825	if err := validation.Validate([]validation.Validation{
6826		{TargetValue: resourceGroupName,
6827			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6828				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6829				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6830		return result, validation.NewError("web.AppsClient", "DeleteProcess", err.Error())
6831	}
6832
6833	req, err := client.DeleteProcessPreparer(ctx, resourceGroupName, name, processID)
6834	if err != nil {
6835		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request")
6836		return
6837	}
6838
6839	resp, err := client.DeleteProcessSender(req)
6840	if err != nil {
6841		result.Response = resp
6842		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request")
6843		return
6844	}
6845
6846	result, err = client.DeleteProcessResponder(resp)
6847	if err != nil {
6848		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request")
6849		return
6850	}
6851
6852	return
6853}
6854
6855// DeleteProcessPreparer prepares the DeleteProcess request.
6856func (client AppsClient) DeleteProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
6857	pathParameters := map[string]interface{}{
6858		"name":              autorest.Encode("path", name),
6859		"processId":         autorest.Encode("path", processID),
6860		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6861		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6862	}
6863
6864	const APIVersion = "2020-09-01"
6865	queryParameters := map[string]interface{}{
6866		"api-version": APIVersion,
6867	}
6868
6869	preparer := autorest.CreatePreparer(
6870		autorest.AsDelete(),
6871		autorest.WithBaseURL(client.BaseURI),
6872		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters),
6873		autorest.WithQueryParameters(queryParameters))
6874	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6875}
6876
6877// DeleteProcessSender sends the DeleteProcess request. The method will close the
6878// http.Response Body if it receives an error.
6879func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) {
6880	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6881}
6882
6883// DeleteProcessResponder handles the response to the DeleteProcess request. The method always
6884// closes the http.Response Body.
6885func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) {
6886	err = autorest.Respond(
6887		resp,
6888		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6889		autorest.ByClosing())
6890	result.Response = resp
6891	return
6892}
6893
6894// DeleteProcessSlot description for Terminate a process by its ID for a web site, or a deployment slot, or specific
6895// scaled-out instance in a web site.
6896// Parameters:
6897// resourceGroupName - name of the resource group to which the resource belongs.
6898// name - site name.
6899// processID - pID.
6900// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
6901// production slot.
6902func (client AppsClient) DeleteProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) {
6903	if tracing.IsEnabled() {
6904		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteProcessSlot")
6905		defer func() {
6906			sc := -1
6907			if result.Response != nil {
6908				sc = result.Response.StatusCode
6909			}
6910			tracing.EndSpan(ctx, sc, err)
6911		}()
6912	}
6913	if err := validation.Validate([]validation.Validation{
6914		{TargetValue: resourceGroupName,
6915			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
6916				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
6917				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
6918		return result, validation.NewError("web.AppsClient", "DeleteProcessSlot", err.Error())
6919	}
6920
6921	req, err := client.DeleteProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot)
6922	if err != nil {
6923		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request")
6924		return
6925	}
6926
6927	resp, err := client.DeleteProcessSlotSender(req)
6928	if err != nil {
6929		result.Response = resp
6930		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request")
6931		return
6932	}
6933
6934	result, err = client.DeleteProcessSlotResponder(resp)
6935	if err != nil {
6936		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request")
6937		return
6938	}
6939
6940	return
6941}
6942
6943// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request.
6944func (client AppsClient) DeleteProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
6945	pathParameters := map[string]interface{}{
6946		"name":              autorest.Encode("path", name),
6947		"processId":         autorest.Encode("path", processID),
6948		"resourceGroupName": autorest.Encode("path", resourceGroupName),
6949		"slot":              autorest.Encode("path", slot),
6950		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
6951	}
6952
6953	const APIVersion = "2020-09-01"
6954	queryParameters := map[string]interface{}{
6955		"api-version": APIVersion,
6956	}
6957
6958	preparer := autorest.CreatePreparer(
6959		autorest.AsDelete(),
6960		autorest.WithBaseURL(client.BaseURI),
6961		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters),
6962		autorest.WithQueryParameters(queryParameters))
6963	return preparer.Prepare((&http.Request{}).WithContext(ctx))
6964}
6965
6966// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the
6967// http.Response Body if it receives an error.
6968func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) {
6969	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
6970}
6971
6972// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always
6973// closes the http.Response Body.
6974func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) {
6975	err = autorest.Respond(
6976		resp,
6977		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
6978		autorest.ByClosing())
6979	result.Response = resp
6980	return
6981}
6982
6983// DeletePublicCertificate description for Deletes a hostname binding for an app.
6984// Parameters:
6985// resourceGroupName - name of the resource group to which the resource belongs.
6986// name - name of the app.
6987// publicCertificateName - public certificate name.
6988func (client AppsClient) DeletePublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) {
6989	if tracing.IsEnabled() {
6990		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificate")
6991		defer func() {
6992			sc := -1
6993			if result.Response != nil {
6994				sc = result.Response.StatusCode
6995			}
6996			tracing.EndSpan(ctx, sc, err)
6997		}()
6998	}
6999	if err := validation.Validate([]validation.Validation{
7000		{TargetValue: resourceGroupName,
7001			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7002				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7003				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7004		return result, validation.NewError("web.AppsClient", "DeletePublicCertificate", err.Error())
7005	}
7006
7007	req, err := client.DeletePublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName)
7008	if err != nil {
7009		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request")
7010		return
7011	}
7012
7013	resp, err := client.DeletePublicCertificateSender(req)
7014	if err != nil {
7015		result.Response = resp
7016		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request")
7017		return
7018	}
7019
7020	result, err = client.DeletePublicCertificateResponder(resp)
7021	if err != nil {
7022		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request")
7023		return
7024	}
7025
7026	return
7027}
7028
7029// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request.
7030func (client AppsClient) DeletePublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) {
7031	pathParameters := map[string]interface{}{
7032		"name":                  autorest.Encode("path", name),
7033		"publicCertificateName": autorest.Encode("path", publicCertificateName),
7034		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
7035		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
7036	}
7037
7038	const APIVersion = "2020-09-01"
7039	queryParameters := map[string]interface{}{
7040		"api-version": APIVersion,
7041	}
7042
7043	preparer := autorest.CreatePreparer(
7044		autorest.AsDelete(),
7045		autorest.WithBaseURL(client.BaseURI),
7046		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
7047		autorest.WithQueryParameters(queryParameters))
7048	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7049}
7050
7051// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the
7052// http.Response Body if it receives an error.
7053func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) {
7054	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7055}
7056
7057// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always
7058// closes the http.Response Body.
7059func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) {
7060	err = autorest.Respond(
7061		resp,
7062		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7063		autorest.ByClosing())
7064	result.Response = resp
7065	return
7066}
7067
7068// DeletePublicCertificateSlot description for Deletes a hostname binding for an app.
7069// Parameters:
7070// resourceGroupName - name of the resource group to which the resource belongs.
7071// name - name of the app.
7072// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
7073// production slot.
7074// publicCertificateName - public certificate name.
7075func (client AppsClient) DeletePublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) {
7076	if tracing.IsEnabled() {
7077		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeletePublicCertificateSlot")
7078		defer func() {
7079			sc := -1
7080			if result.Response != nil {
7081				sc = result.Response.StatusCode
7082			}
7083			tracing.EndSpan(ctx, sc, err)
7084		}()
7085	}
7086	if err := validation.Validate([]validation.Validation{
7087		{TargetValue: resourceGroupName,
7088			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7089				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7090				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7091		return result, validation.NewError("web.AppsClient", "DeletePublicCertificateSlot", err.Error())
7092	}
7093
7094	req, err := client.DeletePublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName)
7095	if err != nil {
7096		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request")
7097		return
7098	}
7099
7100	resp, err := client.DeletePublicCertificateSlotSender(req)
7101	if err != nil {
7102		result.Response = resp
7103		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request")
7104		return
7105	}
7106
7107	result, err = client.DeletePublicCertificateSlotResponder(resp)
7108	if err != nil {
7109		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request")
7110		return
7111	}
7112
7113	return
7114}
7115
7116// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request.
7117func (client AppsClient) DeletePublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) {
7118	pathParameters := map[string]interface{}{
7119		"name":                  autorest.Encode("path", name),
7120		"publicCertificateName": autorest.Encode("path", publicCertificateName),
7121		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
7122		"slot":                  autorest.Encode("path", slot),
7123		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
7124	}
7125
7126	const APIVersion = "2020-09-01"
7127	queryParameters := map[string]interface{}{
7128		"api-version": APIVersion,
7129	}
7130
7131	preparer := autorest.CreatePreparer(
7132		autorest.AsDelete(),
7133		autorest.WithBaseURL(client.BaseURI),
7134		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
7135		autorest.WithQueryParameters(queryParameters))
7136	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7137}
7138
7139// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the
7140// http.Response Body if it receives an error.
7141func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
7142	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7143}
7144
7145// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always
7146// closes the http.Response Body.
7147func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7148	err = autorest.Respond(
7149		resp,
7150		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
7151		autorest.ByClosing())
7152	result.Response = resp
7153	return
7154}
7155
7156// DeleteRelayServiceConnection description for Deletes a relay service connection by its name.
7157// Parameters:
7158// resourceGroupName - name of the resource group to which the resource belongs.
7159// name - name of the app.
7160// entityName - name of the hybrid connection configuration.
7161func (client AppsClient) DeleteRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result autorest.Response, err error) {
7162	if tracing.IsEnabled() {
7163		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnection")
7164		defer func() {
7165			sc := -1
7166			if result.Response != nil {
7167				sc = result.Response.StatusCode
7168			}
7169			tracing.EndSpan(ctx, sc, err)
7170		}()
7171	}
7172	if err := validation.Validate([]validation.Validation{
7173		{TargetValue: resourceGroupName,
7174			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7175				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7176				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7177		return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnection", err.Error())
7178	}
7179
7180	req, err := client.DeleteRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName)
7181	if err != nil {
7182		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", nil, "Failure preparing request")
7183		return
7184	}
7185
7186	resp, err := client.DeleteRelayServiceConnectionSender(req)
7187	if err != nil {
7188		result.Response = resp
7189		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure sending request")
7190		return
7191	}
7192
7193	result, err = client.DeleteRelayServiceConnectionResponder(resp)
7194	if err != nil {
7195		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnection", resp, "Failure responding to request")
7196		return
7197	}
7198
7199	return
7200}
7201
7202// DeleteRelayServiceConnectionPreparer prepares the DeleteRelayServiceConnection request.
7203func (client AppsClient) DeleteRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) {
7204	pathParameters := map[string]interface{}{
7205		"entityName":        autorest.Encode("path", entityName),
7206		"name":              autorest.Encode("path", name),
7207		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7208		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7209	}
7210
7211	const APIVersion = "2020-09-01"
7212	queryParameters := map[string]interface{}{
7213		"api-version": APIVersion,
7214	}
7215
7216	preparer := autorest.CreatePreparer(
7217		autorest.AsDelete(),
7218		autorest.WithBaseURL(client.BaseURI),
7219		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
7220		autorest.WithQueryParameters(queryParameters))
7221	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7222}
7223
7224// DeleteRelayServiceConnectionSender sends the DeleteRelayServiceConnection request. The method will close the
7225// http.Response Body if it receives an error.
7226func (client AppsClient) DeleteRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
7227	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7228}
7229
7230// DeleteRelayServiceConnectionResponder handles the response to the DeleteRelayServiceConnection request. The method always
7231// closes the http.Response Body.
7232func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
7233	err = autorest.Respond(
7234		resp,
7235		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7236		autorest.ByClosing())
7237	result.Response = resp
7238	return
7239}
7240
7241// DeleteRelayServiceConnectionSlot description for Deletes a relay service connection by its name.
7242// Parameters:
7243// resourceGroupName - name of the resource group to which the resource belongs.
7244// name - name of the app.
7245// entityName - name of the hybrid connection configuration.
7246// slot - name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for
7247// the production slot.
7248func (client AppsClient) DeleteRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) {
7249	if tracing.IsEnabled() {
7250		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteRelayServiceConnectionSlot")
7251		defer func() {
7252			sc := -1
7253			if result.Response != nil {
7254				sc = result.Response.StatusCode
7255			}
7256			tracing.EndSpan(ctx, sc, err)
7257		}()
7258	}
7259	if err := validation.Validate([]validation.Validation{
7260		{TargetValue: resourceGroupName,
7261			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7262				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7263				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7264		return result, validation.NewError("web.AppsClient", "DeleteRelayServiceConnectionSlot", err.Error())
7265	}
7266
7267	req, err := client.DeleteRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot)
7268	if err != nil {
7269		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", nil, "Failure preparing request")
7270		return
7271	}
7272
7273	resp, err := client.DeleteRelayServiceConnectionSlotSender(req)
7274	if err != nil {
7275		result.Response = resp
7276		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure sending request")
7277		return
7278	}
7279
7280	result, err = client.DeleteRelayServiceConnectionSlotResponder(resp)
7281	if err != nil {
7282		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteRelayServiceConnectionSlot", resp, "Failure responding to request")
7283		return
7284	}
7285
7286	return
7287}
7288
7289// DeleteRelayServiceConnectionSlotPreparer prepares the DeleteRelayServiceConnectionSlot request.
7290func (client AppsClient) DeleteRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) {
7291	pathParameters := map[string]interface{}{
7292		"entityName":        autorest.Encode("path", entityName),
7293		"name":              autorest.Encode("path", name),
7294		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7295		"slot":              autorest.Encode("path", slot),
7296		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7297	}
7298
7299	const APIVersion = "2020-09-01"
7300	queryParameters := map[string]interface{}{
7301		"api-version": APIVersion,
7302	}
7303
7304	preparer := autorest.CreatePreparer(
7305		autorest.AsDelete(),
7306		autorest.WithBaseURL(client.BaseURI),
7307		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
7308		autorest.WithQueryParameters(queryParameters))
7309	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7310}
7311
7312// DeleteRelayServiceConnectionSlotSender sends the DeleteRelayServiceConnectionSlot request. The method will close the
7313// http.Response Body if it receives an error.
7314func (client AppsClient) DeleteRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
7315	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7316}
7317
7318// DeleteRelayServiceConnectionSlotResponder handles the response to the DeleteRelayServiceConnectionSlot request. The method always
7319// closes the http.Response Body.
7320func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7321	err = autorest.Respond(
7322		resp,
7323		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7324		autorest.ByClosing())
7325	result.Response = resp
7326	return
7327}
7328
7329// DeleteSiteExtension description for Remove a site extension from a web site, or a deployment slot.
7330// Parameters:
7331// resourceGroupName - name of the resource group to which the resource belongs.
7332// name - site name.
7333// siteExtensionID - site extension name.
7334func (client AppsClient) DeleteSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result autorest.Response, err error) {
7335	if tracing.IsEnabled() {
7336		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtension")
7337		defer func() {
7338			sc := -1
7339			if result.Response != nil {
7340				sc = result.Response.StatusCode
7341			}
7342			tracing.EndSpan(ctx, sc, err)
7343		}()
7344	}
7345	if err := validation.Validate([]validation.Validation{
7346		{TargetValue: resourceGroupName,
7347			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7348				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7349				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7350		return result, validation.NewError("web.AppsClient", "DeleteSiteExtension", err.Error())
7351	}
7352
7353	req, err := client.DeleteSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
7354	if err != nil {
7355		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request")
7356		return
7357	}
7358
7359	resp, err := client.DeleteSiteExtensionSender(req)
7360	if err != nil {
7361		result.Response = resp
7362		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request")
7363		return
7364	}
7365
7366	result, err = client.DeleteSiteExtensionResponder(resp)
7367	if err != nil {
7368		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request")
7369		return
7370	}
7371
7372	return
7373}
7374
7375// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request.
7376func (client AppsClient) DeleteSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
7377	pathParameters := map[string]interface{}{
7378		"name":              autorest.Encode("path", name),
7379		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7380		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
7381		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7382	}
7383
7384	const APIVersion = "2020-09-01"
7385	queryParameters := map[string]interface{}{
7386		"api-version": APIVersion,
7387	}
7388
7389	preparer := autorest.CreatePreparer(
7390		autorest.AsDelete(),
7391		autorest.WithBaseURL(client.BaseURI),
7392		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
7393		autorest.WithQueryParameters(queryParameters))
7394	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7395}
7396
7397// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the
7398// http.Response Body if it receives an error.
7399func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) {
7400	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7401}
7402
7403// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always
7404// closes the http.Response Body.
7405func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) {
7406	err = autorest.Respond(
7407		resp,
7408		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
7409		autorest.ByClosing())
7410	result.Response = resp
7411	return
7412}
7413
7414// DeleteSiteExtensionSlot description for Remove a site extension from a web site, or a deployment slot.
7415// Parameters:
7416// resourceGroupName - name of the resource group to which the resource belongs.
7417// name - site name.
7418// siteExtensionID - site extension name.
7419// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
7420// production slot.
7421func (client AppsClient) DeleteSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result autorest.Response, err error) {
7422	if tracing.IsEnabled() {
7423		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSiteExtensionSlot")
7424		defer func() {
7425			sc := -1
7426			if result.Response != nil {
7427				sc = result.Response.StatusCode
7428			}
7429			tracing.EndSpan(ctx, sc, err)
7430		}()
7431	}
7432	if err := validation.Validate([]validation.Validation{
7433		{TargetValue: resourceGroupName,
7434			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7435				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7436				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7437		return result, validation.NewError("web.AppsClient", "DeleteSiteExtensionSlot", err.Error())
7438	}
7439
7440	req, err := client.DeleteSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
7441	if err != nil {
7442		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request")
7443		return
7444	}
7445
7446	resp, err := client.DeleteSiteExtensionSlotSender(req)
7447	if err != nil {
7448		result.Response = resp
7449		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request")
7450		return
7451	}
7452
7453	result, err = client.DeleteSiteExtensionSlotResponder(resp)
7454	if err != nil {
7455		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request")
7456		return
7457	}
7458
7459	return
7460}
7461
7462// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request.
7463func (client AppsClient) DeleteSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
7464	pathParameters := map[string]interface{}{
7465		"name":              autorest.Encode("path", name),
7466		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7467		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
7468		"slot":              autorest.Encode("path", slot),
7469		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7470	}
7471
7472	const APIVersion = "2020-09-01"
7473	queryParameters := map[string]interface{}{
7474		"api-version": APIVersion,
7475	}
7476
7477	preparer := autorest.CreatePreparer(
7478		autorest.AsDelete(),
7479		autorest.WithBaseURL(client.BaseURI),
7480		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
7481		autorest.WithQueryParameters(queryParameters))
7482	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7483}
7484
7485// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the
7486// http.Response Body if it receives an error.
7487func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) {
7488	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7489}
7490
7491// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always
7492// closes the http.Response Body.
7493func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7494	err = autorest.Respond(
7495		resp,
7496		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
7497		autorest.ByClosing())
7498	result.Response = resp
7499	return
7500}
7501
7502// DeleteSlot description for Deletes a web, mobile, or API app, or one of the deployment slots.
7503// Parameters:
7504// resourceGroupName - name of the resource group to which the resource belongs.
7505// name - name of the app to delete.
7506// slot - name of the deployment slot to delete. By default, the API deletes the production slot.
7507// deleteMetrics - if true, web app metrics are also deleted.
7508// deleteEmptyServerFarm - specify true if the App Service plan will be empty after app deletion and you want
7509// to delete the empty App Service plan. By default, the empty App Service plan is not deleted.
7510func (client AppsClient) DeleteSlot(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (result autorest.Response, err error) {
7511	if tracing.IsEnabled() {
7512		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSlot")
7513		defer func() {
7514			sc := -1
7515			if result.Response != nil {
7516				sc = result.Response.StatusCode
7517			}
7518			tracing.EndSpan(ctx, sc, err)
7519		}()
7520	}
7521	if err := validation.Validate([]validation.Validation{
7522		{TargetValue: resourceGroupName,
7523			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7524				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7525				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7526		return result, validation.NewError("web.AppsClient", "DeleteSlot", err.Error())
7527	}
7528
7529	req, err := client.DeleteSlotPreparer(ctx, resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm)
7530	if err != nil {
7531		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", nil, "Failure preparing request")
7532		return
7533	}
7534
7535	resp, err := client.DeleteSlotSender(req)
7536	if err != nil {
7537		result.Response = resp
7538		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure sending request")
7539		return
7540	}
7541
7542	result, err = client.DeleteSlotResponder(resp)
7543	if err != nil {
7544		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSlot", resp, "Failure responding to request")
7545		return
7546	}
7547
7548	return
7549}
7550
7551// DeleteSlotPreparer prepares the DeleteSlot request.
7552func (client AppsClient) DeleteSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool) (*http.Request, error) {
7553	pathParameters := map[string]interface{}{
7554		"name":              autorest.Encode("path", name),
7555		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7556		"slot":              autorest.Encode("path", slot),
7557		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7558	}
7559
7560	const APIVersion = "2020-09-01"
7561	queryParameters := map[string]interface{}{
7562		"api-version": APIVersion,
7563	}
7564	if deleteMetrics != nil {
7565		queryParameters["deleteMetrics"] = autorest.Encode("query", *deleteMetrics)
7566	}
7567	if deleteEmptyServerFarm != nil {
7568		queryParameters["deleteEmptyServerFarm"] = autorest.Encode("query", *deleteEmptyServerFarm)
7569	}
7570
7571	preparer := autorest.CreatePreparer(
7572		autorest.AsDelete(),
7573		autorest.WithBaseURL(client.BaseURI),
7574		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
7575		autorest.WithQueryParameters(queryParameters))
7576	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7577}
7578
7579// DeleteSlotSender sends the DeleteSlot request. The method will close the
7580// http.Response Body if it receives an error.
7581func (client AppsClient) DeleteSlotSender(req *http.Request) (*http.Response, error) {
7582	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7583}
7584
7585// DeleteSlotResponder handles the response to the DeleteSlot request. The method always
7586// closes the http.Response Body.
7587func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7588	err = autorest.Respond(
7589		resp,
7590		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound),
7591		autorest.ByClosing())
7592	result.Response = resp
7593	return
7594}
7595
7596// DeleteSourceControl description for Deletes the source control configuration of an app.
7597// Parameters:
7598// resourceGroupName - name of the resource group to which the resource belongs.
7599// name - name of the app.
7600func (client AppsClient) DeleteSourceControl(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
7601	if tracing.IsEnabled() {
7602		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControl")
7603		defer func() {
7604			sc := -1
7605			if result.Response != nil {
7606				sc = result.Response.StatusCode
7607			}
7608			tracing.EndSpan(ctx, sc, err)
7609		}()
7610	}
7611	if err := validation.Validate([]validation.Validation{
7612		{TargetValue: resourceGroupName,
7613			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7614				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7615				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7616		return result, validation.NewError("web.AppsClient", "DeleteSourceControl", err.Error())
7617	}
7618
7619	req, err := client.DeleteSourceControlPreparer(ctx, resourceGroupName, name)
7620	if err != nil {
7621		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", nil, "Failure preparing request")
7622		return
7623	}
7624
7625	resp, err := client.DeleteSourceControlSender(req)
7626	if err != nil {
7627		result.Response = resp
7628		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure sending request")
7629		return
7630	}
7631
7632	result, err = client.DeleteSourceControlResponder(resp)
7633	if err != nil {
7634		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControl", resp, "Failure responding to request")
7635		return
7636	}
7637
7638	return
7639}
7640
7641// DeleteSourceControlPreparer prepares the DeleteSourceControl request.
7642func (client AppsClient) DeleteSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
7643	pathParameters := map[string]interface{}{
7644		"name":              autorest.Encode("path", name),
7645		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7646		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7647	}
7648
7649	const APIVersion = "2020-09-01"
7650	queryParameters := map[string]interface{}{
7651		"api-version": APIVersion,
7652	}
7653
7654	preparer := autorest.CreatePreparer(
7655		autorest.AsDelete(),
7656		autorest.WithBaseURL(client.BaseURI),
7657		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
7658		autorest.WithQueryParameters(queryParameters))
7659	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7660}
7661
7662// DeleteSourceControlSender sends the DeleteSourceControl request. The method will close the
7663// http.Response Body if it receives an error.
7664func (client AppsClient) DeleteSourceControlSender(req *http.Request) (*http.Response, error) {
7665	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7666}
7667
7668// DeleteSourceControlResponder handles the response to the DeleteSourceControl request. The method always
7669// closes the http.Response Body.
7670func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (result autorest.Response, err error) {
7671	err = autorest.Respond(
7672		resp,
7673		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound),
7674		autorest.ByClosing())
7675	result.Response = resp
7676	return
7677}
7678
7679// DeleteSourceControlSlot description for Deletes the source control configuration of an app.
7680// Parameters:
7681// resourceGroupName - name of the resource group to which the resource belongs.
7682// name - name of the app.
7683// slot - name of the deployment slot. If a slot is not specified, the API will delete the source control
7684// configuration for the production slot.
7685func (client AppsClient) DeleteSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
7686	if tracing.IsEnabled() {
7687		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSourceControlSlot")
7688		defer func() {
7689			sc := -1
7690			if result.Response != nil {
7691				sc = result.Response.StatusCode
7692			}
7693			tracing.EndSpan(ctx, sc, err)
7694		}()
7695	}
7696	if err := validation.Validate([]validation.Validation{
7697		{TargetValue: resourceGroupName,
7698			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7699				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7700				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7701		return result, validation.NewError("web.AppsClient", "DeleteSourceControlSlot", err.Error())
7702	}
7703
7704	req, err := client.DeleteSourceControlSlotPreparer(ctx, resourceGroupName, name, slot)
7705	if err != nil {
7706		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", nil, "Failure preparing request")
7707		return
7708	}
7709
7710	resp, err := client.DeleteSourceControlSlotSender(req)
7711	if err != nil {
7712		result.Response = resp
7713		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure sending request")
7714		return
7715	}
7716
7717	result, err = client.DeleteSourceControlSlotResponder(resp)
7718	if err != nil {
7719		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSourceControlSlot", resp, "Failure responding to request")
7720		return
7721	}
7722
7723	return
7724}
7725
7726// DeleteSourceControlSlotPreparer prepares the DeleteSourceControlSlot request.
7727func (client AppsClient) DeleteSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
7728	pathParameters := map[string]interface{}{
7729		"name":              autorest.Encode("path", name),
7730		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7731		"slot":              autorest.Encode("path", slot),
7732		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7733	}
7734
7735	const APIVersion = "2020-09-01"
7736	queryParameters := map[string]interface{}{
7737		"api-version": APIVersion,
7738	}
7739
7740	preparer := autorest.CreatePreparer(
7741		autorest.AsDelete(),
7742		autorest.WithBaseURL(client.BaseURI),
7743		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
7744		autorest.WithQueryParameters(queryParameters))
7745	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7746}
7747
7748// DeleteSourceControlSlotSender sends the DeleteSourceControlSlot request. The method will close the
7749// http.Response Body if it receives an error.
7750func (client AppsClient) DeleteSourceControlSlotSender(req *http.Request) (*http.Response, error) {
7751	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7752}
7753
7754// DeleteSourceControlSlotResponder handles the response to the DeleteSourceControlSlot request. The method always
7755// closes the http.Response Body.
7756func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7757	err = autorest.Respond(
7758		resp,
7759		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNotFound),
7760		autorest.ByClosing())
7761	result.Response = resp
7762	return
7763}
7764
7765// DeleteSwiftVirtualNetwork description for Deletes a Swift Virtual Network connection from an app (or deployment
7766// slot).
7767// Parameters:
7768// resourceGroupName - name of the resource group to which the resource belongs.
7769// name - name of the app.
7770func (client AppsClient) DeleteSwiftVirtualNetwork(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
7771	if tracing.IsEnabled() {
7772		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetwork")
7773		defer func() {
7774			sc := -1
7775			if result.Response != nil {
7776				sc = result.Response.StatusCode
7777			}
7778			tracing.EndSpan(ctx, sc, err)
7779		}()
7780	}
7781	if err := validation.Validate([]validation.Validation{
7782		{TargetValue: resourceGroupName,
7783			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7784				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7785				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7786		return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetwork", err.Error())
7787	}
7788
7789	req, err := client.DeleteSwiftVirtualNetworkPreparer(ctx, resourceGroupName, name)
7790	if err != nil {
7791		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", nil, "Failure preparing request")
7792		return
7793	}
7794
7795	resp, err := client.DeleteSwiftVirtualNetworkSender(req)
7796	if err != nil {
7797		result.Response = resp
7798		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure sending request")
7799		return
7800	}
7801
7802	result, err = client.DeleteSwiftVirtualNetworkResponder(resp)
7803	if err != nil {
7804		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetwork", resp, "Failure responding to request")
7805		return
7806	}
7807
7808	return
7809}
7810
7811// DeleteSwiftVirtualNetworkPreparer prepares the DeleteSwiftVirtualNetwork request.
7812func (client AppsClient) DeleteSwiftVirtualNetworkPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
7813	pathParameters := map[string]interface{}{
7814		"name":              autorest.Encode("path", name),
7815		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7816		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7817	}
7818
7819	const APIVersion = "2020-09-01"
7820	queryParameters := map[string]interface{}{
7821		"api-version": APIVersion,
7822	}
7823
7824	preparer := autorest.CreatePreparer(
7825		autorest.AsDelete(),
7826		autorest.WithBaseURL(client.BaseURI),
7827		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
7828		autorest.WithQueryParameters(queryParameters))
7829	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7830}
7831
7832// DeleteSwiftVirtualNetworkSender sends the DeleteSwiftVirtualNetwork request. The method will close the
7833// http.Response Body if it receives an error.
7834func (client AppsClient) DeleteSwiftVirtualNetworkSender(req *http.Request) (*http.Response, error) {
7835	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7836}
7837
7838// DeleteSwiftVirtualNetworkResponder handles the response to the DeleteSwiftVirtualNetwork request. The method always
7839// closes the http.Response Body.
7840func (client AppsClient) DeleteSwiftVirtualNetworkResponder(resp *http.Response) (result autorest.Response, err error) {
7841	err = autorest.Respond(
7842		resp,
7843		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7844		autorest.ByClosing())
7845	result.Response = resp
7846	return
7847}
7848
7849// DeleteSwiftVirtualNetworkSlot description for Deletes a Swift Virtual Network connection from an app (or deployment
7850// slot).
7851// Parameters:
7852// resourceGroupName - name of the resource group to which the resource belongs.
7853// name - name of the app.
7854// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the
7855// production slot.
7856func (client AppsClient) DeleteSwiftVirtualNetworkSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
7857	if tracing.IsEnabled() {
7858		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteSwiftVirtualNetworkSlot")
7859		defer func() {
7860			sc := -1
7861			if result.Response != nil {
7862				sc = result.Response.StatusCode
7863			}
7864			tracing.EndSpan(ctx, sc, err)
7865		}()
7866	}
7867	if err := validation.Validate([]validation.Validation{
7868		{TargetValue: resourceGroupName,
7869			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7870				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7871				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7872		return result, validation.NewError("web.AppsClient", "DeleteSwiftVirtualNetworkSlot", err.Error())
7873	}
7874
7875	req, err := client.DeleteSwiftVirtualNetworkSlotPreparer(ctx, resourceGroupName, name, slot)
7876	if err != nil {
7877		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", nil, "Failure preparing request")
7878		return
7879	}
7880
7881	resp, err := client.DeleteSwiftVirtualNetworkSlotSender(req)
7882	if err != nil {
7883		result.Response = resp
7884		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure sending request")
7885		return
7886	}
7887
7888	result, err = client.DeleteSwiftVirtualNetworkSlotResponder(resp)
7889	if err != nil {
7890		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSwiftVirtualNetworkSlot", resp, "Failure responding to request")
7891		return
7892	}
7893
7894	return
7895}
7896
7897// DeleteSwiftVirtualNetworkSlotPreparer prepares the DeleteSwiftVirtualNetworkSlot request.
7898func (client AppsClient) DeleteSwiftVirtualNetworkSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
7899	pathParameters := map[string]interface{}{
7900		"name":              autorest.Encode("path", name),
7901		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7902		"slot":              autorest.Encode("path", slot),
7903		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7904	}
7905
7906	const APIVersion = "2020-09-01"
7907	queryParameters := map[string]interface{}{
7908		"api-version": APIVersion,
7909	}
7910
7911	preparer := autorest.CreatePreparer(
7912		autorest.AsDelete(),
7913		autorest.WithBaseURL(client.BaseURI),
7914		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
7915		autorest.WithQueryParameters(queryParameters))
7916	return preparer.Prepare((&http.Request{}).WithContext(ctx))
7917}
7918
7919// DeleteSwiftVirtualNetworkSlotSender sends the DeleteSwiftVirtualNetworkSlot request. The method will close the
7920// http.Response Body if it receives an error.
7921func (client AppsClient) DeleteSwiftVirtualNetworkSlotSender(req *http.Request) (*http.Response, error) {
7922	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
7923}
7924
7925// DeleteSwiftVirtualNetworkSlotResponder handles the response to the DeleteSwiftVirtualNetworkSlot request. The method always
7926// closes the http.Response Body.
7927func (client AppsClient) DeleteSwiftVirtualNetworkSlotResponder(resp *http.Response) (result autorest.Response, err error) {
7928	err = autorest.Respond(
7929		resp,
7930		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
7931		autorest.ByClosing())
7932	result.Response = resp
7933	return
7934}
7935
7936// DeleteTriggeredWebJob description for Delete a triggered web job by its ID for an app, or a deployment slot.
7937// Parameters:
7938// resourceGroupName - name of the resource group to which the resource belongs.
7939// name - site name.
7940// webJobName - name of Web Job.
7941func (client AppsClient) DeleteTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
7942	if tracing.IsEnabled() {
7943		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJob")
7944		defer func() {
7945			sc := -1
7946			if result.Response != nil {
7947				sc = result.Response.StatusCode
7948			}
7949			tracing.EndSpan(ctx, sc, err)
7950		}()
7951	}
7952	if err := validation.Validate([]validation.Validation{
7953		{TargetValue: resourceGroupName,
7954			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
7955				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
7956				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
7957		return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJob", err.Error())
7958	}
7959
7960	req, err := client.DeleteTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
7961	if err != nil {
7962		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request")
7963		return
7964	}
7965
7966	resp, err := client.DeleteTriggeredWebJobSender(req)
7967	if err != nil {
7968		result.Response = resp
7969		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request")
7970		return
7971	}
7972
7973	result, err = client.DeleteTriggeredWebJobResponder(resp)
7974	if err != nil {
7975		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request")
7976		return
7977	}
7978
7979	return
7980}
7981
7982// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request.
7983func (client AppsClient) DeleteTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
7984	pathParameters := map[string]interface{}{
7985		"name":              autorest.Encode("path", name),
7986		"resourceGroupName": autorest.Encode("path", resourceGroupName),
7987		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
7988		"webJobName":        autorest.Encode("path", webJobName),
7989	}
7990
7991	const APIVersion = "2020-09-01"
7992	queryParameters := map[string]interface{}{
7993		"api-version": APIVersion,
7994	}
7995
7996	preparer := autorest.CreatePreparer(
7997		autorest.AsDelete(),
7998		autorest.WithBaseURL(client.BaseURI),
7999		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters),
8000		autorest.WithQueryParameters(queryParameters))
8001	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8002}
8003
8004// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the
8005// http.Response Body if it receives an error.
8006func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
8007	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8008}
8009
8010// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always
8011// closes the http.Response Body.
8012func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
8013	err = autorest.Respond(
8014		resp,
8015		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
8016		autorest.ByClosing())
8017	result.Response = resp
8018	return
8019}
8020
8021// DeleteTriggeredWebJobSlot description for Delete a triggered web job by its ID for an app, or a deployment slot.
8022// Parameters:
8023// resourceGroupName - name of the resource group to which the resource belongs.
8024// name - site name.
8025// webJobName - name of Web Job.
8026// slot - name of the deployment slot. If a slot is not specified, the API deletes web job for the production
8027// slot.
8028func (client AppsClient) DeleteTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
8029	if tracing.IsEnabled() {
8030		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteTriggeredWebJobSlot")
8031		defer func() {
8032			sc := -1
8033			if result.Response != nil {
8034				sc = result.Response.StatusCode
8035			}
8036			tracing.EndSpan(ctx, sc, err)
8037		}()
8038	}
8039	if err := validation.Validate([]validation.Validation{
8040		{TargetValue: resourceGroupName,
8041			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8042				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8043				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8044		return result, validation.NewError("web.AppsClient", "DeleteTriggeredWebJobSlot", err.Error())
8045	}
8046
8047	req, err := client.DeleteTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
8048	if err != nil {
8049		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request")
8050		return
8051	}
8052
8053	resp, err := client.DeleteTriggeredWebJobSlotSender(req)
8054	if err != nil {
8055		result.Response = resp
8056		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request")
8057		return
8058	}
8059
8060	result, err = client.DeleteTriggeredWebJobSlotResponder(resp)
8061	if err != nil {
8062		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request")
8063		return
8064	}
8065
8066	return
8067}
8068
8069// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request.
8070func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
8071	pathParameters := map[string]interface{}{
8072		"name":              autorest.Encode("path", name),
8073		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8074		"slot":              autorest.Encode("path", slot),
8075		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8076		"webJobName":        autorest.Encode("path", webJobName),
8077	}
8078
8079	const APIVersion = "2020-09-01"
8080	queryParameters := map[string]interface{}{
8081		"api-version": APIVersion,
8082	}
8083
8084	preparer := autorest.CreatePreparer(
8085		autorest.AsDelete(),
8086		autorest.WithBaseURL(client.BaseURI),
8087		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters),
8088		autorest.WithQueryParameters(queryParameters))
8089	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8090}
8091
8092// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the
8093// http.Response Body if it receives an error.
8094func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
8095	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8096}
8097
8098// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always
8099// closes the http.Response Body.
8100func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
8101	err = autorest.Respond(
8102		resp,
8103		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
8104		autorest.ByClosing())
8105	result.Response = resp
8106	return
8107}
8108
8109// DeleteVnetConnection description for Deletes a connection from an app (or deployment slot to a named virtual
8110// network.
8111// Parameters:
8112// resourceGroupName - name of the resource group to which the resource belongs.
8113// name - name of the app.
8114// vnetName - name of the virtual network.
8115func (client AppsClient) DeleteVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) {
8116	if tracing.IsEnabled() {
8117		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnection")
8118		defer func() {
8119			sc := -1
8120			if result.Response != nil {
8121				sc = result.Response.StatusCode
8122			}
8123			tracing.EndSpan(ctx, sc, err)
8124		}()
8125	}
8126	if err := validation.Validate([]validation.Validation{
8127		{TargetValue: resourceGroupName,
8128			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8129				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8130				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8131		return result, validation.NewError("web.AppsClient", "DeleteVnetConnection", err.Error())
8132	}
8133
8134	req, err := client.DeleteVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName)
8135	if err != nil {
8136		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", nil, "Failure preparing request")
8137		return
8138	}
8139
8140	resp, err := client.DeleteVnetConnectionSender(req)
8141	if err != nil {
8142		result.Response = resp
8143		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure sending request")
8144		return
8145	}
8146
8147	result, err = client.DeleteVnetConnectionResponder(resp)
8148	if err != nil {
8149		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnection", resp, "Failure responding to request")
8150		return
8151	}
8152
8153	return
8154}
8155
8156// DeleteVnetConnectionPreparer prepares the DeleteVnetConnection request.
8157func (client AppsClient) DeleteVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) {
8158	pathParameters := map[string]interface{}{
8159		"name":              autorest.Encode("path", name),
8160		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8161		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8162		"vnetName":          autorest.Encode("path", vnetName),
8163	}
8164
8165	const APIVersion = "2020-09-01"
8166	queryParameters := map[string]interface{}{
8167		"api-version": APIVersion,
8168	}
8169
8170	preparer := autorest.CreatePreparer(
8171		autorest.AsDelete(),
8172		autorest.WithBaseURL(client.BaseURI),
8173		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
8174		autorest.WithQueryParameters(queryParameters))
8175	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8176}
8177
8178// DeleteVnetConnectionSender sends the DeleteVnetConnection request. The method will close the
8179// http.Response Body if it receives an error.
8180func (client AppsClient) DeleteVnetConnectionSender(req *http.Request) (*http.Response, error) {
8181	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8182}
8183
8184// DeleteVnetConnectionResponder handles the response to the DeleteVnetConnection request. The method always
8185// closes the http.Response Body.
8186func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
8187	err = autorest.Respond(
8188		resp,
8189		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
8190		autorest.ByClosing())
8191	result.Response = resp
8192	return
8193}
8194
8195// DeleteVnetConnectionSlot description for Deletes a connection from an app (or deployment slot to a named virtual
8196// network.
8197// Parameters:
8198// resourceGroupName - name of the resource group to which the resource belongs.
8199// name - name of the app.
8200// vnetName - name of the virtual network.
8201// slot - name of the deployment slot. If a slot is not specified, the API will delete the connection for the
8202// production slot.
8203func (client AppsClient) DeleteVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) {
8204	if tracing.IsEnabled() {
8205		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DeleteVnetConnectionSlot")
8206		defer func() {
8207			sc := -1
8208			if result.Response != nil {
8209				sc = result.Response.StatusCode
8210			}
8211			tracing.EndSpan(ctx, sc, err)
8212		}()
8213	}
8214	if err := validation.Validate([]validation.Validation{
8215		{TargetValue: resourceGroupName,
8216			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8217				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8218				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8219		return result, validation.NewError("web.AppsClient", "DeleteVnetConnectionSlot", err.Error())
8220	}
8221
8222	req, err := client.DeleteVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot)
8223	if err != nil {
8224		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", nil, "Failure preparing request")
8225		return
8226	}
8227
8228	resp, err := client.DeleteVnetConnectionSlotSender(req)
8229	if err != nil {
8230		result.Response = resp
8231		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure sending request")
8232		return
8233	}
8234
8235	result, err = client.DeleteVnetConnectionSlotResponder(resp)
8236	if err != nil {
8237		err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteVnetConnectionSlot", resp, "Failure responding to request")
8238		return
8239	}
8240
8241	return
8242}
8243
8244// DeleteVnetConnectionSlotPreparer prepares the DeleteVnetConnectionSlot request.
8245func (client AppsClient) DeleteVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) {
8246	pathParameters := map[string]interface{}{
8247		"name":              autorest.Encode("path", name),
8248		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8249		"slot":              autorest.Encode("path", slot),
8250		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8251		"vnetName":          autorest.Encode("path", vnetName),
8252	}
8253
8254	const APIVersion = "2020-09-01"
8255	queryParameters := map[string]interface{}{
8256		"api-version": APIVersion,
8257	}
8258
8259	preparer := autorest.CreatePreparer(
8260		autorest.AsDelete(),
8261		autorest.WithBaseURL(client.BaseURI),
8262		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
8263		autorest.WithQueryParameters(queryParameters))
8264	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8265}
8266
8267// DeleteVnetConnectionSlotSender sends the DeleteVnetConnectionSlot request. The method will close the
8268// http.Response Body if it receives an error.
8269func (client AppsClient) DeleteVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
8270	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8271}
8272
8273// DeleteVnetConnectionSlotResponder handles the response to the DeleteVnetConnectionSlot request. The method always
8274// closes the http.Response Body.
8275func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) (result autorest.Response, err error) {
8276	err = autorest.Respond(
8277		resp,
8278		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
8279		autorest.ByClosing())
8280	result.Response = resp
8281	return
8282}
8283
8284// DiscoverBackup description for Discovers an existing app backup that can be restored from a blob in Azure storage.
8285// Use this to get information about the databases stored in a backup.
8286// Parameters:
8287// resourceGroupName - name of the resource group to which the resource belongs.
8288// name - name of the app.
8289// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup.
8290func (client AppsClient) DiscoverBackup(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) {
8291	if tracing.IsEnabled() {
8292		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackup")
8293		defer func() {
8294			sc := -1
8295			if result.Response.Response != nil {
8296				sc = result.Response.Response.StatusCode
8297			}
8298			tracing.EndSpan(ctx, sc, err)
8299		}()
8300	}
8301	if err := validation.Validate([]validation.Validation{
8302		{TargetValue: resourceGroupName,
8303			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8304				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8305				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
8306		{TargetValue: request,
8307			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
8308				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
8309					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
8310				}}}}}); err != nil {
8311		return result, validation.NewError("web.AppsClient", "DiscoverBackup", err.Error())
8312	}
8313
8314	req, err := client.DiscoverBackupPreparer(ctx, resourceGroupName, name, request)
8315	if err != nil {
8316		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", nil, "Failure preparing request")
8317		return
8318	}
8319
8320	resp, err := client.DiscoverBackupSender(req)
8321	if err != nil {
8322		result.Response = autorest.Response{Response: resp}
8323		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure sending request")
8324		return
8325	}
8326
8327	result, err = client.DiscoverBackupResponder(resp)
8328	if err != nil {
8329		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackup", resp, "Failure responding to request")
8330		return
8331	}
8332
8333	return
8334}
8335
8336// DiscoverBackupPreparer prepares the DiscoverBackup request.
8337func (client AppsClient) DiscoverBackupPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) {
8338	pathParameters := map[string]interface{}{
8339		"name":              autorest.Encode("path", name),
8340		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8341		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8342	}
8343
8344	const APIVersion = "2020-09-01"
8345	queryParameters := map[string]interface{}{
8346		"api-version": APIVersion,
8347	}
8348
8349	preparer := autorest.CreatePreparer(
8350		autorest.AsContentType("application/json; charset=utf-8"),
8351		autorest.AsPost(),
8352		autorest.WithBaseURL(client.BaseURI),
8353		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup", pathParameters),
8354		autorest.WithJSON(request),
8355		autorest.WithQueryParameters(queryParameters))
8356	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8357}
8358
8359// DiscoverBackupSender sends the DiscoverBackup request. The method will close the
8360// http.Response Body if it receives an error.
8361func (client AppsClient) DiscoverBackupSender(req *http.Request) (*http.Response, error) {
8362	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8363}
8364
8365// DiscoverBackupResponder handles the response to the DiscoverBackup request. The method always
8366// closes the http.Response Body.
8367func (client AppsClient) DiscoverBackupResponder(resp *http.Response) (result RestoreRequest, err error) {
8368	err = autorest.Respond(
8369		resp,
8370		azure.WithErrorUnlessStatusCode(http.StatusOK),
8371		autorest.ByUnmarshallingJSON(&result),
8372		autorest.ByClosing())
8373	result.Response = autorest.Response{Response: resp}
8374	return
8375}
8376
8377// DiscoverBackupSlot description for Discovers an existing app backup that can be restored from a blob in Azure
8378// storage. Use this to get information about the databases stored in a backup.
8379// Parameters:
8380// resourceGroupName - name of the resource group to which the resource belongs.
8381// name - name of the app.
8382// request - a RestoreRequest object that includes Azure storage URL and blog name for discovery of backup.
8383// slot - name of the deployment slot. If a slot is not specified, the API will perform discovery for the
8384// production slot.
8385func (client AppsClient) DiscoverBackupSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) {
8386	if tracing.IsEnabled() {
8387		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.DiscoverBackupSlot")
8388		defer func() {
8389			sc := -1
8390			if result.Response.Response != nil {
8391				sc = result.Response.Response.StatusCode
8392			}
8393			tracing.EndSpan(ctx, sc, err)
8394		}()
8395	}
8396	if err := validation.Validate([]validation.Validation{
8397		{TargetValue: resourceGroupName,
8398			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8399				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8400				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
8401		{TargetValue: request,
8402			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
8403				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
8404					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
8405				}}}}}); err != nil {
8406		return result, validation.NewError("web.AppsClient", "DiscoverBackupSlot", err.Error())
8407	}
8408
8409	req, err := client.DiscoverBackupSlotPreparer(ctx, resourceGroupName, name, request, slot)
8410	if err != nil {
8411		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", nil, "Failure preparing request")
8412		return
8413	}
8414
8415	resp, err := client.DiscoverBackupSlotSender(req)
8416	if err != nil {
8417		result.Response = autorest.Response{Response: resp}
8418		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure sending request")
8419		return
8420	}
8421
8422	result, err = client.DiscoverBackupSlotResponder(resp)
8423	if err != nil {
8424		err = autorest.NewErrorWithError(err, "web.AppsClient", "DiscoverBackupSlot", resp, "Failure responding to request")
8425		return
8426	}
8427
8428	return
8429}
8430
8431// DiscoverBackupSlotPreparer prepares the DiscoverBackupSlot request.
8432func (client AppsClient) DiscoverBackupSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) {
8433	pathParameters := map[string]interface{}{
8434		"name":              autorest.Encode("path", name),
8435		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8436		"slot":              autorest.Encode("path", slot),
8437		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8438	}
8439
8440	const APIVersion = "2020-09-01"
8441	queryParameters := map[string]interface{}{
8442		"api-version": APIVersion,
8443	}
8444
8445	preparer := autorest.CreatePreparer(
8446		autorest.AsContentType("application/json; charset=utf-8"),
8447		autorest.AsPost(),
8448		autorest.WithBaseURL(client.BaseURI),
8449		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup", pathParameters),
8450		autorest.WithJSON(request),
8451		autorest.WithQueryParameters(queryParameters))
8452	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8453}
8454
8455// DiscoverBackupSlotSender sends the DiscoverBackupSlot request. The method will close the
8456// http.Response Body if it receives an error.
8457func (client AppsClient) DiscoverBackupSlotSender(req *http.Request) (*http.Response, error) {
8458	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8459}
8460
8461// DiscoverBackupSlotResponder handles the response to the DiscoverBackupSlot request. The method always
8462// closes the http.Response Body.
8463func (client AppsClient) DiscoverBackupSlotResponder(resp *http.Response) (result RestoreRequest, err error) {
8464	err = autorest.Respond(
8465		resp,
8466		azure.WithErrorUnlessStatusCode(http.StatusOK),
8467		autorest.ByUnmarshallingJSON(&result),
8468		autorest.ByClosing())
8469	result.Response = autorest.Response{Response: resp}
8470	return
8471}
8472
8473// GenerateNewSitePublishingPassword description for Generates a new publishing password for an app (or deployment
8474// slot, if specified).
8475// Parameters:
8476// resourceGroupName - name of the resource group to which the resource belongs.
8477// name - name of the app.
8478func (client AppsClient) GenerateNewSitePublishingPassword(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
8479	if tracing.IsEnabled() {
8480		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPassword")
8481		defer func() {
8482			sc := -1
8483			if result.Response != nil {
8484				sc = result.Response.StatusCode
8485			}
8486			tracing.EndSpan(ctx, sc, err)
8487		}()
8488	}
8489	if err := validation.Validate([]validation.Validation{
8490		{TargetValue: resourceGroupName,
8491			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8492				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8493				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8494		return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPassword", err.Error())
8495	}
8496
8497	req, err := client.GenerateNewSitePublishingPasswordPreparer(ctx, resourceGroupName, name)
8498	if err != nil {
8499		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", nil, "Failure preparing request")
8500		return
8501	}
8502
8503	resp, err := client.GenerateNewSitePublishingPasswordSender(req)
8504	if err != nil {
8505		result.Response = resp
8506		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure sending request")
8507		return
8508	}
8509
8510	result, err = client.GenerateNewSitePublishingPasswordResponder(resp)
8511	if err != nil {
8512		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPassword", resp, "Failure responding to request")
8513		return
8514	}
8515
8516	return
8517}
8518
8519// GenerateNewSitePublishingPasswordPreparer prepares the GenerateNewSitePublishingPassword request.
8520func (client AppsClient) GenerateNewSitePublishingPasswordPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8521	pathParameters := map[string]interface{}{
8522		"name":              autorest.Encode("path", name),
8523		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8524		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8525	}
8526
8527	const APIVersion = "2020-09-01"
8528	queryParameters := map[string]interface{}{
8529		"api-version": APIVersion,
8530	}
8531
8532	preparer := autorest.CreatePreparer(
8533		autorest.AsPost(),
8534		autorest.WithBaseURL(client.BaseURI),
8535		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword", pathParameters),
8536		autorest.WithQueryParameters(queryParameters))
8537	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8538}
8539
8540// GenerateNewSitePublishingPasswordSender sends the GenerateNewSitePublishingPassword request. The method will close the
8541// http.Response Body if it receives an error.
8542func (client AppsClient) GenerateNewSitePublishingPasswordSender(req *http.Request) (*http.Response, error) {
8543	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8544}
8545
8546// GenerateNewSitePublishingPasswordResponder handles the response to the GenerateNewSitePublishingPassword request. The method always
8547// closes the http.Response Body.
8548func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.Response) (result autorest.Response, err error) {
8549	err = autorest.Respond(
8550		resp,
8551		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
8552		autorest.ByClosing())
8553	result.Response = resp
8554	return
8555}
8556
8557// GenerateNewSitePublishingPasswordSlot description for Generates a new publishing password for an app (or deployment
8558// slot, if specified).
8559// Parameters:
8560// resourceGroupName - name of the resource group to which the resource belongs.
8561// name - name of the app.
8562// slot - name of the deployment slot. If a slot is not specified, the API generate a new publishing password
8563// for the production slot.
8564func (client AppsClient) GenerateNewSitePublishingPasswordSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
8565	if tracing.IsEnabled() {
8566		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GenerateNewSitePublishingPasswordSlot")
8567		defer func() {
8568			sc := -1
8569			if result.Response != nil {
8570				sc = result.Response.StatusCode
8571			}
8572			tracing.EndSpan(ctx, sc, err)
8573		}()
8574	}
8575	if err := validation.Validate([]validation.Validation{
8576		{TargetValue: resourceGroupName,
8577			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8578				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8579				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8580		return result, validation.NewError("web.AppsClient", "GenerateNewSitePublishingPasswordSlot", err.Error())
8581	}
8582
8583	req, err := client.GenerateNewSitePublishingPasswordSlotPreparer(ctx, resourceGroupName, name, slot)
8584	if err != nil {
8585		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", nil, "Failure preparing request")
8586		return
8587	}
8588
8589	resp, err := client.GenerateNewSitePublishingPasswordSlotSender(req)
8590	if err != nil {
8591		result.Response = resp
8592		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure sending request")
8593		return
8594	}
8595
8596	result, err = client.GenerateNewSitePublishingPasswordSlotResponder(resp)
8597	if err != nil {
8598		err = autorest.NewErrorWithError(err, "web.AppsClient", "GenerateNewSitePublishingPasswordSlot", resp, "Failure responding to request")
8599		return
8600	}
8601
8602	return
8603}
8604
8605// GenerateNewSitePublishingPasswordSlotPreparer prepares the GenerateNewSitePublishingPasswordSlot request.
8606func (client AppsClient) GenerateNewSitePublishingPasswordSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8607	pathParameters := map[string]interface{}{
8608		"name":              autorest.Encode("path", name),
8609		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8610		"slot":              autorest.Encode("path", slot),
8611		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8612	}
8613
8614	const APIVersion = "2020-09-01"
8615	queryParameters := map[string]interface{}{
8616		"api-version": APIVersion,
8617	}
8618
8619	preparer := autorest.CreatePreparer(
8620		autorest.AsPost(),
8621		autorest.WithBaseURL(client.BaseURI),
8622		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword", pathParameters),
8623		autorest.WithQueryParameters(queryParameters))
8624	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8625}
8626
8627// GenerateNewSitePublishingPasswordSlotSender sends the GenerateNewSitePublishingPasswordSlot request. The method will close the
8628// http.Response Body if it receives an error.
8629func (client AppsClient) GenerateNewSitePublishingPasswordSlotSender(req *http.Request) (*http.Response, error) {
8630	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8631}
8632
8633// GenerateNewSitePublishingPasswordSlotResponder handles the response to the GenerateNewSitePublishingPasswordSlot request. The method always
8634// closes the http.Response Body.
8635func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *http.Response) (result autorest.Response, err error) {
8636	err = autorest.Respond(
8637		resp,
8638		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
8639		autorest.ByClosing())
8640	result.Response = resp
8641	return
8642}
8643
8644// Get description for Gets the details of a web, mobile, or API app.
8645// Parameters:
8646// resourceGroupName - name of the resource group to which the resource belongs.
8647// name - name of the app.
8648func (client AppsClient) Get(ctx context.Context, resourceGroupName string, name string) (result Site, err error) {
8649	if tracing.IsEnabled() {
8650		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Get")
8651		defer func() {
8652			sc := -1
8653			if result.Response.Response != nil {
8654				sc = result.Response.Response.StatusCode
8655			}
8656			tracing.EndSpan(ctx, sc, err)
8657		}()
8658	}
8659	if err := validation.Validate([]validation.Validation{
8660		{TargetValue: resourceGroupName,
8661			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8662				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8663				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8664		return result, validation.NewError("web.AppsClient", "Get", err.Error())
8665	}
8666
8667	req, err := client.GetPreparer(ctx, resourceGroupName, name)
8668	if err != nil {
8669		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", nil, "Failure preparing request")
8670		return
8671	}
8672
8673	resp, err := client.GetSender(req)
8674	if err != nil {
8675		result.Response = autorest.Response{Response: resp}
8676		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure sending request")
8677		return
8678	}
8679
8680	result, err = client.GetResponder(resp)
8681	if err != nil {
8682		err = autorest.NewErrorWithError(err, "web.AppsClient", "Get", resp, "Failure responding to request")
8683		return
8684	}
8685
8686	return
8687}
8688
8689// GetPreparer prepares the Get request.
8690func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8691	pathParameters := map[string]interface{}{
8692		"name":              autorest.Encode("path", name),
8693		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8694		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8695	}
8696
8697	const APIVersion = "2020-09-01"
8698	queryParameters := map[string]interface{}{
8699		"api-version": APIVersion,
8700	}
8701
8702	preparer := autorest.CreatePreparer(
8703		autorest.AsGet(),
8704		autorest.WithBaseURL(client.BaseURI),
8705		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
8706		autorest.WithQueryParameters(queryParameters))
8707	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8708}
8709
8710// GetSender sends the Get request. The method will close the
8711// http.Response Body if it receives an error.
8712func (client AppsClient) GetSender(req *http.Request) (*http.Response, error) {
8713	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8714}
8715
8716// GetResponder handles the response to the Get request. The method always
8717// closes the http.Response Body.
8718func (client AppsClient) GetResponder(resp *http.Response) (result Site, err error) {
8719	err = autorest.Respond(
8720		resp,
8721		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
8722		autorest.ByUnmarshallingJSON(&result),
8723		autorest.ByClosing())
8724	result.Response = autorest.Response{Response: resp}
8725	return
8726}
8727
8728// GetAuthSettings description for Gets the Authentication/Authorization settings of an app.
8729// Parameters:
8730// resourceGroupName - name of the resource group to which the resource belongs.
8731// name - name of the app.
8732func (client AppsClient) GetAuthSettings(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettings, err error) {
8733	if tracing.IsEnabled() {
8734		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettings")
8735		defer func() {
8736			sc := -1
8737			if result.Response.Response != nil {
8738				sc = result.Response.Response.StatusCode
8739			}
8740			tracing.EndSpan(ctx, sc, err)
8741		}()
8742	}
8743	if err := validation.Validate([]validation.Validation{
8744		{TargetValue: resourceGroupName,
8745			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8746				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8747				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8748		return result, validation.NewError("web.AppsClient", "GetAuthSettings", err.Error())
8749	}
8750
8751	req, err := client.GetAuthSettingsPreparer(ctx, resourceGroupName, name)
8752	if err != nil {
8753		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", nil, "Failure preparing request")
8754		return
8755	}
8756
8757	resp, err := client.GetAuthSettingsSender(req)
8758	if err != nil {
8759		result.Response = autorest.Response{Response: resp}
8760		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure sending request")
8761		return
8762	}
8763
8764	result, err = client.GetAuthSettingsResponder(resp)
8765	if err != nil {
8766		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettings", resp, "Failure responding to request")
8767		return
8768	}
8769
8770	return
8771}
8772
8773// GetAuthSettingsPreparer prepares the GetAuthSettings request.
8774func (client AppsClient) GetAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8775	pathParameters := map[string]interface{}{
8776		"name":              autorest.Encode("path", name),
8777		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8778		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8779	}
8780
8781	const APIVersion = "2020-09-01"
8782	queryParameters := map[string]interface{}{
8783		"api-version": APIVersion,
8784	}
8785
8786	preparer := autorest.CreatePreparer(
8787		autorest.AsPost(),
8788		autorest.WithBaseURL(client.BaseURI),
8789		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list", pathParameters),
8790		autorest.WithQueryParameters(queryParameters))
8791	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8792}
8793
8794// GetAuthSettingsSender sends the GetAuthSettings request. The method will close the
8795// http.Response Body if it receives an error.
8796func (client AppsClient) GetAuthSettingsSender(req *http.Request) (*http.Response, error) {
8797	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8798}
8799
8800// GetAuthSettingsResponder handles the response to the GetAuthSettings request. The method always
8801// closes the http.Response Body.
8802func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) {
8803	err = autorest.Respond(
8804		resp,
8805		azure.WithErrorUnlessStatusCode(http.StatusOK),
8806		autorest.ByUnmarshallingJSON(&result),
8807		autorest.ByClosing())
8808	result.Response = autorest.Response{Response: resp}
8809	return
8810}
8811
8812// GetAuthSettingsSlot description for Gets the Authentication/Authorization settings of an app.
8813// Parameters:
8814// resourceGroupName - name of the resource group to which the resource belongs.
8815// name - name of the app.
8816// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the
8817// production slot.
8818func (client AppsClient) GetAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) {
8819	if tracing.IsEnabled() {
8820		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsSlot")
8821		defer func() {
8822			sc := -1
8823			if result.Response.Response != nil {
8824				sc = result.Response.Response.StatusCode
8825			}
8826			tracing.EndSpan(ctx, sc, err)
8827		}()
8828	}
8829	if err := validation.Validate([]validation.Validation{
8830		{TargetValue: resourceGroupName,
8831			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8832				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8833				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8834		return result, validation.NewError("web.AppsClient", "GetAuthSettingsSlot", err.Error())
8835	}
8836
8837	req, err := client.GetAuthSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
8838	if err != nil {
8839		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", nil, "Failure preparing request")
8840		return
8841	}
8842
8843	resp, err := client.GetAuthSettingsSlotSender(req)
8844	if err != nil {
8845		result.Response = autorest.Response{Response: resp}
8846		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure sending request")
8847		return
8848	}
8849
8850	result, err = client.GetAuthSettingsSlotResponder(resp)
8851	if err != nil {
8852		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsSlot", resp, "Failure responding to request")
8853		return
8854	}
8855
8856	return
8857}
8858
8859// GetAuthSettingsSlotPreparer prepares the GetAuthSettingsSlot request.
8860func (client AppsClient) GetAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
8861	pathParameters := map[string]interface{}{
8862		"name":              autorest.Encode("path", name),
8863		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8864		"slot":              autorest.Encode("path", slot),
8865		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8866	}
8867
8868	const APIVersion = "2020-09-01"
8869	queryParameters := map[string]interface{}{
8870		"api-version": APIVersion,
8871	}
8872
8873	preparer := autorest.CreatePreparer(
8874		autorest.AsPost(),
8875		autorest.WithBaseURL(client.BaseURI),
8876		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list", pathParameters),
8877		autorest.WithQueryParameters(queryParameters))
8878	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8879}
8880
8881// GetAuthSettingsSlotSender sends the GetAuthSettingsSlot request. The method will close the
8882// http.Response Body if it receives an error.
8883func (client AppsClient) GetAuthSettingsSlotSender(req *http.Request) (*http.Response, error) {
8884	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8885}
8886
8887// GetAuthSettingsSlotResponder handles the response to the GetAuthSettingsSlot request. The method always
8888// closes the http.Response Body.
8889func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) {
8890	err = autorest.Respond(
8891		resp,
8892		azure.WithErrorUnlessStatusCode(http.StatusOK),
8893		autorest.ByUnmarshallingJSON(&result),
8894		autorest.ByClosing())
8895	result.Response = autorest.Response{Response: resp}
8896	return
8897}
8898
8899// GetAuthSettingsV2 description for Gets site's Authentication / Authorization settings for apps via the V2 format
8900// Parameters:
8901// resourceGroupName - name of the resource group to which the resource belongs.
8902// name - name of the app.
8903func (client AppsClient) GetAuthSettingsV2(ctx context.Context, resourceGroupName string, name string) (result SiteAuthSettingsV2, err error) {
8904	if tracing.IsEnabled() {
8905		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsV2")
8906		defer func() {
8907			sc := -1
8908			if result.Response.Response != nil {
8909				sc = result.Response.Response.StatusCode
8910			}
8911			tracing.EndSpan(ctx, sc, err)
8912		}()
8913	}
8914	if err := validation.Validate([]validation.Validation{
8915		{TargetValue: resourceGroupName,
8916			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
8917				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
8918				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
8919		return result, validation.NewError("web.AppsClient", "GetAuthSettingsV2", err.Error())
8920	}
8921
8922	req, err := client.GetAuthSettingsV2Preparer(ctx, resourceGroupName, name)
8923	if err != nil {
8924		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2", nil, "Failure preparing request")
8925		return
8926	}
8927
8928	resp, err := client.GetAuthSettingsV2Sender(req)
8929	if err != nil {
8930		result.Response = autorest.Response{Response: resp}
8931		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2", resp, "Failure sending request")
8932		return
8933	}
8934
8935	result, err = client.GetAuthSettingsV2Responder(resp)
8936	if err != nil {
8937		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2", resp, "Failure responding to request")
8938		return
8939	}
8940
8941	return
8942}
8943
8944// GetAuthSettingsV2Preparer prepares the GetAuthSettingsV2 request.
8945func (client AppsClient) GetAuthSettingsV2Preparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
8946	pathParameters := map[string]interface{}{
8947		"name":              autorest.Encode("path", name),
8948		"resourceGroupName": autorest.Encode("path", resourceGroupName),
8949		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
8950	}
8951
8952	const APIVersion = "2020-09-01"
8953	queryParameters := map[string]interface{}{
8954		"api-version": APIVersion,
8955	}
8956
8957	preparer := autorest.CreatePreparer(
8958		autorest.AsGet(),
8959		autorest.WithBaseURL(client.BaseURI),
8960		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list", pathParameters),
8961		autorest.WithQueryParameters(queryParameters))
8962	return preparer.Prepare((&http.Request{}).WithContext(ctx))
8963}
8964
8965// GetAuthSettingsV2Sender sends the GetAuthSettingsV2 request. The method will close the
8966// http.Response Body if it receives an error.
8967func (client AppsClient) GetAuthSettingsV2Sender(req *http.Request) (*http.Response, error) {
8968	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
8969}
8970
8971// GetAuthSettingsV2Responder handles the response to the GetAuthSettingsV2 request. The method always
8972// closes the http.Response Body.
8973func (client AppsClient) GetAuthSettingsV2Responder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
8974	err = autorest.Respond(
8975		resp,
8976		azure.WithErrorUnlessStatusCode(http.StatusOK),
8977		autorest.ByUnmarshallingJSON(&result),
8978		autorest.ByClosing())
8979	result.Response = autorest.Response{Response: resp}
8980	return
8981}
8982
8983// GetAuthSettingsV2Slot description for Gets site's Authentication / Authorization settings for apps via the V2 format
8984// Parameters:
8985// resourceGroupName - name of the resource group to which the resource belongs.
8986// name - name of the app.
8987// slot - name of the deployment slot. If a slot is not specified, the API will get the settings for the
8988// production slot.
8989func (client AppsClient) GetAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteAuthSettingsV2, err error) {
8990	if tracing.IsEnabled() {
8991		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetAuthSettingsV2Slot")
8992		defer func() {
8993			sc := -1
8994			if result.Response.Response != nil {
8995				sc = result.Response.Response.StatusCode
8996			}
8997			tracing.EndSpan(ctx, sc, err)
8998		}()
8999	}
9000	if err := validation.Validate([]validation.Validation{
9001		{TargetValue: resourceGroupName,
9002			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9003				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9004				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9005		return result, validation.NewError("web.AppsClient", "GetAuthSettingsV2Slot", err.Error())
9006	}
9007
9008	req, err := client.GetAuthSettingsV2SlotPreparer(ctx, resourceGroupName, name, slot)
9009	if err != nil {
9010		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2Slot", nil, "Failure preparing request")
9011		return
9012	}
9013
9014	resp, err := client.GetAuthSettingsV2SlotSender(req)
9015	if err != nil {
9016		result.Response = autorest.Response{Response: resp}
9017		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2Slot", resp, "Failure sending request")
9018		return
9019	}
9020
9021	result, err = client.GetAuthSettingsV2SlotResponder(resp)
9022	if err != nil {
9023		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetAuthSettingsV2Slot", resp, "Failure responding to request")
9024		return
9025	}
9026
9027	return
9028}
9029
9030// GetAuthSettingsV2SlotPreparer prepares the GetAuthSettingsV2Slot request.
9031func (client AppsClient) GetAuthSettingsV2SlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9032	pathParameters := map[string]interface{}{
9033		"name":              autorest.Encode("path", name),
9034		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9035		"slot":              autorest.Encode("path", slot),
9036		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9037	}
9038
9039	const APIVersion = "2020-09-01"
9040	queryParameters := map[string]interface{}{
9041		"api-version": APIVersion,
9042	}
9043
9044	preparer := autorest.CreatePreparer(
9045		autorest.AsGet(),
9046		autorest.WithBaseURL(client.BaseURI),
9047		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list", pathParameters),
9048		autorest.WithQueryParameters(queryParameters))
9049	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9050}
9051
9052// GetAuthSettingsV2SlotSender sends the GetAuthSettingsV2Slot request. The method will close the
9053// http.Response Body if it receives an error.
9054func (client AppsClient) GetAuthSettingsV2SlotSender(req *http.Request) (*http.Response, error) {
9055	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9056}
9057
9058// GetAuthSettingsV2SlotResponder handles the response to the GetAuthSettingsV2Slot request. The method always
9059// closes the http.Response Body.
9060func (client AppsClient) GetAuthSettingsV2SlotResponder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
9061	err = autorest.Respond(
9062		resp,
9063		azure.WithErrorUnlessStatusCode(http.StatusOK),
9064		autorest.ByUnmarshallingJSON(&result),
9065		autorest.ByClosing())
9066	result.Response = autorest.Response{Response: resp}
9067	return
9068}
9069
9070// GetBackupConfiguration description for Gets the backup configuration of an app.
9071// Parameters:
9072// resourceGroupName - name of the resource group to which the resource belongs.
9073// name - name of the app.
9074func (client AppsClient) GetBackupConfiguration(ctx context.Context, resourceGroupName string, name string) (result BackupRequest, err error) {
9075	if tracing.IsEnabled() {
9076		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfiguration")
9077		defer func() {
9078			sc := -1
9079			if result.Response.Response != nil {
9080				sc = result.Response.Response.StatusCode
9081			}
9082			tracing.EndSpan(ctx, sc, err)
9083		}()
9084	}
9085	if err := validation.Validate([]validation.Validation{
9086		{TargetValue: resourceGroupName,
9087			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9088				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9089				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9090		return result, validation.NewError("web.AppsClient", "GetBackupConfiguration", err.Error())
9091	}
9092
9093	req, err := client.GetBackupConfigurationPreparer(ctx, resourceGroupName, name)
9094	if err != nil {
9095		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", nil, "Failure preparing request")
9096		return
9097	}
9098
9099	resp, err := client.GetBackupConfigurationSender(req)
9100	if err != nil {
9101		result.Response = autorest.Response{Response: resp}
9102		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure sending request")
9103		return
9104	}
9105
9106	result, err = client.GetBackupConfigurationResponder(resp)
9107	if err != nil {
9108		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfiguration", resp, "Failure responding to request")
9109		return
9110	}
9111
9112	return
9113}
9114
9115// GetBackupConfigurationPreparer prepares the GetBackupConfiguration request.
9116func (client AppsClient) GetBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9117	pathParameters := map[string]interface{}{
9118		"name":              autorest.Encode("path", name),
9119		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9120		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9121	}
9122
9123	const APIVersion = "2020-09-01"
9124	queryParameters := map[string]interface{}{
9125		"api-version": APIVersion,
9126	}
9127
9128	preparer := autorest.CreatePreparer(
9129		autorest.AsPost(),
9130		autorest.WithBaseURL(client.BaseURI),
9131		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list", pathParameters),
9132		autorest.WithQueryParameters(queryParameters))
9133	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9134}
9135
9136// GetBackupConfigurationSender sends the GetBackupConfiguration request. The method will close the
9137// http.Response Body if it receives an error.
9138func (client AppsClient) GetBackupConfigurationSender(req *http.Request) (*http.Response, error) {
9139	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9140}
9141
9142// GetBackupConfigurationResponder handles the response to the GetBackupConfiguration request. The method always
9143// closes the http.Response Body.
9144func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) {
9145	err = autorest.Respond(
9146		resp,
9147		azure.WithErrorUnlessStatusCode(http.StatusOK),
9148		autorest.ByUnmarshallingJSON(&result),
9149		autorest.ByClosing())
9150	result.Response = autorest.Response{Response: resp}
9151	return
9152}
9153
9154// GetBackupConfigurationSlot description for Gets the backup configuration of an app.
9155// Parameters:
9156// resourceGroupName - name of the resource group to which the resource belongs.
9157// name - name of the app.
9158// slot - name of the deployment slot. If a slot is not specified, the API will get the backup configuration
9159// for the production slot.
9160func (client AppsClient) GetBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupRequest, err error) {
9161	if tracing.IsEnabled() {
9162		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupConfigurationSlot")
9163		defer func() {
9164			sc := -1
9165			if result.Response.Response != nil {
9166				sc = result.Response.Response.StatusCode
9167			}
9168			tracing.EndSpan(ctx, sc, err)
9169		}()
9170	}
9171	if err := validation.Validate([]validation.Validation{
9172		{TargetValue: resourceGroupName,
9173			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9174				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9175				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9176		return result, validation.NewError("web.AppsClient", "GetBackupConfigurationSlot", err.Error())
9177	}
9178
9179	req, err := client.GetBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
9180	if err != nil {
9181		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", nil, "Failure preparing request")
9182		return
9183	}
9184
9185	resp, err := client.GetBackupConfigurationSlotSender(req)
9186	if err != nil {
9187		result.Response = autorest.Response{Response: resp}
9188		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure sending request")
9189		return
9190	}
9191
9192	result, err = client.GetBackupConfigurationSlotResponder(resp)
9193	if err != nil {
9194		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupConfigurationSlot", resp, "Failure responding to request")
9195		return
9196	}
9197
9198	return
9199}
9200
9201// GetBackupConfigurationSlotPreparer prepares the GetBackupConfigurationSlot request.
9202func (client AppsClient) GetBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9203	pathParameters := map[string]interface{}{
9204		"name":              autorest.Encode("path", name),
9205		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9206		"slot":              autorest.Encode("path", slot),
9207		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9208	}
9209
9210	const APIVersion = "2020-09-01"
9211	queryParameters := map[string]interface{}{
9212		"api-version": APIVersion,
9213	}
9214
9215	preparer := autorest.CreatePreparer(
9216		autorest.AsPost(),
9217		autorest.WithBaseURL(client.BaseURI),
9218		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list", pathParameters),
9219		autorest.WithQueryParameters(queryParameters))
9220	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9221}
9222
9223// GetBackupConfigurationSlotSender sends the GetBackupConfigurationSlot request. The method will close the
9224// http.Response Body if it receives an error.
9225func (client AppsClient) GetBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
9226	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9227}
9228
9229// GetBackupConfigurationSlotResponder handles the response to the GetBackupConfigurationSlot request. The method always
9230// closes the http.Response Body.
9231func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) {
9232	err = autorest.Respond(
9233		resp,
9234		azure.WithErrorUnlessStatusCode(http.StatusOK),
9235		autorest.ByUnmarshallingJSON(&result),
9236		autorest.ByClosing())
9237	result.Response = autorest.Response{Response: resp}
9238	return
9239}
9240
9241// GetBackupStatus description for Gets a backup of an app by its ID.
9242// Parameters:
9243// resourceGroupName - name of the resource group to which the resource belongs.
9244// name - name of the app.
9245// backupID - ID of the backup.
9246func (client AppsClient) GetBackupStatus(ctx context.Context, resourceGroupName string, name string, backupID string) (result BackupItem, err error) {
9247	if tracing.IsEnabled() {
9248		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatus")
9249		defer func() {
9250			sc := -1
9251			if result.Response.Response != nil {
9252				sc = result.Response.Response.StatusCode
9253			}
9254			tracing.EndSpan(ctx, sc, err)
9255		}()
9256	}
9257	if err := validation.Validate([]validation.Validation{
9258		{TargetValue: resourceGroupName,
9259			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9260				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9261				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9262		return result, validation.NewError("web.AppsClient", "GetBackupStatus", err.Error())
9263	}
9264
9265	req, err := client.GetBackupStatusPreparer(ctx, resourceGroupName, name, backupID)
9266	if err != nil {
9267		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", nil, "Failure preparing request")
9268		return
9269	}
9270
9271	resp, err := client.GetBackupStatusSender(req)
9272	if err != nil {
9273		result.Response = autorest.Response{Response: resp}
9274		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure sending request")
9275		return
9276	}
9277
9278	result, err = client.GetBackupStatusResponder(resp)
9279	if err != nil {
9280		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatus", resp, "Failure responding to request")
9281		return
9282	}
9283
9284	return
9285}
9286
9287// GetBackupStatusPreparer prepares the GetBackupStatus request.
9288func (client AppsClient) GetBackupStatusPreparer(ctx context.Context, resourceGroupName string, name string, backupID string) (*http.Request, error) {
9289	pathParameters := map[string]interface{}{
9290		"backupId":          autorest.Encode("path", backupID),
9291		"name":              autorest.Encode("path", name),
9292		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9293		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9294	}
9295
9296	const APIVersion = "2020-09-01"
9297	queryParameters := map[string]interface{}{
9298		"api-version": APIVersion,
9299	}
9300
9301	preparer := autorest.CreatePreparer(
9302		autorest.AsGet(),
9303		autorest.WithBaseURL(client.BaseURI),
9304		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}", pathParameters),
9305		autorest.WithQueryParameters(queryParameters))
9306	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9307}
9308
9309// GetBackupStatusSender sends the GetBackupStatus request. The method will close the
9310// http.Response Body if it receives an error.
9311func (client AppsClient) GetBackupStatusSender(req *http.Request) (*http.Response, error) {
9312	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9313}
9314
9315// GetBackupStatusResponder handles the response to the GetBackupStatus request. The method always
9316// closes the http.Response Body.
9317func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result BackupItem, err error) {
9318	err = autorest.Respond(
9319		resp,
9320		azure.WithErrorUnlessStatusCode(http.StatusOK),
9321		autorest.ByUnmarshallingJSON(&result),
9322		autorest.ByClosing())
9323	result.Response = autorest.Response{Response: resp}
9324	return
9325}
9326
9327// GetBackupStatusSlot description for Gets a backup of an app by its ID.
9328// Parameters:
9329// resourceGroupName - name of the resource group to which the resource belongs.
9330// name - name of the app.
9331// backupID - ID of the backup.
9332// slot - name of the deployment slot. If a slot is not specified, the API will get a backup of the production
9333// slot.
9334func (client AppsClient) GetBackupStatusSlot(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) {
9335	if tracing.IsEnabled() {
9336		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBackupStatusSlot")
9337		defer func() {
9338			sc := -1
9339			if result.Response.Response != nil {
9340				sc = result.Response.Response.StatusCode
9341			}
9342			tracing.EndSpan(ctx, sc, err)
9343		}()
9344	}
9345	if err := validation.Validate([]validation.Validation{
9346		{TargetValue: resourceGroupName,
9347			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9348				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9349				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9350		return result, validation.NewError("web.AppsClient", "GetBackupStatusSlot", err.Error())
9351	}
9352
9353	req, err := client.GetBackupStatusSlotPreparer(ctx, resourceGroupName, name, backupID, slot)
9354	if err != nil {
9355		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", nil, "Failure preparing request")
9356		return
9357	}
9358
9359	resp, err := client.GetBackupStatusSlotSender(req)
9360	if err != nil {
9361		result.Response = autorest.Response{Response: resp}
9362		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure sending request")
9363		return
9364	}
9365
9366	result, err = client.GetBackupStatusSlotResponder(resp)
9367	if err != nil {
9368		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBackupStatusSlot", resp, "Failure responding to request")
9369		return
9370	}
9371
9372	return
9373}
9374
9375// GetBackupStatusSlotPreparer prepares the GetBackupStatusSlot request.
9376func (client AppsClient) GetBackupStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, slot string) (*http.Request, error) {
9377	pathParameters := map[string]interface{}{
9378		"backupId":          autorest.Encode("path", backupID),
9379		"name":              autorest.Encode("path", name),
9380		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9381		"slot":              autorest.Encode("path", slot),
9382		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9383	}
9384
9385	const APIVersion = "2020-09-01"
9386	queryParameters := map[string]interface{}{
9387		"api-version": APIVersion,
9388	}
9389
9390	preparer := autorest.CreatePreparer(
9391		autorest.AsGet(),
9392		autorest.WithBaseURL(client.BaseURI),
9393		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", pathParameters),
9394		autorest.WithQueryParameters(queryParameters))
9395	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9396}
9397
9398// GetBackupStatusSlotSender sends the GetBackupStatusSlot request. The method will close the
9399// http.Response Body if it receives an error.
9400func (client AppsClient) GetBackupStatusSlotSender(req *http.Request) (*http.Response, error) {
9401	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9402}
9403
9404// GetBackupStatusSlotResponder handles the response to the GetBackupStatusSlot request. The method always
9405// closes the http.Response Body.
9406func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (result BackupItem, err error) {
9407	err = autorest.Respond(
9408		resp,
9409		azure.WithErrorUnlessStatusCode(http.StatusOK),
9410		autorest.ByUnmarshallingJSON(&result),
9411		autorest.ByClosing())
9412	result.Response = autorest.Response{Response: resp}
9413	return
9414}
9415
9416// GetBasicPublishingCredentialsPolicies description for Returns whether Scm basic auth is allowed and whether Ftp is
9417// allowed for a given site.
9418// Parameters:
9419// resourceGroupName - name of the resource group to which the resource belongs.
9420// name - name of the app.
9421func (client AppsClient) GetBasicPublishingCredentialsPolicies(ctx context.Context, resourceGroupName string, name string) (result CsmPublishingCredentialsPoliciesCollection, err error) {
9422	if tracing.IsEnabled() {
9423		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetBasicPublishingCredentialsPolicies")
9424		defer func() {
9425			sc := -1
9426			if result.Response.Response != nil {
9427				sc = result.Response.Response.StatusCode
9428			}
9429			tracing.EndSpan(ctx, sc, err)
9430		}()
9431	}
9432	if err := validation.Validate([]validation.Validation{
9433		{TargetValue: resourceGroupName,
9434			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9435				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9436				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9437		return result, validation.NewError("web.AppsClient", "GetBasicPublishingCredentialsPolicies", err.Error())
9438	}
9439
9440	req, err := client.GetBasicPublishingCredentialsPoliciesPreparer(ctx, resourceGroupName, name)
9441	if err != nil {
9442		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBasicPublishingCredentialsPolicies", nil, "Failure preparing request")
9443		return
9444	}
9445
9446	resp, err := client.GetBasicPublishingCredentialsPoliciesSender(req)
9447	if err != nil {
9448		result.Response = autorest.Response{Response: resp}
9449		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBasicPublishingCredentialsPolicies", resp, "Failure sending request")
9450		return
9451	}
9452
9453	result, err = client.GetBasicPublishingCredentialsPoliciesResponder(resp)
9454	if err != nil {
9455		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetBasicPublishingCredentialsPolicies", resp, "Failure responding to request")
9456		return
9457	}
9458
9459	return
9460}
9461
9462// GetBasicPublishingCredentialsPoliciesPreparer prepares the GetBasicPublishingCredentialsPolicies request.
9463func (client AppsClient) GetBasicPublishingCredentialsPoliciesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9464	pathParameters := map[string]interface{}{
9465		"name":              autorest.Encode("path", name),
9466		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9467		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9468	}
9469
9470	const APIVersion = "2020-09-01"
9471	queryParameters := map[string]interface{}{
9472		"api-version": APIVersion,
9473	}
9474
9475	preparer := autorest.CreatePreparer(
9476		autorest.AsGet(),
9477		autorest.WithBaseURL(client.BaseURI),
9478		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies", pathParameters),
9479		autorest.WithQueryParameters(queryParameters))
9480	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9481}
9482
9483// GetBasicPublishingCredentialsPoliciesSender sends the GetBasicPublishingCredentialsPolicies request. The method will close the
9484// http.Response Body if it receives an error.
9485func (client AppsClient) GetBasicPublishingCredentialsPoliciesSender(req *http.Request) (*http.Response, error) {
9486	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9487}
9488
9489// GetBasicPublishingCredentialsPoliciesResponder handles the response to the GetBasicPublishingCredentialsPolicies request. The method always
9490// closes the http.Response Body.
9491func (client AppsClient) GetBasicPublishingCredentialsPoliciesResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesCollection, err error) {
9492	err = autorest.Respond(
9493		resp,
9494		azure.WithErrorUnlessStatusCode(http.StatusOK),
9495		autorest.ByUnmarshallingJSON(&result),
9496		autorest.ByClosing())
9497	result.Response = autorest.Response{Response: resp}
9498	return
9499}
9500
9501// GetConfiguration description for Gets the configuration of an app, such as platform version and bitness, default
9502// documents, virtual applications, Always On, etc.
9503// Parameters:
9504// resourceGroupName - name of the resource group to which the resource belongs.
9505// name - name of the app.
9506func (client AppsClient) GetConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResource, err error) {
9507	if tracing.IsEnabled() {
9508		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfiguration")
9509		defer func() {
9510			sc := -1
9511			if result.Response.Response != nil {
9512				sc = result.Response.Response.StatusCode
9513			}
9514			tracing.EndSpan(ctx, sc, err)
9515		}()
9516	}
9517	if err := validation.Validate([]validation.Validation{
9518		{TargetValue: resourceGroupName,
9519			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9520				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9521				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9522		return result, validation.NewError("web.AppsClient", "GetConfiguration", err.Error())
9523	}
9524
9525	req, err := client.GetConfigurationPreparer(ctx, resourceGroupName, name)
9526	if err != nil {
9527		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", nil, "Failure preparing request")
9528		return
9529	}
9530
9531	resp, err := client.GetConfigurationSender(req)
9532	if err != nil {
9533		result.Response = autorest.Response{Response: resp}
9534		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure sending request")
9535		return
9536	}
9537
9538	result, err = client.GetConfigurationResponder(resp)
9539	if err != nil {
9540		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfiguration", resp, "Failure responding to request")
9541		return
9542	}
9543
9544	return
9545}
9546
9547// GetConfigurationPreparer prepares the GetConfiguration request.
9548func (client AppsClient) GetConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9549	pathParameters := map[string]interface{}{
9550		"name":              autorest.Encode("path", name),
9551		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9552		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9553	}
9554
9555	const APIVersion = "2020-09-01"
9556	queryParameters := map[string]interface{}{
9557		"api-version": APIVersion,
9558	}
9559
9560	preparer := autorest.CreatePreparer(
9561		autorest.AsGet(),
9562		autorest.WithBaseURL(client.BaseURI),
9563		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
9564		autorest.WithQueryParameters(queryParameters))
9565	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9566}
9567
9568// GetConfigurationSender sends the GetConfiguration request. The method will close the
9569// http.Response Body if it receives an error.
9570func (client AppsClient) GetConfigurationSender(req *http.Request) (*http.Response, error) {
9571	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9572}
9573
9574// GetConfigurationResponder handles the response to the GetConfiguration request. The method always
9575// closes the http.Response Body.
9576func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
9577	err = autorest.Respond(
9578		resp,
9579		azure.WithErrorUnlessStatusCode(http.StatusOK),
9580		autorest.ByUnmarshallingJSON(&result),
9581		autorest.ByClosing())
9582	result.Response = autorest.Response{Response: resp}
9583	return
9584}
9585
9586// GetConfigurationSlot description for Gets the configuration of an app, such as platform version and bitness, default
9587// documents, virtual applications, Always On, etc.
9588// Parameters:
9589// resourceGroupName - name of the resource group to which the resource belongs.
9590// name - name of the app.
9591// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
9592// production slot.
9593func (client AppsClient) GetConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) {
9594	if tracing.IsEnabled() {
9595		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSlot")
9596		defer func() {
9597			sc := -1
9598			if result.Response.Response != nil {
9599				sc = result.Response.Response.StatusCode
9600			}
9601			tracing.EndSpan(ctx, sc, err)
9602		}()
9603	}
9604	if err := validation.Validate([]validation.Validation{
9605		{TargetValue: resourceGroupName,
9606			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9607				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9608				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9609		return result, validation.NewError("web.AppsClient", "GetConfigurationSlot", err.Error())
9610	}
9611
9612	req, err := client.GetConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
9613	if err != nil {
9614		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", nil, "Failure preparing request")
9615		return
9616	}
9617
9618	resp, err := client.GetConfigurationSlotSender(req)
9619	if err != nil {
9620		result.Response = autorest.Response{Response: resp}
9621		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure sending request")
9622		return
9623	}
9624
9625	result, err = client.GetConfigurationSlotResponder(resp)
9626	if err != nil {
9627		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSlot", resp, "Failure responding to request")
9628		return
9629	}
9630
9631	return
9632}
9633
9634// GetConfigurationSlotPreparer prepares the GetConfigurationSlot request.
9635func (client AppsClient) GetConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9636	pathParameters := map[string]interface{}{
9637		"name":              autorest.Encode("path", name),
9638		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9639		"slot":              autorest.Encode("path", slot),
9640		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9641	}
9642
9643	const APIVersion = "2020-09-01"
9644	queryParameters := map[string]interface{}{
9645		"api-version": APIVersion,
9646	}
9647
9648	preparer := autorest.CreatePreparer(
9649		autorest.AsGet(),
9650		autorest.WithBaseURL(client.BaseURI),
9651		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
9652		autorest.WithQueryParameters(queryParameters))
9653	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9654}
9655
9656// GetConfigurationSlotSender sends the GetConfigurationSlot request. The method will close the
9657// http.Response Body if it receives an error.
9658func (client AppsClient) GetConfigurationSlotSender(req *http.Request) (*http.Response, error) {
9659	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9660}
9661
9662// GetConfigurationSlotResponder handles the response to the GetConfigurationSlot request. The method always
9663// closes the http.Response Body.
9664func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
9665	err = autorest.Respond(
9666		resp,
9667		azure.WithErrorUnlessStatusCode(http.StatusOK),
9668		autorest.ByUnmarshallingJSON(&result),
9669		autorest.ByClosing())
9670	result.Response = autorest.Response{Response: resp}
9671	return
9672}
9673
9674// GetConfigurationSnapshot description for Gets a snapshot of the configuration of an app at a previous point in time.
9675// Parameters:
9676// resourceGroupName - name of the resource group to which the resource belongs.
9677// name - name of the app.
9678// snapshotID - the ID of the snapshot to read.
9679func (client AppsClient) GetConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) {
9680	if tracing.IsEnabled() {
9681		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshot")
9682		defer func() {
9683			sc := -1
9684			if result.Response.Response != nil {
9685				sc = result.Response.Response.StatusCode
9686			}
9687			tracing.EndSpan(ctx, sc, err)
9688		}()
9689	}
9690	if err := validation.Validate([]validation.Validation{
9691		{TargetValue: resourceGroupName,
9692			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9693				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9694				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9695		return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshot", err.Error())
9696	}
9697
9698	req, err := client.GetConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID)
9699	if err != nil {
9700		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", nil, "Failure preparing request")
9701		return
9702	}
9703
9704	resp, err := client.GetConfigurationSnapshotSender(req)
9705	if err != nil {
9706		result.Response = autorest.Response{Response: resp}
9707		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure sending request")
9708		return
9709	}
9710
9711	result, err = client.GetConfigurationSnapshotResponder(resp)
9712	if err != nil {
9713		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshot", resp, "Failure responding to request")
9714		return
9715	}
9716
9717	return
9718}
9719
9720// GetConfigurationSnapshotPreparer prepares the GetConfigurationSnapshot request.
9721func (client AppsClient) GetConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) {
9722	pathParameters := map[string]interface{}{
9723		"name":              autorest.Encode("path", name),
9724		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9725		"snapshotId":        autorest.Encode("path", snapshotID),
9726		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9727	}
9728
9729	const APIVersion = "2020-09-01"
9730	queryParameters := map[string]interface{}{
9731		"api-version": APIVersion,
9732	}
9733
9734	preparer := autorest.CreatePreparer(
9735		autorest.AsGet(),
9736		autorest.WithBaseURL(client.BaseURI),
9737		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}", pathParameters),
9738		autorest.WithQueryParameters(queryParameters))
9739	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9740}
9741
9742// GetConfigurationSnapshotSender sends the GetConfigurationSnapshot request. The method will close the
9743// http.Response Body if it receives an error.
9744func (client AppsClient) GetConfigurationSnapshotSender(req *http.Request) (*http.Response, error) {
9745	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9746}
9747
9748// GetConfigurationSnapshotResponder handles the response to the GetConfigurationSnapshot request. The method always
9749// closes the http.Response Body.
9750func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) (result SiteConfigResource, err error) {
9751	err = autorest.Respond(
9752		resp,
9753		azure.WithErrorUnlessStatusCode(http.StatusOK),
9754		autorest.ByUnmarshallingJSON(&result),
9755		autorest.ByClosing())
9756	result.Response = autorest.Response{Response: resp}
9757	return
9758}
9759
9760// GetConfigurationSnapshotSlot description for Gets a snapshot of the configuration of an app at a previous point in
9761// time.
9762// Parameters:
9763// resourceGroupName - name of the resource group to which the resource belongs.
9764// name - name of the app.
9765// snapshotID - the ID of the snapshot to read.
9766// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
9767// production slot.
9768func (client AppsClient) GetConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) {
9769	if tracing.IsEnabled() {
9770		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetConfigurationSnapshotSlot")
9771		defer func() {
9772			sc := -1
9773			if result.Response.Response != nil {
9774				sc = result.Response.Response.StatusCode
9775			}
9776			tracing.EndSpan(ctx, sc, err)
9777		}()
9778	}
9779	if err := validation.Validate([]validation.Validation{
9780		{TargetValue: resourceGroupName,
9781			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9782				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9783				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9784		return result, validation.NewError("web.AppsClient", "GetConfigurationSnapshotSlot", err.Error())
9785	}
9786
9787	req, err := client.GetConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot)
9788	if err != nil {
9789		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", nil, "Failure preparing request")
9790		return
9791	}
9792
9793	resp, err := client.GetConfigurationSnapshotSlotSender(req)
9794	if err != nil {
9795		result.Response = autorest.Response{Response: resp}
9796		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure sending request")
9797		return
9798	}
9799
9800	result, err = client.GetConfigurationSnapshotSlotResponder(resp)
9801	if err != nil {
9802		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetConfigurationSnapshotSlot", resp, "Failure responding to request")
9803		return
9804	}
9805
9806	return
9807}
9808
9809// GetConfigurationSnapshotSlotPreparer prepares the GetConfigurationSnapshotSlot request.
9810func (client AppsClient) GetConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) {
9811	pathParameters := map[string]interface{}{
9812		"name":              autorest.Encode("path", name),
9813		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9814		"slot":              autorest.Encode("path", slot),
9815		"snapshotId":        autorest.Encode("path", snapshotID),
9816		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9817	}
9818
9819	const APIVersion = "2020-09-01"
9820	queryParameters := map[string]interface{}{
9821		"api-version": APIVersion,
9822	}
9823
9824	preparer := autorest.CreatePreparer(
9825		autorest.AsGet(),
9826		autorest.WithBaseURL(client.BaseURI),
9827		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}", pathParameters),
9828		autorest.WithQueryParameters(queryParameters))
9829	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9830}
9831
9832// GetConfigurationSnapshotSlotSender sends the GetConfigurationSnapshotSlot request. The method will close the
9833// http.Response Body if it receives an error.
9834func (client AppsClient) GetConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) {
9835	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9836}
9837
9838// GetConfigurationSnapshotSlotResponder handles the response to the GetConfigurationSnapshotSlot request. The method always
9839// closes the http.Response Body.
9840func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
9841	err = autorest.Respond(
9842		resp,
9843		azure.WithErrorUnlessStatusCode(http.StatusOK),
9844		autorest.ByUnmarshallingJSON(&result),
9845		autorest.ByClosing())
9846	result.Response = autorest.Response{Response: resp}
9847	return
9848}
9849
9850// GetContainerLogsZip description for Gets the ZIP archived docker log files for the given site
9851// Parameters:
9852// resourceGroupName - name of the resource group to which the resource belongs.
9853// name - name of web app.
9854func (client AppsClient) GetContainerLogsZip(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) {
9855	if tracing.IsEnabled() {
9856		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZip")
9857		defer func() {
9858			sc := -1
9859			if result.Response.Response != nil {
9860				sc = result.Response.Response.StatusCode
9861			}
9862			tracing.EndSpan(ctx, sc, err)
9863		}()
9864	}
9865	if err := validation.Validate([]validation.Validation{
9866		{TargetValue: resourceGroupName,
9867			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9868				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9869				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9870		return result, validation.NewError("web.AppsClient", "GetContainerLogsZip", err.Error())
9871	}
9872
9873	req, err := client.GetContainerLogsZipPreparer(ctx, resourceGroupName, name)
9874	if err != nil {
9875		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", nil, "Failure preparing request")
9876		return
9877	}
9878
9879	resp, err := client.GetContainerLogsZipSender(req)
9880	if err != nil {
9881		result.Response = autorest.Response{Response: resp}
9882		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure sending request")
9883		return
9884	}
9885
9886	result, err = client.GetContainerLogsZipResponder(resp)
9887	if err != nil {
9888		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZip", resp, "Failure responding to request")
9889		return
9890	}
9891
9892	return
9893}
9894
9895// GetContainerLogsZipPreparer prepares the GetContainerLogsZip request.
9896func (client AppsClient) GetContainerLogsZipPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
9897	pathParameters := map[string]interface{}{
9898		"name":              autorest.Encode("path", name),
9899		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9900		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9901	}
9902
9903	const APIVersion = "2020-09-01"
9904	queryParameters := map[string]interface{}{
9905		"api-version": APIVersion,
9906	}
9907
9908	preparer := autorest.CreatePreparer(
9909		autorest.AsPost(),
9910		autorest.WithBaseURL(client.BaseURI),
9911		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download", pathParameters),
9912		autorest.WithQueryParameters(queryParameters))
9913	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9914}
9915
9916// GetContainerLogsZipSender sends the GetContainerLogsZip request. The method will close the
9917// http.Response Body if it receives an error.
9918func (client AppsClient) GetContainerLogsZipSender(req *http.Request) (*http.Response, error) {
9919	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
9920}
9921
9922// GetContainerLogsZipResponder handles the response to the GetContainerLogsZip request. The method always
9923// closes the http.Response Body.
9924func (client AppsClient) GetContainerLogsZipResponder(resp *http.Response) (result ReadCloser, err error) {
9925	result.Value = &resp.Body
9926	err = autorest.Respond(
9927		resp,
9928		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
9929	result.Response = autorest.Response{Response: resp}
9930	return
9931}
9932
9933// GetContainerLogsZipSlot description for Gets the ZIP archived docker log files for the given site
9934// Parameters:
9935// resourceGroupName - name of the resource group to which the resource belongs.
9936// name - name of web app.
9937// slot - name of web app slot. If not specified then will default to production slot.
9938func (client AppsClient) GetContainerLogsZipSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) {
9939	if tracing.IsEnabled() {
9940		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContainerLogsZipSlot")
9941		defer func() {
9942			sc := -1
9943			if result.Response.Response != nil {
9944				sc = result.Response.Response.StatusCode
9945			}
9946			tracing.EndSpan(ctx, sc, err)
9947		}()
9948	}
9949	if err := validation.Validate([]validation.Validation{
9950		{TargetValue: resourceGroupName,
9951			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
9952				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
9953				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
9954		return result, validation.NewError("web.AppsClient", "GetContainerLogsZipSlot", err.Error())
9955	}
9956
9957	req, err := client.GetContainerLogsZipSlotPreparer(ctx, resourceGroupName, name, slot)
9958	if err != nil {
9959		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", nil, "Failure preparing request")
9960		return
9961	}
9962
9963	resp, err := client.GetContainerLogsZipSlotSender(req)
9964	if err != nil {
9965		result.Response = autorest.Response{Response: resp}
9966		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure sending request")
9967		return
9968	}
9969
9970	result, err = client.GetContainerLogsZipSlotResponder(resp)
9971	if err != nil {
9972		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContainerLogsZipSlot", resp, "Failure responding to request")
9973		return
9974	}
9975
9976	return
9977}
9978
9979// GetContainerLogsZipSlotPreparer prepares the GetContainerLogsZipSlot request.
9980func (client AppsClient) GetContainerLogsZipSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
9981	pathParameters := map[string]interface{}{
9982		"name":              autorest.Encode("path", name),
9983		"resourceGroupName": autorest.Encode("path", resourceGroupName),
9984		"slot":              autorest.Encode("path", slot),
9985		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
9986	}
9987
9988	const APIVersion = "2020-09-01"
9989	queryParameters := map[string]interface{}{
9990		"api-version": APIVersion,
9991	}
9992
9993	preparer := autorest.CreatePreparer(
9994		autorest.AsPost(),
9995		autorest.WithBaseURL(client.BaseURI),
9996		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download", pathParameters),
9997		autorest.WithQueryParameters(queryParameters))
9998	return preparer.Prepare((&http.Request{}).WithContext(ctx))
9999}
10000
10001// GetContainerLogsZipSlotSender sends the GetContainerLogsZipSlot request. The method will close the
10002// http.Response Body if it receives an error.
10003func (client AppsClient) GetContainerLogsZipSlotSender(req *http.Request) (*http.Response, error) {
10004	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10005}
10006
10007// GetContainerLogsZipSlotResponder handles the response to the GetContainerLogsZipSlot request. The method always
10008// closes the http.Response Body.
10009func (client AppsClient) GetContainerLogsZipSlotResponder(resp *http.Response) (result ReadCloser, err error) {
10010	result.Value = &resp.Body
10011	err = autorest.Respond(
10012		resp,
10013		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
10014	result.Response = autorest.Response{Response: resp}
10015	return
10016}
10017
10018// GetContinuousWebJob description for Gets a continuous web job by its ID for an app, or a deployment slot.
10019// Parameters:
10020// resourceGroupName - name of the resource group to which the resource belongs.
10021// name - site name.
10022// webJobName - name of Web Job.
10023func (client AppsClient) GetContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result ContinuousWebJob, err error) {
10024	if tracing.IsEnabled() {
10025		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJob")
10026		defer func() {
10027			sc := -1
10028			if result.Response.Response != nil {
10029				sc = result.Response.Response.StatusCode
10030			}
10031			tracing.EndSpan(ctx, sc, err)
10032		}()
10033	}
10034	if err := validation.Validate([]validation.Validation{
10035		{TargetValue: resourceGroupName,
10036			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10037				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10038				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10039		return result, validation.NewError("web.AppsClient", "GetContinuousWebJob", err.Error())
10040	}
10041
10042	req, err := client.GetContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
10043	if err != nil {
10044		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request")
10045		return
10046	}
10047
10048	resp, err := client.GetContinuousWebJobSender(req)
10049	if err != nil {
10050		result.Response = autorest.Response{Response: resp}
10051		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request")
10052		return
10053	}
10054
10055	result, err = client.GetContinuousWebJobResponder(resp)
10056	if err != nil {
10057		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request")
10058		return
10059	}
10060
10061	return
10062}
10063
10064// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request.
10065func (client AppsClient) GetContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
10066	pathParameters := map[string]interface{}{
10067		"name":              autorest.Encode("path", name),
10068		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10069		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10070		"webJobName":        autorest.Encode("path", webJobName),
10071	}
10072
10073	const APIVersion = "2020-09-01"
10074	queryParameters := map[string]interface{}{
10075		"api-version": APIVersion,
10076	}
10077
10078	preparer := autorest.CreatePreparer(
10079		autorest.AsGet(),
10080		autorest.WithBaseURL(client.BaseURI),
10081		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters),
10082		autorest.WithQueryParameters(queryParameters))
10083	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10084}
10085
10086// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the
10087// http.Response Body if it receives an error.
10088func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) {
10089	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10090}
10091
10092// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always
10093// closes the http.Response Body.
10094func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) {
10095	err = autorest.Respond(
10096		resp,
10097		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10098		autorest.ByUnmarshallingJSON(&result),
10099		autorest.ByClosing())
10100	result.Response = autorest.Response{Response: resp}
10101	return
10102}
10103
10104// GetContinuousWebJobSlot description for Gets a continuous web job by its ID for an app, or a deployment slot.
10105// Parameters:
10106// resourceGroupName - name of the resource group to which the resource belongs.
10107// name - site name.
10108// webJobName - name of Web Job.
10109// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
10110// production slot.
10111func (client AppsClient) GetContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result ContinuousWebJob, err error) {
10112	if tracing.IsEnabled() {
10113		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetContinuousWebJobSlot")
10114		defer func() {
10115			sc := -1
10116			if result.Response.Response != nil {
10117				sc = result.Response.Response.StatusCode
10118			}
10119			tracing.EndSpan(ctx, sc, err)
10120		}()
10121	}
10122	if err := validation.Validate([]validation.Validation{
10123		{TargetValue: resourceGroupName,
10124			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10125				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10126				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10127		return result, validation.NewError("web.AppsClient", "GetContinuousWebJobSlot", err.Error())
10128	}
10129
10130	req, err := client.GetContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
10131	if err != nil {
10132		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request")
10133		return
10134	}
10135
10136	resp, err := client.GetContinuousWebJobSlotSender(req)
10137	if err != nil {
10138		result.Response = autorest.Response{Response: resp}
10139		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request")
10140		return
10141	}
10142
10143	result, err = client.GetContinuousWebJobSlotResponder(resp)
10144	if err != nil {
10145		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request")
10146		return
10147	}
10148
10149	return
10150}
10151
10152// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request.
10153func (client AppsClient) GetContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
10154	pathParameters := map[string]interface{}{
10155		"name":              autorest.Encode("path", name),
10156		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10157		"slot":              autorest.Encode("path", slot),
10158		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10159		"webJobName":        autorest.Encode("path", webJobName),
10160	}
10161
10162	const APIVersion = "2020-09-01"
10163	queryParameters := map[string]interface{}{
10164		"api-version": APIVersion,
10165	}
10166
10167	preparer := autorest.CreatePreparer(
10168		autorest.AsGet(),
10169		autorest.WithBaseURL(client.BaseURI),
10170		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters),
10171		autorest.WithQueryParameters(queryParameters))
10172	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10173}
10174
10175// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the
10176// http.Response Body if it receives an error.
10177func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
10178	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10179}
10180
10181// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always
10182// closes the http.Response Body.
10183func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) {
10184	err = autorest.Respond(
10185		resp,
10186		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10187		autorest.ByUnmarshallingJSON(&result),
10188		autorest.ByClosing())
10189	result.Response = autorest.Response{Response: resp}
10190	return
10191}
10192
10193// GetDeployment description for Get a deployment by its ID for an app, or a deployment slot.
10194// Parameters:
10195// resourceGroupName - name of the resource group to which the resource belongs.
10196// name - name of the app.
10197// ID - deployment ID.
10198func (client AppsClient) GetDeployment(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) {
10199	if tracing.IsEnabled() {
10200		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeployment")
10201		defer func() {
10202			sc := -1
10203			if result.Response.Response != nil {
10204				sc = result.Response.Response.StatusCode
10205			}
10206			tracing.EndSpan(ctx, sc, err)
10207		}()
10208	}
10209	if err := validation.Validate([]validation.Validation{
10210		{TargetValue: resourceGroupName,
10211			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10212				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10213				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10214		return result, validation.NewError("web.AppsClient", "GetDeployment", err.Error())
10215	}
10216
10217	req, err := client.GetDeploymentPreparer(ctx, resourceGroupName, name, ID)
10218	if err != nil {
10219		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", nil, "Failure preparing request")
10220		return
10221	}
10222
10223	resp, err := client.GetDeploymentSender(req)
10224	if err != nil {
10225		result.Response = autorest.Response{Response: resp}
10226		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure sending request")
10227		return
10228	}
10229
10230	result, err = client.GetDeploymentResponder(resp)
10231	if err != nil {
10232		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeployment", resp, "Failure responding to request")
10233		return
10234	}
10235
10236	return
10237}
10238
10239// GetDeploymentPreparer prepares the GetDeployment request.
10240func (client AppsClient) GetDeploymentPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
10241	pathParameters := map[string]interface{}{
10242		"id":                autorest.Encode("path", ID),
10243		"name":              autorest.Encode("path", name),
10244		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10245		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10246	}
10247
10248	const APIVersion = "2020-09-01"
10249	queryParameters := map[string]interface{}{
10250		"api-version": APIVersion,
10251	}
10252
10253	preparer := autorest.CreatePreparer(
10254		autorest.AsGet(),
10255		autorest.WithBaseURL(client.BaseURI),
10256		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}", pathParameters),
10257		autorest.WithQueryParameters(queryParameters))
10258	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10259}
10260
10261// GetDeploymentSender sends the GetDeployment request. The method will close the
10262// http.Response Body if it receives an error.
10263func (client AppsClient) GetDeploymentSender(req *http.Request) (*http.Response, error) {
10264	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10265}
10266
10267// GetDeploymentResponder handles the response to the GetDeployment request. The method always
10268// closes the http.Response Body.
10269func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Deployment, err error) {
10270	err = autorest.Respond(
10271		resp,
10272		azure.WithErrorUnlessStatusCode(http.StatusOK),
10273		autorest.ByUnmarshallingJSON(&result),
10274		autorest.ByClosing())
10275	result.Response = autorest.Response{Response: resp}
10276	return
10277}
10278
10279// GetDeploymentSlot description for Get a deployment by its ID for an app, or a deployment slot.
10280// Parameters:
10281// resourceGroupName - name of the resource group to which the resource belongs.
10282// name - name of the app.
10283// ID - deployment ID.
10284// slot - name of the deployment slot. If a slot is not specified, the API gets a deployment for the production
10285// slot.
10286func (client AppsClient) GetDeploymentSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) {
10287	if tracing.IsEnabled() {
10288		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDeploymentSlot")
10289		defer func() {
10290			sc := -1
10291			if result.Response.Response != nil {
10292				sc = result.Response.Response.StatusCode
10293			}
10294			tracing.EndSpan(ctx, sc, err)
10295		}()
10296	}
10297	if err := validation.Validate([]validation.Validation{
10298		{TargetValue: resourceGroupName,
10299			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10300				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10301				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10302		return result, validation.NewError("web.AppsClient", "GetDeploymentSlot", err.Error())
10303	}
10304
10305	req, err := client.GetDeploymentSlotPreparer(ctx, resourceGroupName, name, ID, slot)
10306	if err != nil {
10307		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", nil, "Failure preparing request")
10308		return
10309	}
10310
10311	resp, err := client.GetDeploymentSlotSender(req)
10312	if err != nil {
10313		result.Response = autorest.Response{Response: resp}
10314		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure sending request")
10315		return
10316	}
10317
10318	result, err = client.GetDeploymentSlotResponder(resp)
10319	if err != nil {
10320		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDeploymentSlot", resp, "Failure responding to request")
10321		return
10322	}
10323
10324	return
10325}
10326
10327// GetDeploymentSlotPreparer prepares the GetDeploymentSlot request.
10328func (client AppsClient) GetDeploymentSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
10329	pathParameters := map[string]interface{}{
10330		"id":                autorest.Encode("path", ID),
10331		"name":              autorest.Encode("path", name),
10332		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10333		"slot":              autorest.Encode("path", slot),
10334		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10335	}
10336
10337	const APIVersion = "2020-09-01"
10338	queryParameters := map[string]interface{}{
10339		"api-version": APIVersion,
10340	}
10341
10342	preparer := autorest.CreatePreparer(
10343		autorest.AsGet(),
10344		autorest.WithBaseURL(client.BaseURI),
10345		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", pathParameters),
10346		autorest.WithQueryParameters(queryParameters))
10347	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10348}
10349
10350// GetDeploymentSlotSender sends the GetDeploymentSlot request. The method will close the
10351// http.Response Body if it receives an error.
10352func (client AppsClient) GetDeploymentSlotSender(req *http.Request) (*http.Response, error) {
10353	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10354}
10355
10356// GetDeploymentSlotResponder handles the response to the GetDeploymentSlot request. The method always
10357// closes the http.Response Body.
10358func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) {
10359	err = autorest.Respond(
10360		resp,
10361		azure.WithErrorUnlessStatusCode(http.StatusOK),
10362		autorest.ByUnmarshallingJSON(&result),
10363		autorest.ByClosing())
10364	result.Response = autorest.Response{Response: resp}
10365	return
10366}
10367
10368// GetDiagnosticLogsConfiguration description for Gets the logging configuration of an app.
10369// Parameters:
10370// resourceGroupName - name of the resource group to which the resource belongs.
10371// name - name of the app.
10372func (client AppsClient) GetDiagnosticLogsConfiguration(ctx context.Context, resourceGroupName string, name string) (result SiteLogsConfig, err error) {
10373	if tracing.IsEnabled() {
10374		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfiguration")
10375		defer func() {
10376			sc := -1
10377			if result.Response.Response != nil {
10378				sc = result.Response.Response.StatusCode
10379			}
10380			tracing.EndSpan(ctx, sc, err)
10381		}()
10382	}
10383	if err := validation.Validate([]validation.Validation{
10384		{TargetValue: resourceGroupName,
10385			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10386				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10387				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10388		return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfiguration", err.Error())
10389	}
10390
10391	req, err := client.GetDiagnosticLogsConfigurationPreparer(ctx, resourceGroupName, name)
10392	if err != nil {
10393		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", nil, "Failure preparing request")
10394		return
10395	}
10396
10397	resp, err := client.GetDiagnosticLogsConfigurationSender(req)
10398	if err != nil {
10399		result.Response = autorest.Response{Response: resp}
10400		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure sending request")
10401		return
10402	}
10403
10404	result, err = client.GetDiagnosticLogsConfigurationResponder(resp)
10405	if err != nil {
10406		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfiguration", resp, "Failure responding to request")
10407		return
10408	}
10409
10410	return
10411}
10412
10413// GetDiagnosticLogsConfigurationPreparer prepares the GetDiagnosticLogsConfiguration request.
10414func (client AppsClient) GetDiagnosticLogsConfigurationPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
10415	pathParameters := map[string]interface{}{
10416		"name":              autorest.Encode("path", name),
10417		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10418		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10419	}
10420
10421	const APIVersion = "2020-09-01"
10422	queryParameters := map[string]interface{}{
10423		"api-version": APIVersion,
10424	}
10425
10426	preparer := autorest.CreatePreparer(
10427		autorest.AsGet(),
10428		autorest.WithBaseURL(client.BaseURI),
10429		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters),
10430		autorest.WithQueryParameters(queryParameters))
10431	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10432}
10433
10434// GetDiagnosticLogsConfigurationSender sends the GetDiagnosticLogsConfiguration request. The method will close the
10435// http.Response Body if it receives an error.
10436func (client AppsClient) GetDiagnosticLogsConfigurationSender(req *http.Request) (*http.Response, error) {
10437	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10438}
10439
10440// GetDiagnosticLogsConfigurationResponder handles the response to the GetDiagnosticLogsConfiguration request. The method always
10441// closes the http.Response Body.
10442func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Response) (result SiteLogsConfig, err error) {
10443	err = autorest.Respond(
10444		resp,
10445		azure.WithErrorUnlessStatusCode(http.StatusOK),
10446		autorest.ByUnmarshallingJSON(&result),
10447		autorest.ByClosing())
10448	result.Response = autorest.Response{Response: resp}
10449	return
10450}
10451
10452// GetDiagnosticLogsConfigurationSlot description for Gets the logging configuration of an app.
10453// Parameters:
10454// resourceGroupName - name of the resource group to which the resource belongs.
10455// name - name of the app.
10456// slot - name of the deployment slot. If a slot is not specified, the API will get the logging configuration
10457// for the production slot.
10458func (client AppsClient) GetDiagnosticLogsConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) {
10459	if tracing.IsEnabled() {
10460		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDiagnosticLogsConfigurationSlot")
10461		defer func() {
10462			sc := -1
10463			if result.Response.Response != nil {
10464				sc = result.Response.Response.StatusCode
10465			}
10466			tracing.EndSpan(ctx, sc, err)
10467		}()
10468	}
10469	if err := validation.Validate([]validation.Validation{
10470		{TargetValue: resourceGroupName,
10471			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10472				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10473				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10474		return result, validation.NewError("web.AppsClient", "GetDiagnosticLogsConfigurationSlot", err.Error())
10475	}
10476
10477	req, err := client.GetDiagnosticLogsConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
10478	if err != nil {
10479		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", nil, "Failure preparing request")
10480		return
10481	}
10482
10483	resp, err := client.GetDiagnosticLogsConfigurationSlotSender(req)
10484	if err != nil {
10485		result.Response = autorest.Response{Response: resp}
10486		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure sending request")
10487		return
10488	}
10489
10490	result, err = client.GetDiagnosticLogsConfigurationSlotResponder(resp)
10491	if err != nil {
10492		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDiagnosticLogsConfigurationSlot", resp, "Failure responding to request")
10493		return
10494	}
10495
10496	return
10497}
10498
10499// GetDiagnosticLogsConfigurationSlotPreparer prepares the GetDiagnosticLogsConfigurationSlot request.
10500func (client AppsClient) GetDiagnosticLogsConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
10501	pathParameters := map[string]interface{}{
10502		"name":              autorest.Encode("path", name),
10503		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10504		"slot":              autorest.Encode("path", slot),
10505		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10506	}
10507
10508	const APIVersion = "2020-09-01"
10509	queryParameters := map[string]interface{}{
10510		"api-version": APIVersion,
10511	}
10512
10513	preparer := autorest.CreatePreparer(
10514		autorest.AsGet(),
10515		autorest.WithBaseURL(client.BaseURI),
10516		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters),
10517		autorest.WithQueryParameters(queryParameters))
10518	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10519}
10520
10521// GetDiagnosticLogsConfigurationSlotSender sends the GetDiagnosticLogsConfigurationSlot request. The method will close the
10522// http.Response Body if it receives an error.
10523func (client AppsClient) GetDiagnosticLogsConfigurationSlotSender(req *http.Request) (*http.Response, error) {
10524	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10525}
10526
10527// GetDiagnosticLogsConfigurationSlotResponder handles the response to the GetDiagnosticLogsConfigurationSlot request. The method always
10528// closes the http.Response Body.
10529func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) {
10530	err = autorest.Respond(
10531		resp,
10532		azure.WithErrorUnlessStatusCode(http.StatusOK),
10533		autorest.ByUnmarshallingJSON(&result),
10534		autorest.ByClosing())
10535	result.Response = autorest.Response{Response: resp}
10536	return
10537}
10538
10539// GetDomainOwnershipIdentifier description for Get domain ownership identifier for web app.
10540// Parameters:
10541// resourceGroupName - name of the resource group to which the resource belongs.
10542// name - name of the app.
10543// domainOwnershipIdentifierName - name of domain ownership identifier.
10544func (client AppsClient) GetDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) {
10545	if tracing.IsEnabled() {
10546		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifier")
10547		defer func() {
10548			sc := -1
10549			if result.Response.Response != nil {
10550				sc = result.Response.Response.StatusCode
10551			}
10552			tracing.EndSpan(ctx, sc, err)
10553		}()
10554	}
10555	if err := validation.Validate([]validation.Validation{
10556		{TargetValue: resourceGroupName,
10557			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10558				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10559				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10560		return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifier", err.Error())
10561	}
10562
10563	req, err := client.GetDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName)
10564	if err != nil {
10565		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", nil, "Failure preparing request")
10566		return
10567	}
10568
10569	resp, err := client.GetDomainOwnershipIdentifierSender(req)
10570	if err != nil {
10571		result.Response = autorest.Response{Response: resp}
10572		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure sending request")
10573		return
10574	}
10575
10576	result, err = client.GetDomainOwnershipIdentifierResponder(resp)
10577	if err != nil {
10578		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifier", resp, "Failure responding to request")
10579		return
10580	}
10581
10582	return
10583}
10584
10585// GetDomainOwnershipIdentifierPreparer prepares the GetDomainOwnershipIdentifier request.
10586func (client AppsClient) GetDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string) (*http.Request, error) {
10587	pathParameters := map[string]interface{}{
10588		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
10589		"name":                          autorest.Encode("path", name),
10590		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
10591		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
10592	}
10593
10594	const APIVersion = "2020-09-01"
10595	queryParameters := map[string]interface{}{
10596		"api-version": APIVersion,
10597	}
10598
10599	preparer := autorest.CreatePreparer(
10600		autorest.AsGet(),
10601		autorest.WithBaseURL(client.BaseURI),
10602		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
10603		autorest.WithQueryParameters(queryParameters))
10604	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10605}
10606
10607// GetDomainOwnershipIdentifierSender sends the GetDomainOwnershipIdentifier request. The method will close the
10608// http.Response Body if it receives an error.
10609func (client AppsClient) GetDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
10610	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10611}
10612
10613// GetDomainOwnershipIdentifierResponder handles the response to the GetDomainOwnershipIdentifier request. The method always
10614// closes the http.Response Body.
10615func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
10616	err = autorest.Respond(
10617		resp,
10618		azure.WithErrorUnlessStatusCode(http.StatusOK),
10619		autorest.ByUnmarshallingJSON(&result),
10620		autorest.ByClosing())
10621	result.Response = autorest.Response{Response: resp}
10622	return
10623}
10624
10625// GetDomainOwnershipIdentifierSlot description for Get domain ownership identifier for web app.
10626// Parameters:
10627// resourceGroupName - name of the resource group to which the resource belongs.
10628// name - name of the app.
10629// domainOwnershipIdentifierName - name of domain ownership identifier.
10630// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
10631// production slot.
10632func (client AppsClient) GetDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) {
10633	if tracing.IsEnabled() {
10634		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetDomainOwnershipIdentifierSlot")
10635		defer func() {
10636			sc := -1
10637			if result.Response.Response != nil {
10638				sc = result.Response.Response.StatusCode
10639			}
10640			tracing.EndSpan(ctx, sc, err)
10641		}()
10642	}
10643	if err := validation.Validate([]validation.Validation{
10644		{TargetValue: resourceGroupName,
10645			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10646				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10647				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10648		return result, validation.NewError("web.AppsClient", "GetDomainOwnershipIdentifierSlot", err.Error())
10649	}
10650
10651	req, err := client.GetDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, slot)
10652	if err != nil {
10653		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
10654		return
10655	}
10656
10657	resp, err := client.GetDomainOwnershipIdentifierSlotSender(req)
10658	if err != nil {
10659		result.Response = autorest.Response{Response: resp}
10660		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure sending request")
10661		return
10662	}
10663
10664	result, err = client.GetDomainOwnershipIdentifierSlotResponder(resp)
10665	if err != nil {
10666		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
10667		return
10668	}
10669
10670	return
10671}
10672
10673// GetDomainOwnershipIdentifierSlotPreparer prepares the GetDomainOwnershipIdentifierSlot request.
10674func (client AppsClient) GetDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (*http.Request, error) {
10675	pathParameters := map[string]interface{}{
10676		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
10677		"name":                          autorest.Encode("path", name),
10678		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
10679		"slot":                          autorest.Encode("path", slot),
10680		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
10681	}
10682
10683	const APIVersion = "2020-09-01"
10684	queryParameters := map[string]interface{}{
10685		"api-version": APIVersion,
10686	}
10687
10688	preparer := autorest.CreatePreparer(
10689		autorest.AsGet(),
10690		autorest.WithBaseURL(client.BaseURI),
10691		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
10692		autorest.WithQueryParameters(queryParameters))
10693	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10694}
10695
10696// GetDomainOwnershipIdentifierSlotSender sends the GetDomainOwnershipIdentifierSlot request. The method will close the
10697// http.Response Body if it receives an error.
10698func (client AppsClient) GetDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
10699	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10700}
10701
10702// GetDomainOwnershipIdentifierSlotResponder handles the response to the GetDomainOwnershipIdentifierSlot request. The method always
10703// closes the http.Response Body.
10704func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
10705	err = autorest.Respond(
10706		resp,
10707		azure.WithErrorUnlessStatusCode(http.StatusOK),
10708		autorest.ByUnmarshallingJSON(&result),
10709		autorest.ByClosing())
10710	result.Response = autorest.Response{Response: resp}
10711	return
10712}
10713
10714// GetFtpAllowed description for Returns whether FTP is allowed on the site or not.
10715// Parameters:
10716// resourceGroupName - name of the resource group to which the resource belongs.
10717// name - name of the app.
10718func (client AppsClient) GetFtpAllowed(ctx context.Context, resourceGroupName string, name string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
10719	if tracing.IsEnabled() {
10720		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFtpAllowed")
10721		defer func() {
10722			sc := -1
10723			if result.Response.Response != nil {
10724				sc = result.Response.Response.StatusCode
10725			}
10726			tracing.EndSpan(ctx, sc, err)
10727		}()
10728	}
10729	if err := validation.Validate([]validation.Validation{
10730		{TargetValue: resourceGroupName,
10731			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10732				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10733				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10734		return result, validation.NewError("web.AppsClient", "GetFtpAllowed", err.Error())
10735	}
10736
10737	req, err := client.GetFtpAllowedPreparer(ctx, resourceGroupName, name)
10738	if err != nil {
10739		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowed", nil, "Failure preparing request")
10740		return
10741	}
10742
10743	resp, err := client.GetFtpAllowedSender(req)
10744	if err != nil {
10745		result.Response = autorest.Response{Response: resp}
10746		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowed", resp, "Failure sending request")
10747		return
10748	}
10749
10750	result, err = client.GetFtpAllowedResponder(resp)
10751	if err != nil {
10752		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFtpAllowed", resp, "Failure responding to request")
10753		return
10754	}
10755
10756	return
10757}
10758
10759// GetFtpAllowedPreparer prepares the GetFtpAllowed request.
10760func (client AppsClient) GetFtpAllowedPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
10761	pathParameters := map[string]interface{}{
10762		"name":              autorest.Encode("path", name),
10763		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10764		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10765	}
10766
10767	const APIVersion = "2020-09-01"
10768	queryParameters := map[string]interface{}{
10769		"api-version": APIVersion,
10770	}
10771
10772	preparer := autorest.CreatePreparer(
10773		autorest.AsGet(),
10774		autorest.WithBaseURL(client.BaseURI),
10775		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp", pathParameters),
10776		autorest.WithQueryParameters(queryParameters))
10777	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10778}
10779
10780// GetFtpAllowedSender sends the GetFtpAllowed request. The method will close the
10781// http.Response Body if it receives an error.
10782func (client AppsClient) GetFtpAllowedSender(req *http.Request) (*http.Response, error) {
10783	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10784}
10785
10786// GetFtpAllowedResponder handles the response to the GetFtpAllowed request. The method always
10787// closes the http.Response Body.
10788func (client AppsClient) GetFtpAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
10789	err = autorest.Respond(
10790		resp,
10791		azure.WithErrorUnlessStatusCode(http.StatusOK),
10792		autorest.ByUnmarshallingJSON(&result),
10793		autorest.ByClosing())
10794	result.Response = autorest.Response{Response: resp}
10795	return
10796}
10797
10798// GetFunction description for Get function information by its ID for web site, or a deployment slot.
10799// Parameters:
10800// resourceGroupName - name of the resource group to which the resource belongs.
10801// name - site name.
10802// functionName - function name.
10803func (client AppsClient) GetFunction(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) {
10804	if tracing.IsEnabled() {
10805		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunction")
10806		defer func() {
10807			sc := -1
10808			if result.Response.Response != nil {
10809				sc = result.Response.Response.StatusCode
10810			}
10811			tracing.EndSpan(ctx, sc, err)
10812		}()
10813	}
10814	if err := validation.Validate([]validation.Validation{
10815		{TargetValue: resourceGroupName,
10816			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10817				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10818				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10819		return result, validation.NewError("web.AppsClient", "GetFunction", err.Error())
10820	}
10821
10822	req, err := client.GetFunctionPreparer(ctx, resourceGroupName, name, functionName)
10823	if err != nil {
10824		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request")
10825		return
10826	}
10827
10828	resp, err := client.GetFunctionSender(req)
10829	if err != nil {
10830		result.Response = autorest.Response{Response: resp}
10831		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request")
10832		return
10833	}
10834
10835	result, err = client.GetFunctionResponder(resp)
10836	if err != nil {
10837		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request")
10838		return
10839	}
10840
10841	return
10842}
10843
10844// GetFunctionPreparer prepares the GetFunction request.
10845func (client AppsClient) GetFunctionPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
10846	pathParameters := map[string]interface{}{
10847		"functionName":      autorest.Encode("path", functionName),
10848		"name":              autorest.Encode("path", name),
10849		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10850		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10851	}
10852
10853	const APIVersion = "2020-09-01"
10854	queryParameters := map[string]interface{}{
10855		"api-version": APIVersion,
10856	}
10857
10858	preparer := autorest.CreatePreparer(
10859		autorest.AsGet(),
10860		autorest.WithBaseURL(client.BaseURI),
10861		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters),
10862		autorest.WithQueryParameters(queryParameters))
10863	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10864}
10865
10866// GetFunctionSender sends the GetFunction request. The method will close the
10867// http.Response Body if it receives an error.
10868func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) {
10869	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10870}
10871
10872// GetFunctionResponder handles the response to the GetFunction request. The method always
10873// closes the http.Response Body.
10874func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) {
10875	err = autorest.Respond(
10876		resp,
10877		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
10878		autorest.ByUnmarshallingJSON(&result),
10879		autorest.ByClosing())
10880	result.Response = autorest.Response{Response: resp}
10881	return
10882}
10883
10884// GetFunctionsAdminToken description for Fetch a short lived token that can be exchanged for a master key.
10885// Parameters:
10886// resourceGroupName - name of the resource group to which the resource belongs.
10887// name - name of web app.
10888func (client AppsClient) GetFunctionsAdminToken(ctx context.Context, resourceGroupName string, name string) (result String, err error) {
10889	if tracing.IsEnabled() {
10890		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminToken")
10891		defer func() {
10892			sc := -1
10893			if result.Response.Response != nil {
10894				sc = result.Response.Response.StatusCode
10895			}
10896			tracing.EndSpan(ctx, sc, err)
10897		}()
10898	}
10899	if err := validation.Validate([]validation.Validation{
10900		{TargetValue: resourceGroupName,
10901			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10902				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10903				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10904		return result, validation.NewError("web.AppsClient", "GetFunctionsAdminToken", err.Error())
10905	}
10906
10907	req, err := client.GetFunctionsAdminTokenPreparer(ctx, resourceGroupName, name)
10908	if err != nil {
10909		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request")
10910		return
10911	}
10912
10913	resp, err := client.GetFunctionsAdminTokenSender(req)
10914	if err != nil {
10915		result.Response = autorest.Response{Response: resp}
10916		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request")
10917		return
10918	}
10919
10920	result, err = client.GetFunctionsAdminTokenResponder(resp)
10921	if err != nil {
10922		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request")
10923		return
10924	}
10925
10926	return
10927}
10928
10929// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request.
10930func (client AppsClient) GetFunctionsAdminTokenPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
10931	pathParameters := map[string]interface{}{
10932		"name":              autorest.Encode("path", name),
10933		"resourceGroupName": autorest.Encode("path", resourceGroupName),
10934		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
10935	}
10936
10937	const APIVersion = "2020-09-01"
10938	queryParameters := map[string]interface{}{
10939		"api-version": APIVersion,
10940	}
10941
10942	preparer := autorest.CreatePreparer(
10943		autorest.AsGet(),
10944		autorest.WithBaseURL(client.BaseURI),
10945		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters),
10946		autorest.WithQueryParameters(queryParameters))
10947	return preparer.Prepare((&http.Request{}).WithContext(ctx))
10948}
10949
10950// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the
10951// http.Response Body if it receives an error.
10952func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) {
10953	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
10954}
10955
10956// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always
10957// closes the http.Response Body.
10958func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) {
10959	err = autorest.Respond(
10960		resp,
10961		azure.WithErrorUnlessStatusCode(http.StatusOK),
10962		autorest.ByUnmarshallingJSON(&result.Value),
10963		autorest.ByClosing())
10964	result.Response = autorest.Response{Response: resp}
10965	return
10966}
10967
10968// GetFunctionsAdminTokenSlot description for Fetch a short lived token that can be exchanged for a master key.
10969// Parameters:
10970// resourceGroupName - name of the resource group to which the resource belongs.
10971// name - name of web app.
10972// slot - name of web app slot. If not specified then will default to production slot.
10973func (client AppsClient) GetFunctionsAdminTokenSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result String, err error) {
10974	if tracing.IsEnabled() {
10975		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetFunctionsAdminTokenSlot")
10976		defer func() {
10977			sc := -1
10978			if result.Response.Response != nil {
10979				sc = result.Response.Response.StatusCode
10980			}
10981			tracing.EndSpan(ctx, sc, err)
10982		}()
10983	}
10984	if err := validation.Validate([]validation.Validation{
10985		{TargetValue: resourceGroupName,
10986			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
10987				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
10988				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
10989		return result, validation.NewError("web.AppsClient", "GetFunctionsAdminTokenSlot", err.Error())
10990	}
10991
10992	req, err := client.GetFunctionsAdminTokenSlotPreparer(ctx, resourceGroupName, name, slot)
10993	if err != nil {
10994		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request")
10995		return
10996	}
10997
10998	resp, err := client.GetFunctionsAdminTokenSlotSender(req)
10999	if err != nil {
11000		result.Response = autorest.Response{Response: resp}
11001		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request")
11002		return
11003	}
11004
11005	result, err = client.GetFunctionsAdminTokenSlotResponder(resp)
11006	if err != nil {
11007		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request")
11008		return
11009	}
11010
11011	return
11012}
11013
11014// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request.
11015func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
11016	pathParameters := map[string]interface{}{
11017		"name":              autorest.Encode("path", name),
11018		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11019		"slot":              autorest.Encode("path", slot),
11020		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11021	}
11022
11023	const APIVersion = "2020-09-01"
11024	queryParameters := map[string]interface{}{
11025		"api-version": APIVersion,
11026	}
11027
11028	preparer := autorest.CreatePreparer(
11029		autorest.AsGet(),
11030		autorest.WithBaseURL(client.BaseURI),
11031		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters),
11032		autorest.WithQueryParameters(queryParameters))
11033	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11034}
11035
11036// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the
11037// http.Response Body if it receives an error.
11038func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) {
11039	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11040}
11041
11042// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always
11043// closes the http.Response Body.
11044func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) {
11045	err = autorest.Respond(
11046		resp,
11047		azure.WithErrorUnlessStatusCode(http.StatusOK),
11048		autorest.ByUnmarshallingJSON(&result.Value),
11049		autorest.ByClosing())
11050	result.Response = autorest.Response{Response: resp}
11051	return
11052}
11053
11054// GetHostNameBinding description for Get the named hostname binding for an app (or deployment slot, if specified).
11055// Parameters:
11056// resourceGroupName - name of the resource group to which the resource belongs.
11057// name - name of the app.
11058// hostName - hostname in the hostname binding.
11059func (client AppsClient) GetHostNameBinding(ctx context.Context, resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) {
11060	if tracing.IsEnabled() {
11061		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBinding")
11062		defer func() {
11063			sc := -1
11064			if result.Response.Response != nil {
11065				sc = result.Response.Response.StatusCode
11066			}
11067			tracing.EndSpan(ctx, sc, err)
11068		}()
11069	}
11070	if err := validation.Validate([]validation.Validation{
11071		{TargetValue: resourceGroupName,
11072			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11073				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11074				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11075		return result, validation.NewError("web.AppsClient", "GetHostNameBinding", err.Error())
11076	}
11077
11078	req, err := client.GetHostNameBindingPreparer(ctx, resourceGroupName, name, hostName)
11079	if err != nil {
11080		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", nil, "Failure preparing request")
11081		return
11082	}
11083
11084	resp, err := client.GetHostNameBindingSender(req)
11085	if err != nil {
11086		result.Response = autorest.Response{Response: resp}
11087		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure sending request")
11088		return
11089	}
11090
11091	result, err = client.GetHostNameBindingResponder(resp)
11092	if err != nil {
11093		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBinding", resp, "Failure responding to request")
11094		return
11095	}
11096
11097	return
11098}
11099
11100// GetHostNameBindingPreparer prepares the GetHostNameBinding request.
11101func (client AppsClient) GetHostNameBindingPreparer(ctx context.Context, resourceGroupName string, name string, hostName string) (*http.Request, error) {
11102	pathParameters := map[string]interface{}{
11103		"hostName":          autorest.Encode("path", hostName),
11104		"name":              autorest.Encode("path", name),
11105		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11106		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11107	}
11108
11109	const APIVersion = "2020-09-01"
11110	queryParameters := map[string]interface{}{
11111		"api-version": APIVersion,
11112	}
11113
11114	preparer := autorest.CreatePreparer(
11115		autorest.AsGet(),
11116		autorest.WithBaseURL(client.BaseURI),
11117		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}", pathParameters),
11118		autorest.WithQueryParameters(queryParameters))
11119	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11120}
11121
11122// GetHostNameBindingSender sends the GetHostNameBinding request. The method will close the
11123// http.Response Body if it receives an error.
11124func (client AppsClient) GetHostNameBindingSender(req *http.Request) (*http.Response, error) {
11125	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11126}
11127
11128// GetHostNameBindingResponder handles the response to the GetHostNameBinding request. The method always
11129// closes the http.Response Body.
11130func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (result HostNameBinding, err error) {
11131	err = autorest.Respond(
11132		resp,
11133		azure.WithErrorUnlessStatusCode(http.StatusOK),
11134		autorest.ByUnmarshallingJSON(&result),
11135		autorest.ByClosing())
11136	result.Response = autorest.Response{Response: resp}
11137	return
11138}
11139
11140// GetHostNameBindingSlot description for Get the named hostname binding for an app (or deployment slot, if specified).
11141// Parameters:
11142// resourceGroupName - name of the resource group to which the resource belongs.
11143// name - name of the app.
11144// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production
11145// slot.
11146// hostName - hostname in the hostname binding.
11147func (client AppsClient) GetHostNameBindingSlot(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) {
11148	if tracing.IsEnabled() {
11149		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHostNameBindingSlot")
11150		defer func() {
11151			sc := -1
11152			if result.Response.Response != nil {
11153				sc = result.Response.Response.StatusCode
11154			}
11155			tracing.EndSpan(ctx, sc, err)
11156		}()
11157	}
11158	if err := validation.Validate([]validation.Validation{
11159		{TargetValue: resourceGroupName,
11160			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11161				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11162				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11163		return result, validation.NewError("web.AppsClient", "GetHostNameBindingSlot", err.Error())
11164	}
11165
11166	req, err := client.GetHostNameBindingSlotPreparer(ctx, resourceGroupName, name, slot, hostName)
11167	if err != nil {
11168		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", nil, "Failure preparing request")
11169		return
11170	}
11171
11172	resp, err := client.GetHostNameBindingSlotSender(req)
11173	if err != nil {
11174		result.Response = autorest.Response{Response: resp}
11175		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure sending request")
11176		return
11177	}
11178
11179	result, err = client.GetHostNameBindingSlotResponder(resp)
11180	if err != nil {
11181		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHostNameBindingSlot", resp, "Failure responding to request")
11182		return
11183	}
11184
11185	return
11186}
11187
11188// GetHostNameBindingSlotPreparer prepares the GetHostNameBindingSlot request.
11189func (client AppsClient) GetHostNameBindingSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, hostName string) (*http.Request, error) {
11190	pathParameters := map[string]interface{}{
11191		"hostName":          autorest.Encode("path", hostName),
11192		"name":              autorest.Encode("path", name),
11193		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11194		"slot":              autorest.Encode("path", slot),
11195		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11196	}
11197
11198	const APIVersion = "2020-09-01"
11199	queryParameters := map[string]interface{}{
11200		"api-version": APIVersion,
11201	}
11202
11203	preparer := autorest.CreatePreparer(
11204		autorest.AsGet(),
11205		autorest.WithBaseURL(client.BaseURI),
11206		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}", pathParameters),
11207		autorest.WithQueryParameters(queryParameters))
11208	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11209}
11210
11211// GetHostNameBindingSlotSender sends the GetHostNameBindingSlot request. The method will close the
11212// http.Response Body if it receives an error.
11213func (client AppsClient) GetHostNameBindingSlotSender(req *http.Request) (*http.Response, error) {
11214	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11215}
11216
11217// GetHostNameBindingSlotResponder handles the response to the GetHostNameBindingSlot request. The method always
11218// closes the http.Response Body.
11219func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (result HostNameBinding, err error) {
11220	err = autorest.Respond(
11221		resp,
11222		azure.WithErrorUnlessStatusCode(http.StatusOK),
11223		autorest.ByUnmarshallingJSON(&result),
11224		autorest.ByClosing())
11225	result.Response = autorest.Response{Response: resp}
11226	return
11227}
11228
11229// GetHybridConnection description for Retrieves a specific Service Bus Hybrid Connection used by this Web App.
11230// Parameters:
11231// resourceGroupName - name of the resource group to which the resource belongs.
11232// name - the name of the web app.
11233// namespaceName - the namespace for this hybrid connection.
11234// relayName - the relay name for this hybrid connection.
11235func (client AppsClient) GetHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) {
11236	if tracing.IsEnabled() {
11237		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnection")
11238		defer func() {
11239			sc := -1
11240			if result.Response.Response != nil {
11241				sc = result.Response.Response.StatusCode
11242			}
11243			tracing.EndSpan(ctx, sc, err)
11244		}()
11245	}
11246	if err := validation.Validate([]validation.Validation{
11247		{TargetValue: resourceGroupName,
11248			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11249				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11250				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11251		return result, validation.NewError("web.AppsClient", "GetHybridConnection", err.Error())
11252	}
11253
11254	req, err := client.GetHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName)
11255	if err != nil {
11256		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", nil, "Failure preparing request")
11257		return
11258	}
11259
11260	resp, err := client.GetHybridConnectionSender(req)
11261	if err != nil {
11262		result.Response = autorest.Response{Response: resp}
11263		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure sending request")
11264		return
11265	}
11266
11267	result, err = client.GetHybridConnectionResponder(resp)
11268	if err != nil {
11269		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnection", resp, "Failure responding to request")
11270		return
11271	}
11272
11273	return
11274}
11275
11276// GetHybridConnectionPreparer prepares the GetHybridConnection request.
11277func (client AppsClient) GetHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string) (*http.Request, error) {
11278	pathParameters := map[string]interface{}{
11279		"name":              autorest.Encode("path", name),
11280		"namespaceName":     autorest.Encode("path", namespaceName),
11281		"relayName":         autorest.Encode("path", relayName),
11282		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11283		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11284	}
11285
11286	const APIVersion = "2020-09-01"
11287	queryParameters := map[string]interface{}{
11288		"api-version": APIVersion,
11289	}
11290
11291	preparer := autorest.CreatePreparer(
11292		autorest.AsGet(),
11293		autorest.WithBaseURL(client.BaseURI),
11294		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
11295		autorest.WithQueryParameters(queryParameters))
11296	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11297}
11298
11299// GetHybridConnectionSender sends the GetHybridConnection request. The method will close the
11300// http.Response Body if it receives an error.
11301func (client AppsClient) GetHybridConnectionSender(req *http.Request) (*http.Response, error) {
11302	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11303}
11304
11305// GetHybridConnectionResponder handles the response to the GetHybridConnection request. The method always
11306// closes the http.Response Body.
11307func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
11308	err = autorest.Respond(
11309		resp,
11310		azure.WithErrorUnlessStatusCode(http.StatusOK),
11311		autorest.ByUnmarshallingJSON(&result),
11312		autorest.ByClosing())
11313	result.Response = autorest.Response{Response: resp}
11314	return
11315}
11316
11317// GetHybridConnectionSlot description for Retrieves a specific Service Bus Hybrid Connection used by this Web App.
11318// Parameters:
11319// resourceGroupName - name of the resource group to which the resource belongs.
11320// name - the name of the web app.
11321// namespaceName - the namespace for this hybrid connection.
11322// relayName - the relay name for this hybrid connection.
11323// slot - the name of the slot for the web app.
11324func (client AppsClient) GetHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) {
11325	if tracing.IsEnabled() {
11326		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetHybridConnectionSlot")
11327		defer func() {
11328			sc := -1
11329			if result.Response.Response != nil {
11330				sc = result.Response.Response.StatusCode
11331			}
11332			tracing.EndSpan(ctx, sc, err)
11333		}()
11334	}
11335	if err := validation.Validate([]validation.Validation{
11336		{TargetValue: resourceGroupName,
11337			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11338				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11339				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11340		return result, validation.NewError("web.AppsClient", "GetHybridConnectionSlot", err.Error())
11341	}
11342
11343	req, err := client.GetHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, slot)
11344	if err != nil {
11345		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", nil, "Failure preparing request")
11346		return
11347	}
11348
11349	resp, err := client.GetHybridConnectionSlotSender(req)
11350	if err != nil {
11351		result.Response = autorest.Response{Response: resp}
11352		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure sending request")
11353		return
11354	}
11355
11356	result, err = client.GetHybridConnectionSlotResponder(resp)
11357	if err != nil {
11358		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetHybridConnectionSlot", resp, "Failure responding to request")
11359		return
11360	}
11361
11362	return
11363}
11364
11365// GetHybridConnectionSlotPreparer prepares the GetHybridConnectionSlot request.
11366func (client AppsClient) GetHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, slot string) (*http.Request, error) {
11367	pathParameters := map[string]interface{}{
11368		"name":              autorest.Encode("path", name),
11369		"namespaceName":     autorest.Encode("path", namespaceName),
11370		"relayName":         autorest.Encode("path", relayName),
11371		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11372		"slot":              autorest.Encode("path", slot),
11373		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11374	}
11375
11376	const APIVersion = "2020-09-01"
11377	queryParameters := map[string]interface{}{
11378		"api-version": APIVersion,
11379	}
11380
11381	preparer := autorest.CreatePreparer(
11382		autorest.AsGet(),
11383		autorest.WithBaseURL(client.BaseURI),
11384		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
11385		autorest.WithQueryParameters(queryParameters))
11386	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11387}
11388
11389// GetHybridConnectionSlotSender sends the GetHybridConnectionSlot request. The method will close the
11390// http.Response Body if it receives an error.
11391func (client AppsClient) GetHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
11392	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11393}
11394
11395// GetHybridConnectionSlotResponder handles the response to the GetHybridConnectionSlot request. The method always
11396// closes the http.Response Body.
11397func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
11398	err = autorest.Respond(
11399		resp,
11400		azure.WithErrorUnlessStatusCode(http.StatusOK),
11401		autorest.ByUnmarshallingJSON(&result),
11402		autorest.ByClosing())
11403	result.Response = autorest.Response{Response: resp}
11404	return
11405}
11406
11407// GetInstanceFunctionSlot description for Get function information by its ID for web site, or a deployment slot.
11408// Parameters:
11409// resourceGroupName - name of the resource group to which the resource belongs.
11410// name - site name.
11411// functionName - function name.
11412// slot - name of the deployment slot.
11413func (client AppsClient) GetInstanceFunctionSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) {
11414	if tracing.IsEnabled() {
11415		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceFunctionSlot")
11416		defer func() {
11417			sc := -1
11418			if result.Response.Response != nil {
11419				sc = result.Response.Response.StatusCode
11420			}
11421			tracing.EndSpan(ctx, sc, err)
11422		}()
11423	}
11424	if err := validation.Validate([]validation.Validation{
11425		{TargetValue: resourceGroupName,
11426			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11427				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11428				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11429		return result, validation.NewError("web.AppsClient", "GetInstanceFunctionSlot", err.Error())
11430	}
11431
11432	req, err := client.GetInstanceFunctionSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
11433	if err != nil {
11434		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request")
11435		return
11436	}
11437
11438	resp, err := client.GetInstanceFunctionSlotSender(req)
11439	if err != nil {
11440		result.Response = autorest.Response{Response: resp}
11441		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request")
11442		return
11443	}
11444
11445	result, err = client.GetInstanceFunctionSlotResponder(resp)
11446	if err != nil {
11447		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request")
11448		return
11449	}
11450
11451	return
11452}
11453
11454// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request.
11455func (client AppsClient) GetInstanceFunctionSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
11456	pathParameters := map[string]interface{}{
11457		"functionName":      autorest.Encode("path", functionName),
11458		"name":              autorest.Encode("path", name),
11459		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11460		"slot":              autorest.Encode("path", slot),
11461		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11462	}
11463
11464	const APIVersion = "2020-09-01"
11465	queryParameters := map[string]interface{}{
11466		"api-version": APIVersion,
11467	}
11468
11469	preparer := autorest.CreatePreparer(
11470		autorest.AsGet(),
11471		autorest.WithBaseURL(client.BaseURI),
11472		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters),
11473		autorest.WithQueryParameters(queryParameters))
11474	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11475}
11476
11477// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the
11478// http.Response Body if it receives an error.
11479func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) {
11480	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11481}
11482
11483// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always
11484// closes the http.Response Body.
11485func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) {
11486	err = autorest.Respond(
11487		resp,
11488		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11489		autorest.ByUnmarshallingJSON(&result),
11490		autorest.ByClosing())
11491	result.Response = autorest.Response{Response: resp}
11492	return
11493}
11494
11495// GetInstanceInfo description for Gets all scale-out instances of an app.
11496// Parameters:
11497// resourceGroupName - name of the resource group to which the resource belongs.
11498// name - name of the app.
11499func (client AppsClient) GetInstanceInfo(ctx context.Context, resourceGroupName string, name string, instanceID string) (result SiteInstanceStatus, err error) {
11500	if tracing.IsEnabled() {
11501		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfo")
11502		defer func() {
11503			sc := -1
11504			if result.Response.Response != nil {
11505				sc = result.Response.Response.StatusCode
11506			}
11507			tracing.EndSpan(ctx, sc, err)
11508		}()
11509	}
11510	if err := validation.Validate([]validation.Validation{
11511		{TargetValue: resourceGroupName,
11512			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11513				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11514				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11515		return result, validation.NewError("web.AppsClient", "GetInstanceInfo", err.Error())
11516	}
11517
11518	req, err := client.GetInstanceInfoPreparer(ctx, resourceGroupName, name, instanceID)
11519	if err != nil {
11520		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", nil, "Failure preparing request")
11521		return
11522	}
11523
11524	resp, err := client.GetInstanceInfoSender(req)
11525	if err != nil {
11526		result.Response = autorest.Response{Response: resp}
11527		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure sending request")
11528		return
11529	}
11530
11531	result, err = client.GetInstanceInfoResponder(resp)
11532	if err != nil {
11533		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfo", resp, "Failure responding to request")
11534		return
11535	}
11536
11537	return
11538}
11539
11540// GetInstanceInfoPreparer prepares the GetInstanceInfo request.
11541func (client AppsClient) GetInstanceInfoPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
11542	pathParameters := map[string]interface{}{
11543		"instanceId":        autorest.Encode("path", instanceID),
11544		"name":              autorest.Encode("path", name),
11545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11546		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11547	}
11548
11549	const APIVersion = "2020-09-01"
11550	queryParameters := map[string]interface{}{
11551		"api-version": APIVersion,
11552	}
11553
11554	preparer := autorest.CreatePreparer(
11555		autorest.AsGet(),
11556		autorest.WithBaseURL(client.BaseURI),
11557		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}", pathParameters),
11558		autorest.WithQueryParameters(queryParameters))
11559	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11560}
11561
11562// GetInstanceInfoSender sends the GetInstanceInfo request. The method will close the
11563// http.Response Body if it receives an error.
11564func (client AppsClient) GetInstanceInfoSender(req *http.Request) (*http.Response, error) {
11565	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11566}
11567
11568// GetInstanceInfoResponder handles the response to the GetInstanceInfo request. The method always
11569// closes the http.Response Body.
11570func (client AppsClient) GetInstanceInfoResponder(resp *http.Response) (result SiteInstanceStatus, err error) {
11571	err = autorest.Respond(
11572		resp,
11573		azure.WithErrorUnlessStatusCode(http.StatusOK),
11574		autorest.ByUnmarshallingJSON(&result),
11575		autorest.ByClosing())
11576	result.Response = autorest.Response{Response: resp}
11577	return
11578}
11579
11580// GetInstanceInfoSlot description for Gets all scale-out instances of an app.
11581// Parameters:
11582// resourceGroupName - name of the resource group to which the resource belongs.
11583// name - name of the app.
11584// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances.
11585func (client AppsClient) GetInstanceInfoSlot(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (result SiteInstanceStatus, err error) {
11586	if tracing.IsEnabled() {
11587		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceInfoSlot")
11588		defer func() {
11589			sc := -1
11590			if result.Response.Response != nil {
11591				sc = result.Response.Response.StatusCode
11592			}
11593			tracing.EndSpan(ctx, sc, err)
11594		}()
11595	}
11596	if err := validation.Validate([]validation.Validation{
11597		{TargetValue: resourceGroupName,
11598			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11599				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11600				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11601		return result, validation.NewError("web.AppsClient", "GetInstanceInfoSlot", err.Error())
11602	}
11603
11604	req, err := client.GetInstanceInfoSlotPreparer(ctx, resourceGroupName, name, instanceID, slot)
11605	if err != nil {
11606		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", nil, "Failure preparing request")
11607		return
11608	}
11609
11610	resp, err := client.GetInstanceInfoSlotSender(req)
11611	if err != nil {
11612		result.Response = autorest.Response{Response: resp}
11613		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure sending request")
11614		return
11615	}
11616
11617	result, err = client.GetInstanceInfoSlotResponder(resp)
11618	if err != nil {
11619		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceInfoSlot", resp, "Failure responding to request")
11620		return
11621	}
11622
11623	return
11624}
11625
11626// GetInstanceInfoSlotPreparer prepares the GetInstanceInfoSlot request.
11627func (client AppsClient) GetInstanceInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string, slot string) (*http.Request, error) {
11628	pathParameters := map[string]interface{}{
11629		"instanceId":        autorest.Encode("path", instanceID),
11630		"name":              autorest.Encode("path", name),
11631		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11632		"slot":              autorest.Encode("path", slot),
11633		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11634	}
11635
11636	const APIVersion = "2020-09-01"
11637	queryParameters := map[string]interface{}{
11638		"api-version": APIVersion,
11639	}
11640
11641	preparer := autorest.CreatePreparer(
11642		autorest.AsGet(),
11643		autorest.WithBaseURL(client.BaseURI),
11644		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}", pathParameters),
11645		autorest.WithQueryParameters(queryParameters))
11646	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11647}
11648
11649// GetInstanceInfoSlotSender sends the GetInstanceInfoSlot request. The method will close the
11650// http.Response Body if it receives an error.
11651func (client AppsClient) GetInstanceInfoSlotSender(req *http.Request) (*http.Response, error) {
11652	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11653}
11654
11655// GetInstanceInfoSlotResponder handles the response to the GetInstanceInfoSlot request. The method always
11656// closes the http.Response Body.
11657func (client AppsClient) GetInstanceInfoSlotResponder(resp *http.Response) (result SiteInstanceStatus, err error) {
11658	err = autorest.Respond(
11659		resp,
11660		azure.WithErrorUnlessStatusCode(http.StatusOK),
11661		autorest.ByUnmarshallingJSON(&result),
11662		autorest.ByClosing())
11663	result.Response = autorest.Response{Response: resp}
11664	return
11665}
11666
11667// GetInstanceMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation.
11668// Parameters:
11669// resourceGroupName - name of the resource group to which the resource belongs.
11670// name - name of web app.
11671// instanceID - ID of web app instance.
11672func (client AppsClient) GetInstanceMSDeployLog(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) {
11673	if tracing.IsEnabled() {
11674		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLog")
11675		defer func() {
11676			sc := -1
11677			if result.Response.Response != nil {
11678				sc = result.Response.Response.StatusCode
11679			}
11680			tracing.EndSpan(ctx, sc, err)
11681		}()
11682	}
11683	if err := validation.Validate([]validation.Validation{
11684		{TargetValue: resourceGroupName,
11685			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11686				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11687				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11688		return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLog", err.Error())
11689	}
11690
11691	req, err := client.GetInstanceMSDeployLogPreparer(ctx, resourceGroupName, name, instanceID)
11692	if err != nil {
11693		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request")
11694		return
11695	}
11696
11697	resp, err := client.GetInstanceMSDeployLogSender(req)
11698	if err != nil {
11699		result.Response = autorest.Response{Response: resp}
11700		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request")
11701		return
11702	}
11703
11704	result, err = client.GetInstanceMSDeployLogResponder(resp)
11705	if err != nil {
11706		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request")
11707		return
11708	}
11709
11710	return
11711}
11712
11713// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request.
11714func (client AppsClient) GetInstanceMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
11715	pathParameters := map[string]interface{}{
11716		"instanceId":        autorest.Encode("path", instanceID),
11717		"name":              autorest.Encode("path", name),
11718		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11719		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11720	}
11721
11722	const APIVersion = "2020-09-01"
11723	queryParameters := map[string]interface{}{
11724		"api-version": APIVersion,
11725	}
11726
11727	preparer := autorest.CreatePreparer(
11728		autorest.AsGet(),
11729		autorest.WithBaseURL(client.BaseURI),
11730		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters),
11731		autorest.WithQueryParameters(queryParameters))
11732	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11733}
11734
11735// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the
11736// http.Response Body if it receives an error.
11737func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) {
11738	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11739}
11740
11741// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always
11742// closes the http.Response Body.
11743func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) {
11744	err = autorest.Respond(
11745		resp,
11746		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11747		autorest.ByUnmarshallingJSON(&result),
11748		autorest.ByClosing())
11749	result.Response = autorest.Response{Response: resp}
11750	return
11751}
11752
11753// GetInstanceMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation.
11754// Parameters:
11755// resourceGroupName - name of the resource group to which the resource belongs.
11756// name - name of web app.
11757// slot - name of web app slot. If not specified then will default to production slot.
11758// instanceID - ID of web app instance.
11759func (client AppsClient) GetInstanceMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) {
11760	if tracing.IsEnabled() {
11761		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMSDeployLogSlot")
11762		defer func() {
11763			sc := -1
11764			if result.Response.Response != nil {
11765				sc = result.Response.Response.StatusCode
11766			}
11767			tracing.EndSpan(ctx, sc, err)
11768		}()
11769	}
11770	if err := validation.Validate([]validation.Validation{
11771		{TargetValue: resourceGroupName,
11772			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11773				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11774				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11775		return result, validation.NewError("web.AppsClient", "GetInstanceMSDeployLogSlot", err.Error())
11776	}
11777
11778	req, err := client.GetInstanceMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
11779	if err != nil {
11780		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request")
11781		return
11782	}
11783
11784	resp, err := client.GetInstanceMSDeployLogSlotSender(req)
11785	if err != nil {
11786		result.Response = autorest.Response{Response: resp}
11787		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request")
11788		return
11789	}
11790
11791	result, err = client.GetInstanceMSDeployLogSlotResponder(resp)
11792	if err != nil {
11793		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request")
11794		return
11795	}
11796
11797	return
11798}
11799
11800// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request.
11801func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
11802	pathParameters := map[string]interface{}{
11803		"instanceId":        autorest.Encode("path", instanceID),
11804		"name":              autorest.Encode("path", name),
11805		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11806		"slot":              autorest.Encode("path", slot),
11807		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11808	}
11809
11810	const APIVersion = "2020-09-01"
11811	queryParameters := map[string]interface{}{
11812		"api-version": APIVersion,
11813	}
11814
11815	preparer := autorest.CreatePreparer(
11816		autorest.AsGet(),
11817		autorest.WithBaseURL(client.BaseURI),
11818		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters),
11819		autorest.WithQueryParameters(queryParameters))
11820	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11821}
11822
11823// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the
11824// http.Response Body if it receives an error.
11825func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) {
11826	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11827}
11828
11829// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always
11830// closes the http.Response Body.
11831func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) {
11832	err = autorest.Respond(
11833		resp,
11834		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
11835		autorest.ByUnmarshallingJSON(&result),
11836		autorest.ByClosing())
11837	result.Response = autorest.Response{Response: resp}
11838	return
11839}
11840
11841// GetInstanceMsDeployStatus description for Get the status of the last MSDeploy operation.
11842// Parameters:
11843// resourceGroupName - name of the resource group to which the resource belongs.
11844// name - name of web app.
11845// instanceID - ID of web app instance.
11846func (client AppsClient) GetInstanceMsDeployStatus(ctx context.Context, resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) {
11847	if tracing.IsEnabled() {
11848		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatus")
11849		defer func() {
11850			sc := -1
11851			if result.Response.Response != nil {
11852				sc = result.Response.Response.StatusCode
11853			}
11854			tracing.EndSpan(ctx, sc, err)
11855		}()
11856	}
11857	if err := validation.Validate([]validation.Validation{
11858		{TargetValue: resourceGroupName,
11859			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11860				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11861				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11862		return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatus", err.Error())
11863	}
11864
11865	req, err := client.GetInstanceMsDeployStatusPreparer(ctx, resourceGroupName, name, instanceID)
11866	if err != nil {
11867		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request")
11868		return
11869	}
11870
11871	resp, err := client.GetInstanceMsDeployStatusSender(req)
11872	if err != nil {
11873		result.Response = autorest.Response{Response: resp}
11874		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request")
11875		return
11876	}
11877
11878	result, err = client.GetInstanceMsDeployStatusResponder(resp)
11879	if err != nil {
11880		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request")
11881		return
11882	}
11883
11884	return
11885}
11886
11887// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request.
11888func (client AppsClient) GetInstanceMsDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
11889	pathParameters := map[string]interface{}{
11890		"instanceId":        autorest.Encode("path", instanceID),
11891		"name":              autorest.Encode("path", name),
11892		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11893		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11894	}
11895
11896	const APIVersion = "2020-09-01"
11897	queryParameters := map[string]interface{}{
11898		"api-version": APIVersion,
11899	}
11900
11901	preparer := autorest.CreatePreparer(
11902		autorest.AsGet(),
11903		autorest.WithBaseURL(client.BaseURI),
11904		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
11905		autorest.WithQueryParameters(queryParameters))
11906	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11907}
11908
11909// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the
11910// http.Response Body if it receives an error.
11911func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) {
11912	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
11913}
11914
11915// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always
11916// closes the http.Response Body.
11917func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) {
11918	err = autorest.Respond(
11919		resp,
11920		azure.WithErrorUnlessStatusCode(http.StatusOK),
11921		autorest.ByUnmarshallingJSON(&result),
11922		autorest.ByClosing())
11923	result.Response = autorest.Response{Response: resp}
11924	return
11925}
11926
11927// GetInstanceMsDeployStatusSlot description for Get the status of the last MSDeploy operation.
11928// Parameters:
11929// resourceGroupName - name of the resource group to which the resource belongs.
11930// name - name of web app.
11931// slot - name of web app slot. If not specified then will default to production slot.
11932// instanceID - ID of web app instance.
11933func (client AppsClient) GetInstanceMsDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) {
11934	if tracing.IsEnabled() {
11935		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceMsDeployStatusSlot")
11936		defer func() {
11937			sc := -1
11938			if result.Response.Response != nil {
11939				sc = result.Response.Response.StatusCode
11940			}
11941			tracing.EndSpan(ctx, sc, err)
11942		}()
11943	}
11944	if err := validation.Validate([]validation.Validation{
11945		{TargetValue: resourceGroupName,
11946			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
11947				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
11948				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
11949		return result, validation.NewError("web.AppsClient", "GetInstanceMsDeployStatusSlot", err.Error())
11950	}
11951
11952	req, err := client.GetInstanceMsDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
11953	if err != nil {
11954		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request")
11955		return
11956	}
11957
11958	resp, err := client.GetInstanceMsDeployStatusSlotSender(req)
11959	if err != nil {
11960		result.Response = autorest.Response{Response: resp}
11961		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request")
11962		return
11963	}
11964
11965	result, err = client.GetInstanceMsDeployStatusSlotResponder(resp)
11966	if err != nil {
11967		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request")
11968		return
11969	}
11970
11971	return
11972}
11973
11974// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request.
11975func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
11976	pathParameters := map[string]interface{}{
11977		"instanceId":        autorest.Encode("path", instanceID),
11978		"name":              autorest.Encode("path", name),
11979		"resourceGroupName": autorest.Encode("path", resourceGroupName),
11980		"slot":              autorest.Encode("path", slot),
11981		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
11982	}
11983
11984	const APIVersion = "2020-09-01"
11985	queryParameters := map[string]interface{}{
11986		"api-version": APIVersion,
11987	}
11988
11989	preparer := autorest.CreatePreparer(
11990		autorest.AsGet(),
11991		autorest.WithBaseURL(client.BaseURI),
11992		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters),
11993		autorest.WithQueryParameters(queryParameters))
11994	return preparer.Prepare((&http.Request{}).WithContext(ctx))
11995}
11996
11997// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the
11998// http.Response Body if it receives an error.
11999func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) {
12000	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12001}
12002
12003// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always
12004// closes the http.Response Body.
12005func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
12006	err = autorest.Respond(
12007		resp,
12008		azure.WithErrorUnlessStatusCode(http.StatusOK),
12009		autorest.ByUnmarshallingJSON(&result),
12010		autorest.ByClosing())
12011	result.Response = autorest.Response{Response: resp}
12012	return
12013}
12014
12015// GetInstanceProcess description for Get process information by its ID for a specific scaled-out instance in a web
12016// site.
12017// Parameters:
12018// resourceGroupName - name of the resource group to which the resource belongs.
12019// name - site name.
12020// processID - pID.
12021// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12022// response from "GET api/sites/{siteName}/instances".
12023func (client AppsClient) GetInstanceProcess(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) {
12024	if tracing.IsEnabled() {
12025		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcess")
12026		defer func() {
12027			sc := -1
12028			if result.Response.Response != nil {
12029				sc = result.Response.Response.StatusCode
12030			}
12031			tracing.EndSpan(ctx, sc, err)
12032		}()
12033	}
12034	if err := validation.Validate([]validation.Validation{
12035		{TargetValue: resourceGroupName,
12036			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12037				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12038				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12039		return result, validation.NewError("web.AppsClient", "GetInstanceProcess", err.Error())
12040	}
12041
12042	req, err := client.GetInstanceProcessPreparer(ctx, resourceGroupName, name, processID, instanceID)
12043	if err != nil {
12044		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request")
12045		return
12046	}
12047
12048	resp, err := client.GetInstanceProcessSender(req)
12049	if err != nil {
12050		result.Response = autorest.Response{Response: resp}
12051		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request")
12052		return
12053	}
12054
12055	result, err = client.GetInstanceProcessResponder(resp)
12056	if err != nil {
12057		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request")
12058		return
12059	}
12060
12061	return
12062}
12063
12064// GetInstanceProcessPreparer prepares the GetInstanceProcess request.
12065func (client AppsClient) GetInstanceProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
12066	pathParameters := map[string]interface{}{
12067		"instanceId":        autorest.Encode("path", instanceID),
12068		"name":              autorest.Encode("path", name),
12069		"processId":         autorest.Encode("path", processID),
12070		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12071		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12072	}
12073
12074	const APIVersion = "2020-09-01"
12075	queryParameters := map[string]interface{}{
12076		"api-version": APIVersion,
12077	}
12078
12079	preparer := autorest.CreatePreparer(
12080		autorest.AsGet(),
12081		autorest.WithBaseURL(client.BaseURI),
12082		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters),
12083		autorest.WithQueryParameters(queryParameters))
12084	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12085}
12086
12087// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the
12088// http.Response Body if it receives an error.
12089func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) {
12090	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12091}
12092
12093// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always
12094// closes the http.Response Body.
12095func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) {
12096	err = autorest.Respond(
12097		resp,
12098		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
12099		autorest.ByUnmarshallingJSON(&result),
12100		autorest.ByClosing())
12101	result.Response = autorest.Response{Response: resp}
12102	return
12103}
12104
12105// GetInstanceProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance
12106// in a web site.
12107// Parameters:
12108// resourceGroupName - name of the resource group to which the resource belongs.
12109// name - site name.
12110// processID - pID.
12111// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12112// response from "GET api/sites/{siteName}/instances".
12113func (client AppsClient) GetInstanceProcessDump(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ReadCloser, err error) {
12114	if tracing.IsEnabled() {
12115		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDump")
12116		defer func() {
12117			sc := -1
12118			if result.Response.Response != nil {
12119				sc = result.Response.Response.StatusCode
12120			}
12121			tracing.EndSpan(ctx, sc, err)
12122		}()
12123	}
12124	if err := validation.Validate([]validation.Validation{
12125		{TargetValue: resourceGroupName,
12126			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12127				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12128				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12129		return result, validation.NewError("web.AppsClient", "GetInstanceProcessDump", err.Error())
12130	}
12131
12132	req, err := client.GetInstanceProcessDumpPreparer(ctx, resourceGroupName, name, processID, instanceID)
12133	if err != nil {
12134		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request")
12135		return
12136	}
12137
12138	resp, err := client.GetInstanceProcessDumpSender(req)
12139	if err != nil {
12140		result.Response = autorest.Response{Response: resp}
12141		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request")
12142		return
12143	}
12144
12145	result, err = client.GetInstanceProcessDumpResponder(resp)
12146	if err != nil {
12147		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request")
12148		return
12149	}
12150
12151	return
12152}
12153
12154// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request.
12155func (client AppsClient) GetInstanceProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
12156	pathParameters := map[string]interface{}{
12157		"instanceId":        autorest.Encode("path", instanceID),
12158		"name":              autorest.Encode("path", name),
12159		"processId":         autorest.Encode("path", processID),
12160		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12161		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12162	}
12163
12164	const APIVersion = "2020-09-01"
12165	queryParameters := map[string]interface{}{
12166		"api-version": APIVersion,
12167	}
12168
12169	preparer := autorest.CreatePreparer(
12170		autorest.AsGet(),
12171		autorest.WithBaseURL(client.BaseURI),
12172		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters),
12173		autorest.WithQueryParameters(queryParameters))
12174	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12175}
12176
12177// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the
12178// http.Response Body if it receives an error.
12179func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) {
12180	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12181}
12182
12183// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always
12184// closes the http.Response Body.
12185func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) {
12186	result.Value = &resp.Body
12187	err = autorest.Respond(
12188		resp,
12189		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
12190	result.Response = autorest.Response{Response: resp}
12191	return
12192}
12193
12194// GetInstanceProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out
12195// instance in a web site.
12196// Parameters:
12197// resourceGroupName - name of the resource group to which the resource belongs.
12198// name - site name.
12199// processID - pID.
12200// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
12201// production slot.
12202// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12203// response from "GET api/sites/{siteName}/instances".
12204func (client AppsClient) GetInstanceProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ReadCloser, err error) {
12205	if tracing.IsEnabled() {
12206		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessDumpSlot")
12207		defer func() {
12208			sc := -1
12209			if result.Response.Response != nil {
12210				sc = result.Response.Response.StatusCode
12211			}
12212			tracing.EndSpan(ctx, sc, err)
12213		}()
12214	}
12215	if err := validation.Validate([]validation.Validation{
12216		{TargetValue: resourceGroupName,
12217			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12218				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12219				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12220		return result, validation.NewError("web.AppsClient", "GetInstanceProcessDumpSlot", err.Error())
12221	}
12222
12223	req, err := client.GetInstanceProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
12224	if err != nil {
12225		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request")
12226		return
12227	}
12228
12229	resp, err := client.GetInstanceProcessDumpSlotSender(req)
12230	if err != nil {
12231		result.Response = autorest.Response{Response: resp}
12232		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request")
12233		return
12234	}
12235
12236	result, err = client.GetInstanceProcessDumpSlotResponder(resp)
12237	if err != nil {
12238		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request")
12239		return
12240	}
12241
12242	return
12243}
12244
12245// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request.
12246func (client AppsClient) GetInstanceProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
12247	pathParameters := map[string]interface{}{
12248		"instanceId":        autorest.Encode("path", instanceID),
12249		"name":              autorest.Encode("path", name),
12250		"processId":         autorest.Encode("path", processID),
12251		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12252		"slot":              autorest.Encode("path", slot),
12253		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12254	}
12255
12256	const APIVersion = "2020-09-01"
12257	queryParameters := map[string]interface{}{
12258		"api-version": APIVersion,
12259	}
12260
12261	preparer := autorest.CreatePreparer(
12262		autorest.AsGet(),
12263		autorest.WithBaseURL(client.BaseURI),
12264		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters),
12265		autorest.WithQueryParameters(queryParameters))
12266	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12267}
12268
12269// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the
12270// http.Response Body if it receives an error.
12271func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) {
12272	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12273}
12274
12275// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always
12276// closes the http.Response Body.
12277func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) {
12278	result.Value = &resp.Body
12279	err = autorest.Respond(
12280		resp,
12281		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
12282	result.Response = autorest.Response{Response: resp}
12283	return
12284}
12285
12286// GetInstanceProcessModule description for Get process information by its ID for a specific scaled-out instance in a
12287// web site.
12288// Parameters:
12289// resourceGroupName - name of the resource group to which the resource belongs.
12290// name - site name.
12291// processID - pID.
12292// baseAddress - module base address.
12293// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12294// response from "GET api/sites/{siteName}/instances".
12295func (client AppsClient) GetInstanceProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (result ProcessModuleInfo, err error) {
12296	if tracing.IsEnabled() {
12297		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModule")
12298		defer func() {
12299			sc := -1
12300			if result.Response.Response != nil {
12301				sc = result.Response.Response.StatusCode
12302			}
12303			tracing.EndSpan(ctx, sc, err)
12304		}()
12305	}
12306	if err := validation.Validate([]validation.Validation{
12307		{TargetValue: resourceGroupName,
12308			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12309				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12310				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12311		return result, validation.NewError("web.AppsClient", "GetInstanceProcessModule", err.Error())
12312	}
12313
12314	req, err := client.GetInstanceProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress, instanceID)
12315	if err != nil {
12316		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request")
12317		return
12318	}
12319
12320	resp, err := client.GetInstanceProcessModuleSender(req)
12321	if err != nil {
12322		result.Response = autorest.Response{Response: resp}
12323		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request")
12324		return
12325	}
12326
12327	result, err = client.GetInstanceProcessModuleResponder(resp)
12328	if err != nil {
12329		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request")
12330		return
12331	}
12332
12333	return
12334}
12335
12336// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request.
12337func (client AppsClient) GetInstanceProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, instanceID string) (*http.Request, error) {
12338	pathParameters := map[string]interface{}{
12339		"baseAddress":       autorest.Encode("path", baseAddress),
12340		"instanceId":        autorest.Encode("path", instanceID),
12341		"name":              autorest.Encode("path", name),
12342		"processId":         autorest.Encode("path", processID),
12343		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12344		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12345	}
12346
12347	const APIVersion = "2020-09-01"
12348	queryParameters := map[string]interface{}{
12349		"api-version": APIVersion,
12350	}
12351
12352	preparer := autorest.CreatePreparer(
12353		autorest.AsGet(),
12354		autorest.WithBaseURL(client.BaseURI),
12355		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters),
12356		autorest.WithQueryParameters(queryParameters))
12357	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12358}
12359
12360// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the
12361// http.Response Body if it receives an error.
12362func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) {
12363	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12364}
12365
12366// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always
12367// closes the http.Response Body.
12368func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
12369	err = autorest.Respond(
12370		resp,
12371		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
12372		autorest.ByUnmarshallingJSON(&result),
12373		autorest.ByClosing())
12374	result.Response = autorest.Response{Response: resp}
12375	return
12376}
12377
12378// GetInstanceProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in
12379// a web site.
12380// Parameters:
12381// resourceGroupName - name of the resource group to which the resource belongs.
12382// name - site name.
12383// processID - pID.
12384// baseAddress - module base address.
12385// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
12386// production slot.
12387// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12388// response from "GET api/sites/{siteName}/instances".
12389func (client AppsClient) GetInstanceProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (result ProcessModuleInfo, err error) {
12390	if tracing.IsEnabled() {
12391		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessModuleSlot")
12392		defer func() {
12393			sc := -1
12394			if result.Response.Response != nil {
12395				sc = result.Response.Response.StatusCode
12396			}
12397			tracing.EndSpan(ctx, sc, err)
12398		}()
12399	}
12400	if err := validation.Validate([]validation.Validation{
12401		{TargetValue: resourceGroupName,
12402			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12403				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12404				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12405		return result, validation.NewError("web.AppsClient", "GetInstanceProcessModuleSlot", err.Error())
12406	}
12407
12408	req, err := client.GetInstanceProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot, instanceID)
12409	if err != nil {
12410		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request")
12411		return
12412	}
12413
12414	resp, err := client.GetInstanceProcessModuleSlotSender(req)
12415	if err != nil {
12416		result.Response = autorest.Response{Response: resp}
12417		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request")
12418		return
12419	}
12420
12421	result, err = client.GetInstanceProcessModuleSlotResponder(resp)
12422	if err != nil {
12423		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request")
12424		return
12425	}
12426
12427	return
12428}
12429
12430// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request.
12431func (client AppsClient) GetInstanceProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string) (*http.Request, error) {
12432	pathParameters := map[string]interface{}{
12433		"baseAddress":       autorest.Encode("path", baseAddress),
12434		"instanceId":        autorest.Encode("path", instanceID),
12435		"name":              autorest.Encode("path", name),
12436		"processId":         autorest.Encode("path", processID),
12437		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12438		"slot":              autorest.Encode("path", slot),
12439		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12440	}
12441
12442	const APIVersion = "2020-09-01"
12443	queryParameters := map[string]interface{}{
12444		"api-version": APIVersion,
12445	}
12446
12447	preparer := autorest.CreatePreparer(
12448		autorest.AsGet(),
12449		autorest.WithBaseURL(client.BaseURI),
12450		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}", pathParameters),
12451		autorest.WithQueryParameters(queryParameters))
12452	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12453}
12454
12455// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the
12456// http.Response Body if it receives an error.
12457func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) {
12458	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12459}
12460
12461// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always
12462// closes the http.Response Body.
12463func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
12464	err = autorest.Respond(
12465		resp,
12466		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
12467		autorest.ByUnmarshallingJSON(&result),
12468		autorest.ByClosing())
12469	result.Response = autorest.Response{Response: resp}
12470	return
12471}
12472
12473// GetInstanceProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web
12474// site.
12475// Parameters:
12476// resourceGroupName - name of the resource group to which the resource belongs.
12477// name - site name.
12478// processID - pID.
12479// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
12480// production slot.
12481// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
12482// response from "GET api/sites/{siteName}/instances".
12483func (client AppsClient) GetInstanceProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) {
12484	if tracing.IsEnabled() {
12485		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetInstanceProcessSlot")
12486		defer func() {
12487			sc := -1
12488			if result.Response.Response != nil {
12489				sc = result.Response.Response.StatusCode
12490			}
12491			tracing.EndSpan(ctx, sc, err)
12492		}()
12493	}
12494	if err := validation.Validate([]validation.Validation{
12495		{TargetValue: resourceGroupName,
12496			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12497				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12498				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12499		return result, validation.NewError("web.AppsClient", "GetInstanceProcessSlot", err.Error())
12500	}
12501
12502	req, err := client.GetInstanceProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
12503	if err != nil {
12504		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request")
12505		return
12506	}
12507
12508	resp, err := client.GetInstanceProcessSlotSender(req)
12509	if err != nil {
12510		result.Response = autorest.Response{Response: resp}
12511		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request")
12512		return
12513	}
12514
12515	result, err = client.GetInstanceProcessSlotResponder(resp)
12516	if err != nil {
12517		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request")
12518		return
12519	}
12520
12521	return
12522}
12523
12524// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request.
12525func (client AppsClient) GetInstanceProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
12526	pathParameters := map[string]interface{}{
12527		"instanceId":        autorest.Encode("path", instanceID),
12528		"name":              autorest.Encode("path", name),
12529		"processId":         autorest.Encode("path", processID),
12530		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12531		"slot":              autorest.Encode("path", slot),
12532		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12533	}
12534
12535	const APIVersion = "2020-09-01"
12536	queryParameters := map[string]interface{}{
12537		"api-version": APIVersion,
12538	}
12539
12540	preparer := autorest.CreatePreparer(
12541		autorest.AsGet(),
12542		autorest.WithBaseURL(client.BaseURI),
12543		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters),
12544		autorest.WithQueryParameters(queryParameters))
12545	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12546}
12547
12548// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the
12549// http.Response Body if it receives an error.
12550func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) {
12551	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12552}
12553
12554// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always
12555// closes the http.Response Body.
12556func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) {
12557	err = autorest.Respond(
12558		resp,
12559		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
12560		autorest.ByUnmarshallingJSON(&result),
12561		autorest.ByClosing())
12562	result.Response = autorest.Response{Response: resp}
12563	return
12564}
12565
12566// GetMigrateMySQLStatus description for Returns the status of MySql in app migration, if one is active, and whether or
12567// not MySql in app is enabled
12568// Parameters:
12569// resourceGroupName - name of the resource group to which the resource belongs.
12570// name - name of web app.
12571func (client AppsClient) GetMigrateMySQLStatus(ctx context.Context, resourceGroupName string, name string) (result MigrateMySQLStatus, err error) {
12572	if tracing.IsEnabled() {
12573		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatus")
12574		defer func() {
12575			sc := -1
12576			if result.Response.Response != nil {
12577				sc = result.Response.Response.StatusCode
12578			}
12579			tracing.EndSpan(ctx, sc, err)
12580		}()
12581	}
12582	if err := validation.Validate([]validation.Validation{
12583		{TargetValue: resourceGroupName,
12584			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12585				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12586				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12587		return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatus", err.Error())
12588	}
12589
12590	req, err := client.GetMigrateMySQLStatusPreparer(ctx, resourceGroupName, name)
12591	if err != nil {
12592		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", nil, "Failure preparing request")
12593		return
12594	}
12595
12596	resp, err := client.GetMigrateMySQLStatusSender(req)
12597	if err != nil {
12598		result.Response = autorest.Response{Response: resp}
12599		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure sending request")
12600		return
12601	}
12602
12603	result, err = client.GetMigrateMySQLStatusResponder(resp)
12604	if err != nil {
12605		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatus", resp, "Failure responding to request")
12606		return
12607	}
12608
12609	return
12610}
12611
12612// GetMigrateMySQLStatusPreparer prepares the GetMigrateMySQLStatus request.
12613func (client AppsClient) GetMigrateMySQLStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
12614	pathParameters := map[string]interface{}{
12615		"name":              autorest.Encode("path", name),
12616		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12617		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12618	}
12619
12620	const APIVersion = "2020-09-01"
12621	queryParameters := map[string]interface{}{
12622		"api-version": APIVersion,
12623	}
12624
12625	preparer := autorest.CreatePreparer(
12626		autorest.AsGet(),
12627		autorest.WithBaseURL(client.BaseURI),
12628		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status", pathParameters),
12629		autorest.WithQueryParameters(queryParameters))
12630	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12631}
12632
12633// GetMigrateMySQLStatusSender sends the GetMigrateMySQLStatus request. The method will close the
12634// http.Response Body if it receives an error.
12635func (client AppsClient) GetMigrateMySQLStatusSender(req *http.Request) (*http.Response, error) {
12636	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12637}
12638
12639// GetMigrateMySQLStatusResponder handles the response to the GetMigrateMySQLStatus request. The method always
12640// closes the http.Response Body.
12641func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (result MigrateMySQLStatus, err error) {
12642	err = autorest.Respond(
12643		resp,
12644		azure.WithErrorUnlessStatusCode(http.StatusOK),
12645		autorest.ByUnmarshallingJSON(&result),
12646		autorest.ByClosing())
12647	result.Response = autorest.Response{Response: resp}
12648	return
12649}
12650
12651// GetMigrateMySQLStatusSlot description for Returns the status of MySql in app migration, if one is active, and
12652// whether or not MySql in app is enabled
12653// Parameters:
12654// resourceGroupName - name of the resource group to which the resource belongs.
12655// name - name of web app.
12656// slot - name of the deployment slot.
12657func (client AppsClient) GetMigrateMySQLStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) {
12658	if tracing.IsEnabled() {
12659		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMigrateMySQLStatusSlot")
12660		defer func() {
12661			sc := -1
12662			if result.Response.Response != nil {
12663				sc = result.Response.Response.StatusCode
12664			}
12665			tracing.EndSpan(ctx, sc, err)
12666		}()
12667	}
12668	if err := validation.Validate([]validation.Validation{
12669		{TargetValue: resourceGroupName,
12670			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12671				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12672				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12673		return result, validation.NewError("web.AppsClient", "GetMigrateMySQLStatusSlot", err.Error())
12674	}
12675
12676	req, err := client.GetMigrateMySQLStatusSlotPreparer(ctx, resourceGroupName, name, slot)
12677	if err != nil {
12678		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", nil, "Failure preparing request")
12679		return
12680	}
12681
12682	resp, err := client.GetMigrateMySQLStatusSlotSender(req)
12683	if err != nil {
12684		result.Response = autorest.Response{Response: resp}
12685		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure sending request")
12686		return
12687	}
12688
12689	result, err = client.GetMigrateMySQLStatusSlotResponder(resp)
12690	if err != nil {
12691		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMigrateMySQLStatusSlot", resp, "Failure responding to request")
12692		return
12693	}
12694
12695	return
12696}
12697
12698// GetMigrateMySQLStatusSlotPreparer prepares the GetMigrateMySQLStatusSlot request.
12699func (client AppsClient) GetMigrateMySQLStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
12700	pathParameters := map[string]interface{}{
12701		"name":              autorest.Encode("path", name),
12702		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12703		"slot":              autorest.Encode("path", slot),
12704		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12705	}
12706
12707	const APIVersion = "2020-09-01"
12708	queryParameters := map[string]interface{}{
12709		"api-version": APIVersion,
12710	}
12711
12712	preparer := autorest.CreatePreparer(
12713		autorest.AsGet(),
12714		autorest.WithBaseURL(client.BaseURI),
12715		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status", pathParameters),
12716		autorest.WithQueryParameters(queryParameters))
12717	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12718}
12719
12720// GetMigrateMySQLStatusSlotSender sends the GetMigrateMySQLStatusSlot request. The method will close the
12721// http.Response Body if it receives an error.
12722func (client AppsClient) GetMigrateMySQLStatusSlotSender(req *http.Request) (*http.Response, error) {
12723	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12724}
12725
12726// GetMigrateMySQLStatusSlotResponder handles the response to the GetMigrateMySQLStatusSlot request. The method always
12727// closes the http.Response Body.
12728func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) (result MigrateMySQLStatus, err error) {
12729	err = autorest.Respond(
12730		resp,
12731		azure.WithErrorUnlessStatusCode(http.StatusOK),
12732		autorest.ByUnmarshallingJSON(&result),
12733		autorest.ByClosing())
12734	result.Response = autorest.Response{Response: resp}
12735	return
12736}
12737
12738// GetMSDeployLog description for Get the MSDeploy Log for the last MSDeploy operation.
12739// Parameters:
12740// resourceGroupName - name of the resource group to which the resource belongs.
12741// name - name of web app.
12742func (client AppsClient) GetMSDeployLog(ctx context.Context, resourceGroupName string, name string) (result MSDeployLog, err error) {
12743	if tracing.IsEnabled() {
12744		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLog")
12745		defer func() {
12746			sc := -1
12747			if result.Response.Response != nil {
12748				sc = result.Response.Response.StatusCode
12749			}
12750			tracing.EndSpan(ctx, sc, err)
12751		}()
12752	}
12753	if err := validation.Validate([]validation.Validation{
12754		{TargetValue: resourceGroupName,
12755			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12756				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12757				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12758		return result, validation.NewError("web.AppsClient", "GetMSDeployLog", err.Error())
12759	}
12760
12761	req, err := client.GetMSDeployLogPreparer(ctx, resourceGroupName, name)
12762	if err != nil {
12763		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request")
12764		return
12765	}
12766
12767	resp, err := client.GetMSDeployLogSender(req)
12768	if err != nil {
12769		result.Response = autorest.Response{Response: resp}
12770		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request")
12771		return
12772	}
12773
12774	result, err = client.GetMSDeployLogResponder(resp)
12775	if err != nil {
12776		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request")
12777		return
12778	}
12779
12780	return
12781}
12782
12783// GetMSDeployLogPreparer prepares the GetMSDeployLog request.
12784func (client AppsClient) GetMSDeployLogPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
12785	pathParameters := map[string]interface{}{
12786		"name":              autorest.Encode("path", name),
12787		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12788		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12789	}
12790
12791	const APIVersion = "2020-09-01"
12792	queryParameters := map[string]interface{}{
12793		"api-version": APIVersion,
12794	}
12795
12796	preparer := autorest.CreatePreparer(
12797		autorest.AsGet(),
12798		autorest.WithBaseURL(client.BaseURI),
12799		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters),
12800		autorest.WithQueryParameters(queryParameters))
12801	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12802}
12803
12804// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the
12805// http.Response Body if it receives an error.
12806func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) {
12807	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12808}
12809
12810// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always
12811// closes the http.Response Body.
12812func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) {
12813	err = autorest.Respond(
12814		resp,
12815		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
12816		autorest.ByUnmarshallingJSON(&result),
12817		autorest.ByClosing())
12818	result.Response = autorest.Response{Response: resp}
12819	return
12820}
12821
12822// GetMSDeployLogSlot description for Get the MSDeploy Log for the last MSDeploy operation.
12823// Parameters:
12824// resourceGroupName - name of the resource group to which the resource belongs.
12825// name - name of web app.
12826// slot - name of web app slot. If not specified then will default to production slot.
12827func (client AppsClient) GetMSDeployLogSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployLog, err error) {
12828	if tracing.IsEnabled() {
12829		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployLogSlot")
12830		defer func() {
12831			sc := -1
12832			if result.Response.Response != nil {
12833				sc = result.Response.Response.StatusCode
12834			}
12835			tracing.EndSpan(ctx, sc, err)
12836		}()
12837	}
12838	if err := validation.Validate([]validation.Validation{
12839		{TargetValue: resourceGroupName,
12840			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12841				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12842				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12843		return result, validation.NewError("web.AppsClient", "GetMSDeployLogSlot", err.Error())
12844	}
12845
12846	req, err := client.GetMSDeployLogSlotPreparer(ctx, resourceGroupName, name, slot)
12847	if err != nil {
12848		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request")
12849		return
12850	}
12851
12852	resp, err := client.GetMSDeployLogSlotSender(req)
12853	if err != nil {
12854		result.Response = autorest.Response{Response: resp}
12855		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request")
12856		return
12857	}
12858
12859	result, err = client.GetMSDeployLogSlotResponder(resp)
12860	if err != nil {
12861		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request")
12862		return
12863	}
12864
12865	return
12866}
12867
12868// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request.
12869func (client AppsClient) GetMSDeployLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
12870	pathParameters := map[string]interface{}{
12871		"name":              autorest.Encode("path", name),
12872		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12873		"slot":              autorest.Encode("path", slot),
12874		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12875	}
12876
12877	const APIVersion = "2020-09-01"
12878	queryParameters := map[string]interface{}{
12879		"api-version": APIVersion,
12880	}
12881
12882	preparer := autorest.CreatePreparer(
12883		autorest.AsGet(),
12884		autorest.WithBaseURL(client.BaseURI),
12885		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters),
12886		autorest.WithQueryParameters(queryParameters))
12887	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12888}
12889
12890// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the
12891// http.Response Body if it receives an error.
12892func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) {
12893	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12894}
12895
12896// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always
12897// closes the http.Response Body.
12898func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) {
12899	err = autorest.Respond(
12900		resp,
12901		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
12902		autorest.ByUnmarshallingJSON(&result),
12903		autorest.ByClosing())
12904	result.Response = autorest.Response{Response: resp}
12905	return
12906}
12907
12908// GetMSDeployStatus description for Get the status of the last MSDeploy operation.
12909// Parameters:
12910// resourceGroupName - name of the resource group to which the resource belongs.
12911// name - name of web app.
12912func (client AppsClient) GetMSDeployStatus(ctx context.Context, resourceGroupName string, name string) (result MSDeployStatus, err error) {
12913	if tracing.IsEnabled() {
12914		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatus")
12915		defer func() {
12916			sc := -1
12917			if result.Response.Response != nil {
12918				sc = result.Response.Response.StatusCode
12919			}
12920			tracing.EndSpan(ctx, sc, err)
12921		}()
12922	}
12923	if err := validation.Validate([]validation.Validation{
12924		{TargetValue: resourceGroupName,
12925			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
12926				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
12927				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
12928		return result, validation.NewError("web.AppsClient", "GetMSDeployStatus", err.Error())
12929	}
12930
12931	req, err := client.GetMSDeployStatusPreparer(ctx, resourceGroupName, name)
12932	if err != nil {
12933		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request")
12934		return
12935	}
12936
12937	resp, err := client.GetMSDeployStatusSender(req)
12938	if err != nil {
12939		result.Response = autorest.Response{Response: resp}
12940		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request")
12941		return
12942	}
12943
12944	result, err = client.GetMSDeployStatusResponder(resp)
12945	if err != nil {
12946		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request")
12947		return
12948	}
12949
12950	return
12951}
12952
12953// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request.
12954func (client AppsClient) GetMSDeployStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
12955	pathParameters := map[string]interface{}{
12956		"name":              autorest.Encode("path", name),
12957		"resourceGroupName": autorest.Encode("path", resourceGroupName),
12958		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
12959	}
12960
12961	const APIVersion = "2020-09-01"
12962	queryParameters := map[string]interface{}{
12963		"api-version": APIVersion,
12964	}
12965
12966	preparer := autorest.CreatePreparer(
12967		autorest.AsGet(),
12968		autorest.WithBaseURL(client.BaseURI),
12969		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters),
12970		autorest.WithQueryParameters(queryParameters))
12971	return preparer.Prepare((&http.Request{}).WithContext(ctx))
12972}
12973
12974// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the
12975// http.Response Body if it receives an error.
12976func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) {
12977	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
12978}
12979
12980// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always
12981// closes the http.Response Body.
12982func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) {
12983	err = autorest.Respond(
12984		resp,
12985		azure.WithErrorUnlessStatusCode(http.StatusOK),
12986		autorest.ByUnmarshallingJSON(&result),
12987		autorest.ByClosing())
12988	result.Response = autorest.Response{Response: resp}
12989	return
12990}
12991
12992// GetMSDeployStatusSlot description for Get the status of the last MSDeploy operation.
12993// Parameters:
12994// resourceGroupName - name of the resource group to which the resource belongs.
12995// name - name of web app.
12996// slot - name of web app slot. If not specified then will default to production slot.
12997func (client AppsClient) GetMSDeployStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) {
12998	if tracing.IsEnabled() {
12999		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetMSDeployStatusSlot")
13000		defer func() {
13001			sc := -1
13002			if result.Response.Response != nil {
13003				sc = result.Response.Response.StatusCode
13004			}
13005			tracing.EndSpan(ctx, sc, err)
13006		}()
13007	}
13008	if err := validation.Validate([]validation.Validation{
13009		{TargetValue: resourceGroupName,
13010			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13011				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13012				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13013		return result, validation.NewError("web.AppsClient", "GetMSDeployStatusSlot", err.Error())
13014	}
13015
13016	req, err := client.GetMSDeployStatusSlotPreparer(ctx, resourceGroupName, name, slot)
13017	if err != nil {
13018		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request")
13019		return
13020	}
13021
13022	resp, err := client.GetMSDeployStatusSlotSender(req)
13023	if err != nil {
13024		result.Response = autorest.Response{Response: resp}
13025		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request")
13026		return
13027	}
13028
13029	result, err = client.GetMSDeployStatusSlotResponder(resp)
13030	if err != nil {
13031		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request")
13032		return
13033	}
13034
13035	return
13036}
13037
13038// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request.
13039func (client AppsClient) GetMSDeployStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
13040	pathParameters := map[string]interface{}{
13041		"name":              autorest.Encode("path", name),
13042		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13043		"slot":              autorest.Encode("path", slot),
13044		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13045	}
13046
13047	const APIVersion = "2020-09-01"
13048	queryParameters := map[string]interface{}{
13049		"api-version": APIVersion,
13050	}
13051
13052	preparer := autorest.CreatePreparer(
13053		autorest.AsGet(),
13054		autorest.WithBaseURL(client.BaseURI),
13055		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters),
13056		autorest.WithQueryParameters(queryParameters))
13057	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13058}
13059
13060// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the
13061// http.Response Body if it receives an error.
13062func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) {
13063	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13064}
13065
13066// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always
13067// closes the http.Response Body.
13068func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) {
13069	err = autorest.Respond(
13070		resp,
13071		azure.WithErrorUnlessStatusCode(http.StatusOK),
13072		autorest.ByUnmarshallingJSON(&result),
13073		autorest.ByClosing())
13074	result.Response = autorest.Response{Response: resp}
13075	return
13076}
13077
13078// GetNetworkTraceOperation description for Gets a named operation for a network trace capturing (or deployment slot,
13079// if specified).
13080// Parameters:
13081// resourceGroupName - name of the resource group to which the resource belongs.
13082// name - name of the app.
13083// operationID - GUID of the operation.
13084func (client AppsClient) GetNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13085	if tracing.IsEnabled() {
13086		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperation")
13087		defer func() {
13088			sc := -1
13089			if result.Response.Response != nil {
13090				sc = result.Response.Response.StatusCode
13091			}
13092			tracing.EndSpan(ctx, sc, err)
13093		}()
13094	}
13095	if err := validation.Validate([]validation.Validation{
13096		{TargetValue: resourceGroupName,
13097			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13098				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13099				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13100		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperation", err.Error())
13101	}
13102
13103	req, err := client.GetNetworkTraceOperationPreparer(ctx, resourceGroupName, name, operationID)
13104	if err != nil {
13105		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", nil, "Failure preparing request")
13106		return
13107	}
13108
13109	resp, err := client.GetNetworkTraceOperationSender(req)
13110	if err != nil {
13111		result.Response = autorest.Response{Response: resp}
13112		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure sending request")
13113		return
13114	}
13115
13116	result, err = client.GetNetworkTraceOperationResponder(resp)
13117	if err != nil {
13118		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperation", resp, "Failure responding to request")
13119		return
13120	}
13121
13122	return
13123}
13124
13125// GetNetworkTraceOperationPreparer prepares the GetNetworkTraceOperation request.
13126func (client AppsClient) GetNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13127	pathParameters := map[string]interface{}{
13128		"name":              autorest.Encode("path", name),
13129		"operationId":       autorest.Encode("path", operationID),
13130		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13131		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13132	}
13133
13134	const APIVersion = "2020-09-01"
13135	queryParameters := map[string]interface{}{
13136		"api-version": APIVersion,
13137	}
13138
13139	preparer := autorest.CreatePreparer(
13140		autorest.AsGet(),
13141		autorest.WithBaseURL(client.BaseURI),
13142		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}", pathParameters),
13143		autorest.WithQueryParameters(queryParameters))
13144	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13145}
13146
13147// GetNetworkTraceOperationSender sends the GetNetworkTraceOperation request. The method will close the
13148// http.Response Body if it receives an error.
13149func (client AppsClient) GetNetworkTraceOperationSender(req *http.Request) (*http.Response, error) {
13150	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13151}
13152
13153// GetNetworkTraceOperationResponder handles the response to the GetNetworkTraceOperation request. The method always
13154// closes the http.Response Body.
13155func (client AppsClient) GetNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13156	err = autorest.Respond(
13157		resp,
13158		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13159		autorest.ByUnmarshallingJSON(&result.Value),
13160		autorest.ByClosing())
13161	result.Response = autorest.Response{Response: resp}
13162	return
13163}
13164
13165// GetNetworkTraceOperationSlot description for Gets a named operation for a network trace capturing (or deployment
13166// slot, if specified).
13167// Parameters:
13168// resourceGroupName - name of the resource group to which the resource belongs.
13169// name - name of the app.
13170// operationID - GUID of the operation.
13171// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13172// production slot.
13173func (client AppsClient) GetNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13174	if tracing.IsEnabled() {
13175		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlot")
13176		defer func() {
13177			sc := -1
13178			if result.Response.Response != nil {
13179				sc = result.Response.Response.StatusCode
13180			}
13181			tracing.EndSpan(ctx, sc, err)
13182		}()
13183	}
13184	if err := validation.Validate([]validation.Validation{
13185		{TargetValue: resourceGroupName,
13186			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13187				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13188				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13189		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlot", err.Error())
13190	}
13191
13192	req, err := client.GetNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, operationID, slot)
13193	if err != nil {
13194		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", nil, "Failure preparing request")
13195		return
13196	}
13197
13198	resp, err := client.GetNetworkTraceOperationSlotSender(req)
13199	if err != nil {
13200		result.Response = autorest.Response{Response: resp}
13201		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure sending request")
13202		return
13203	}
13204
13205	result, err = client.GetNetworkTraceOperationSlotResponder(resp)
13206	if err != nil {
13207		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlot", resp, "Failure responding to request")
13208		return
13209	}
13210
13211	return
13212}
13213
13214// GetNetworkTraceOperationSlotPreparer prepares the GetNetworkTraceOperationSlot request.
13215func (client AppsClient) GetNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13216	pathParameters := map[string]interface{}{
13217		"name":              autorest.Encode("path", name),
13218		"operationId":       autorest.Encode("path", operationID),
13219		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13220		"slot":              autorest.Encode("path", slot),
13221		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13222	}
13223
13224	const APIVersion = "2020-09-01"
13225	queryParameters := map[string]interface{}{
13226		"api-version": APIVersion,
13227	}
13228
13229	preparer := autorest.CreatePreparer(
13230		autorest.AsGet(),
13231		autorest.WithBaseURL(client.BaseURI),
13232		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}", pathParameters),
13233		autorest.WithQueryParameters(queryParameters))
13234	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13235}
13236
13237// GetNetworkTraceOperationSlotSender sends the GetNetworkTraceOperationSlot request. The method will close the
13238// http.Response Body if it receives an error.
13239func (client AppsClient) GetNetworkTraceOperationSlotSender(req *http.Request) (*http.Response, error) {
13240	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13241}
13242
13243// GetNetworkTraceOperationSlotResponder handles the response to the GetNetworkTraceOperationSlot request. The method always
13244// closes the http.Response Body.
13245func (client AppsClient) GetNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13246	err = autorest.Respond(
13247		resp,
13248		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13249		autorest.ByUnmarshallingJSON(&result.Value),
13250		autorest.ByClosing())
13251	result.Response = autorest.Response{Response: resp}
13252	return
13253}
13254
13255// GetNetworkTraceOperationSlotV2 description for Gets a named operation for a network trace capturing (or deployment
13256// slot, if specified).
13257// Parameters:
13258// resourceGroupName - name of the resource group to which the resource belongs.
13259// name - name of the app.
13260// operationID - GUID of the operation.
13261// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13262// production slot.
13263func (client AppsClient) GetNetworkTraceOperationSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13264	if tracing.IsEnabled() {
13265		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationSlotV2")
13266		defer func() {
13267			sc := -1
13268			if result.Response.Response != nil {
13269				sc = result.Response.Response.StatusCode
13270			}
13271			tracing.EndSpan(ctx, sc, err)
13272		}()
13273	}
13274	if err := validation.Validate([]validation.Validation{
13275		{TargetValue: resourceGroupName,
13276			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13277				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13278				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13279		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationSlotV2", err.Error())
13280	}
13281
13282	req, err := client.GetNetworkTraceOperationSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot)
13283	if err != nil {
13284		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", nil, "Failure preparing request")
13285		return
13286	}
13287
13288	resp, err := client.GetNetworkTraceOperationSlotV2Sender(req)
13289	if err != nil {
13290		result.Response = autorest.Response{Response: resp}
13291		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure sending request")
13292		return
13293	}
13294
13295	result, err = client.GetNetworkTraceOperationSlotV2Responder(resp)
13296	if err != nil {
13297		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationSlotV2", resp, "Failure responding to request")
13298		return
13299	}
13300
13301	return
13302}
13303
13304// GetNetworkTraceOperationSlotV2Preparer prepares the GetNetworkTraceOperationSlotV2 request.
13305func (client AppsClient) GetNetworkTraceOperationSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13306	pathParameters := map[string]interface{}{
13307		"name":              autorest.Encode("path", name),
13308		"operationId":       autorest.Encode("path", operationID),
13309		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13310		"slot":              autorest.Encode("path", slot),
13311		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13312	}
13313
13314	const APIVersion = "2020-09-01"
13315	queryParameters := map[string]interface{}{
13316		"api-version": APIVersion,
13317	}
13318
13319	preparer := autorest.CreatePreparer(
13320		autorest.AsGet(),
13321		autorest.WithBaseURL(client.BaseURI),
13322		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}", pathParameters),
13323		autorest.WithQueryParameters(queryParameters))
13324	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13325}
13326
13327// GetNetworkTraceOperationSlotV2Sender sends the GetNetworkTraceOperationSlotV2 request. The method will close the
13328// http.Response Body if it receives an error.
13329func (client AppsClient) GetNetworkTraceOperationSlotV2Sender(req *http.Request) (*http.Response, error) {
13330	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13331}
13332
13333// GetNetworkTraceOperationSlotV2Responder handles the response to the GetNetworkTraceOperationSlotV2 request. The method always
13334// closes the http.Response Body.
13335func (client AppsClient) GetNetworkTraceOperationSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13336	err = autorest.Respond(
13337		resp,
13338		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13339		autorest.ByUnmarshallingJSON(&result.Value),
13340		autorest.ByClosing())
13341	result.Response = autorest.Response{Response: resp}
13342	return
13343}
13344
13345// GetNetworkTraceOperationV2 description for Gets a named operation for a network trace capturing (or deployment slot,
13346// if specified).
13347// Parameters:
13348// resourceGroupName - name of the resource group to which the resource belongs.
13349// name - name of the app.
13350// operationID - GUID of the operation.
13351func (client AppsClient) GetNetworkTraceOperationV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13352	if tracing.IsEnabled() {
13353		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraceOperationV2")
13354		defer func() {
13355			sc := -1
13356			if result.Response.Response != nil {
13357				sc = result.Response.Response.StatusCode
13358			}
13359			tracing.EndSpan(ctx, sc, err)
13360		}()
13361	}
13362	if err := validation.Validate([]validation.Validation{
13363		{TargetValue: resourceGroupName,
13364			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13365				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13366				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13367		return result, validation.NewError("web.AppsClient", "GetNetworkTraceOperationV2", err.Error())
13368	}
13369
13370	req, err := client.GetNetworkTraceOperationV2Preparer(ctx, resourceGroupName, name, operationID)
13371	if err != nil {
13372		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", nil, "Failure preparing request")
13373		return
13374	}
13375
13376	resp, err := client.GetNetworkTraceOperationV2Sender(req)
13377	if err != nil {
13378		result.Response = autorest.Response{Response: resp}
13379		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure sending request")
13380		return
13381	}
13382
13383	result, err = client.GetNetworkTraceOperationV2Responder(resp)
13384	if err != nil {
13385		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraceOperationV2", resp, "Failure responding to request")
13386		return
13387	}
13388
13389	return
13390}
13391
13392// GetNetworkTraceOperationV2Preparer prepares the GetNetworkTraceOperationV2 request.
13393func (client AppsClient) GetNetworkTraceOperationV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13394	pathParameters := map[string]interface{}{
13395		"name":              autorest.Encode("path", name),
13396		"operationId":       autorest.Encode("path", operationID),
13397		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13398		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13399	}
13400
13401	const APIVersion = "2020-09-01"
13402	queryParameters := map[string]interface{}{
13403		"api-version": APIVersion,
13404	}
13405
13406	preparer := autorest.CreatePreparer(
13407		autorest.AsGet(),
13408		autorest.WithBaseURL(client.BaseURI),
13409		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}", pathParameters),
13410		autorest.WithQueryParameters(queryParameters))
13411	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13412}
13413
13414// GetNetworkTraceOperationV2Sender sends the GetNetworkTraceOperationV2 request. The method will close the
13415// http.Response Body if it receives an error.
13416func (client AppsClient) GetNetworkTraceOperationV2Sender(req *http.Request) (*http.Response, error) {
13417	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13418}
13419
13420// GetNetworkTraceOperationV2Responder handles the response to the GetNetworkTraceOperationV2 request. The method always
13421// closes the http.Response Body.
13422func (client AppsClient) GetNetworkTraceOperationV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13423	err = autorest.Respond(
13424		resp,
13425		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
13426		autorest.ByUnmarshallingJSON(&result.Value),
13427		autorest.ByClosing())
13428	result.Response = autorest.Response{Response: resp}
13429	return
13430}
13431
13432// GetNetworkTraces description for Gets a named operation for a network trace capturing (or deployment slot, if
13433// specified).
13434// Parameters:
13435// resourceGroupName - name of the resource group to which the resource belongs.
13436// name - name of the app.
13437// operationID - GUID of the operation.
13438func (client AppsClient) GetNetworkTraces(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13439	if tracing.IsEnabled() {
13440		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTraces")
13441		defer func() {
13442			sc := -1
13443			if result.Response.Response != nil {
13444				sc = result.Response.Response.StatusCode
13445			}
13446			tracing.EndSpan(ctx, sc, err)
13447		}()
13448	}
13449	if err := validation.Validate([]validation.Validation{
13450		{TargetValue: resourceGroupName,
13451			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13452				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13453				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13454		return result, validation.NewError("web.AppsClient", "GetNetworkTraces", err.Error())
13455	}
13456
13457	req, err := client.GetNetworkTracesPreparer(ctx, resourceGroupName, name, operationID)
13458	if err != nil {
13459		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", nil, "Failure preparing request")
13460		return
13461	}
13462
13463	resp, err := client.GetNetworkTracesSender(req)
13464	if err != nil {
13465		result.Response = autorest.Response{Response: resp}
13466		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure sending request")
13467		return
13468	}
13469
13470	result, err = client.GetNetworkTracesResponder(resp)
13471	if err != nil {
13472		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTraces", resp, "Failure responding to request")
13473		return
13474	}
13475
13476	return
13477}
13478
13479// GetNetworkTracesPreparer prepares the GetNetworkTraces request.
13480func (client AppsClient) GetNetworkTracesPreparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13481	pathParameters := map[string]interface{}{
13482		"name":              autorest.Encode("path", name),
13483		"operationId":       autorest.Encode("path", operationID),
13484		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13485		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13486	}
13487
13488	const APIVersion = "2020-09-01"
13489	queryParameters := map[string]interface{}{
13490		"api-version": APIVersion,
13491	}
13492
13493	preparer := autorest.CreatePreparer(
13494		autorest.AsGet(),
13495		autorest.WithBaseURL(client.BaseURI),
13496		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}", pathParameters),
13497		autorest.WithQueryParameters(queryParameters))
13498	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13499}
13500
13501// GetNetworkTracesSender sends the GetNetworkTraces request. The method will close the
13502// http.Response Body if it receives an error.
13503func (client AppsClient) GetNetworkTracesSender(req *http.Request) (*http.Response, error) {
13504	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13505}
13506
13507// GetNetworkTracesResponder handles the response to the GetNetworkTraces request. The method always
13508// closes the http.Response Body.
13509func (client AppsClient) GetNetworkTracesResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13510	err = autorest.Respond(
13511		resp,
13512		azure.WithErrorUnlessStatusCode(http.StatusOK),
13513		autorest.ByUnmarshallingJSON(&result.Value),
13514		autorest.ByClosing())
13515	result.Response = autorest.Response{Response: resp}
13516	return
13517}
13518
13519// GetNetworkTracesSlot description for Gets a named operation for a network trace capturing (or deployment slot, if
13520// specified).
13521// Parameters:
13522// resourceGroupName - name of the resource group to which the resource belongs.
13523// name - name of the app.
13524// operationID - GUID of the operation.
13525// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13526// production slot.
13527func (client AppsClient) GetNetworkTracesSlot(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13528	if tracing.IsEnabled() {
13529		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlot")
13530		defer func() {
13531			sc := -1
13532			if result.Response.Response != nil {
13533				sc = result.Response.Response.StatusCode
13534			}
13535			tracing.EndSpan(ctx, sc, err)
13536		}()
13537	}
13538	if err := validation.Validate([]validation.Validation{
13539		{TargetValue: resourceGroupName,
13540			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13541				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13542				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13543		return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlot", err.Error())
13544	}
13545
13546	req, err := client.GetNetworkTracesSlotPreparer(ctx, resourceGroupName, name, operationID, slot)
13547	if err != nil {
13548		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", nil, "Failure preparing request")
13549		return
13550	}
13551
13552	resp, err := client.GetNetworkTracesSlotSender(req)
13553	if err != nil {
13554		result.Response = autorest.Response{Response: resp}
13555		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure sending request")
13556		return
13557	}
13558
13559	result, err = client.GetNetworkTracesSlotResponder(resp)
13560	if err != nil {
13561		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlot", resp, "Failure responding to request")
13562		return
13563	}
13564
13565	return
13566}
13567
13568// GetNetworkTracesSlotPreparer prepares the GetNetworkTracesSlot request.
13569func (client AppsClient) GetNetworkTracesSlotPreparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13570	pathParameters := map[string]interface{}{
13571		"name":              autorest.Encode("path", name),
13572		"operationId":       autorest.Encode("path", operationID),
13573		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13574		"slot":              autorest.Encode("path", slot),
13575		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13576	}
13577
13578	const APIVersion = "2020-09-01"
13579	queryParameters := map[string]interface{}{
13580		"api-version": APIVersion,
13581	}
13582
13583	preparer := autorest.CreatePreparer(
13584		autorest.AsGet(),
13585		autorest.WithBaseURL(client.BaseURI),
13586		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}", pathParameters),
13587		autorest.WithQueryParameters(queryParameters))
13588	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13589}
13590
13591// GetNetworkTracesSlotSender sends the GetNetworkTracesSlot request. The method will close the
13592// http.Response Body if it receives an error.
13593func (client AppsClient) GetNetworkTracesSlotSender(req *http.Request) (*http.Response, error) {
13594	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13595}
13596
13597// GetNetworkTracesSlotResponder handles the response to the GetNetworkTracesSlot request. The method always
13598// closes the http.Response Body.
13599func (client AppsClient) GetNetworkTracesSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
13600	err = autorest.Respond(
13601		resp,
13602		azure.WithErrorUnlessStatusCode(http.StatusOK),
13603		autorest.ByUnmarshallingJSON(&result.Value),
13604		autorest.ByClosing())
13605	result.Response = autorest.Response{Response: resp}
13606	return
13607}
13608
13609// GetNetworkTracesSlotV2 description for Gets a named operation for a network trace capturing (or deployment slot, if
13610// specified).
13611// Parameters:
13612// resourceGroupName - name of the resource group to which the resource belongs.
13613// name - name of the app.
13614// operationID - GUID of the operation.
13615// slot - name of the deployment slot. If a slot is not specified, the API will get an operation for the
13616// production slot.
13617func (client AppsClient) GetNetworkTracesSlotV2(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (result ListNetworkTrace, err error) {
13618	if tracing.IsEnabled() {
13619		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesSlotV2")
13620		defer func() {
13621			sc := -1
13622			if result.Response.Response != nil {
13623				sc = result.Response.Response.StatusCode
13624			}
13625			tracing.EndSpan(ctx, sc, err)
13626		}()
13627	}
13628	if err := validation.Validate([]validation.Validation{
13629		{TargetValue: resourceGroupName,
13630			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13631				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13632				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13633		return result, validation.NewError("web.AppsClient", "GetNetworkTracesSlotV2", err.Error())
13634	}
13635
13636	req, err := client.GetNetworkTracesSlotV2Preparer(ctx, resourceGroupName, name, operationID, slot)
13637	if err != nil {
13638		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", nil, "Failure preparing request")
13639		return
13640	}
13641
13642	resp, err := client.GetNetworkTracesSlotV2Sender(req)
13643	if err != nil {
13644		result.Response = autorest.Response{Response: resp}
13645		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure sending request")
13646		return
13647	}
13648
13649	result, err = client.GetNetworkTracesSlotV2Responder(resp)
13650	if err != nil {
13651		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesSlotV2", resp, "Failure responding to request")
13652		return
13653	}
13654
13655	return
13656}
13657
13658// GetNetworkTracesSlotV2Preparer prepares the GetNetworkTracesSlotV2 request.
13659func (client AppsClient) GetNetworkTracesSlotV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string, slot string) (*http.Request, error) {
13660	pathParameters := map[string]interface{}{
13661		"name":              autorest.Encode("path", name),
13662		"operationId":       autorest.Encode("path", operationID),
13663		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13664		"slot":              autorest.Encode("path", slot),
13665		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13666	}
13667
13668	const APIVersion = "2020-09-01"
13669	queryParameters := map[string]interface{}{
13670		"api-version": APIVersion,
13671	}
13672
13673	preparer := autorest.CreatePreparer(
13674		autorest.AsGet(),
13675		autorest.WithBaseURL(client.BaseURI),
13676		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}", pathParameters),
13677		autorest.WithQueryParameters(queryParameters))
13678	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13679}
13680
13681// GetNetworkTracesSlotV2Sender sends the GetNetworkTracesSlotV2 request. The method will close the
13682// http.Response Body if it receives an error.
13683func (client AppsClient) GetNetworkTracesSlotV2Sender(req *http.Request) (*http.Response, error) {
13684	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13685}
13686
13687// GetNetworkTracesSlotV2Responder handles the response to the GetNetworkTracesSlotV2 request. The method always
13688// closes the http.Response Body.
13689func (client AppsClient) GetNetworkTracesSlotV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13690	err = autorest.Respond(
13691		resp,
13692		azure.WithErrorUnlessStatusCode(http.StatusOK),
13693		autorest.ByUnmarshallingJSON(&result.Value),
13694		autorest.ByClosing())
13695	result.Response = autorest.Response{Response: resp}
13696	return
13697}
13698
13699// GetNetworkTracesV2 description for Gets a named operation for a network trace capturing (or deployment slot, if
13700// specified).
13701// Parameters:
13702// resourceGroupName - name of the resource group to which the resource belongs.
13703// name - name of the app.
13704// operationID - GUID of the operation.
13705func (client AppsClient) GetNetworkTracesV2(ctx context.Context, resourceGroupName string, name string, operationID string) (result ListNetworkTrace, err error) {
13706	if tracing.IsEnabled() {
13707		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetNetworkTracesV2")
13708		defer func() {
13709			sc := -1
13710			if result.Response.Response != nil {
13711				sc = result.Response.Response.StatusCode
13712			}
13713			tracing.EndSpan(ctx, sc, err)
13714		}()
13715	}
13716	if err := validation.Validate([]validation.Validation{
13717		{TargetValue: resourceGroupName,
13718			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13719				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13720				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13721		return result, validation.NewError("web.AppsClient", "GetNetworkTracesV2", err.Error())
13722	}
13723
13724	req, err := client.GetNetworkTracesV2Preparer(ctx, resourceGroupName, name, operationID)
13725	if err != nil {
13726		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", nil, "Failure preparing request")
13727		return
13728	}
13729
13730	resp, err := client.GetNetworkTracesV2Sender(req)
13731	if err != nil {
13732		result.Response = autorest.Response{Response: resp}
13733		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure sending request")
13734		return
13735	}
13736
13737	result, err = client.GetNetworkTracesV2Responder(resp)
13738	if err != nil {
13739		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetNetworkTracesV2", resp, "Failure responding to request")
13740		return
13741	}
13742
13743	return
13744}
13745
13746// GetNetworkTracesV2Preparer prepares the GetNetworkTracesV2 request.
13747func (client AppsClient) GetNetworkTracesV2Preparer(ctx context.Context, resourceGroupName string, name string, operationID string) (*http.Request, error) {
13748	pathParameters := map[string]interface{}{
13749		"name":              autorest.Encode("path", name),
13750		"operationId":       autorest.Encode("path", operationID),
13751		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13752		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13753	}
13754
13755	const APIVersion = "2020-09-01"
13756	queryParameters := map[string]interface{}{
13757		"api-version": APIVersion,
13758	}
13759
13760	preparer := autorest.CreatePreparer(
13761		autorest.AsGet(),
13762		autorest.WithBaseURL(client.BaseURI),
13763		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}", pathParameters),
13764		autorest.WithQueryParameters(queryParameters))
13765	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13766}
13767
13768// GetNetworkTracesV2Sender sends the GetNetworkTracesV2 request. The method will close the
13769// http.Response Body if it receives an error.
13770func (client AppsClient) GetNetworkTracesV2Sender(req *http.Request) (*http.Response, error) {
13771	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13772}
13773
13774// GetNetworkTracesV2Responder handles the response to the GetNetworkTracesV2 request. The method always
13775// closes the http.Response Body.
13776func (client AppsClient) GetNetworkTracesV2Responder(resp *http.Response) (result ListNetworkTrace, err error) {
13777	err = autorest.Respond(
13778		resp,
13779		azure.WithErrorUnlessStatusCode(http.StatusOK),
13780		autorest.ByUnmarshallingJSON(&result.Value),
13781		autorest.ByClosing())
13782	result.Response = autorest.Response{Response: resp}
13783	return
13784}
13785
13786// GetPremierAddOn description for Gets a named add-on of an app.
13787// Parameters:
13788// resourceGroupName - name of the resource group to which the resource belongs.
13789// name - name of the app.
13790// premierAddOnName - add-on name.
13791func (client AppsClient) GetPremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) {
13792	if tracing.IsEnabled() {
13793		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOn")
13794		defer func() {
13795			sc := -1
13796			if result.Response.Response != nil {
13797				sc = result.Response.Response.StatusCode
13798			}
13799			tracing.EndSpan(ctx, sc, err)
13800		}()
13801	}
13802	if err := validation.Validate([]validation.Validation{
13803		{TargetValue: resourceGroupName,
13804			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13805				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13806				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13807		return result, validation.NewError("web.AppsClient", "GetPremierAddOn", err.Error())
13808	}
13809
13810	req, err := client.GetPremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName)
13811	if err != nil {
13812		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", nil, "Failure preparing request")
13813		return
13814	}
13815
13816	resp, err := client.GetPremierAddOnSender(req)
13817	if err != nil {
13818		result.Response = autorest.Response{Response: resp}
13819		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure sending request")
13820		return
13821	}
13822
13823	result, err = client.GetPremierAddOnResponder(resp)
13824	if err != nil {
13825		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOn", resp, "Failure responding to request")
13826		return
13827	}
13828
13829	return
13830}
13831
13832// GetPremierAddOnPreparer prepares the GetPremierAddOn request.
13833func (client AppsClient) GetPremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string) (*http.Request, error) {
13834	pathParameters := map[string]interface{}{
13835		"name":              autorest.Encode("path", name),
13836		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
13837		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13838		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13839	}
13840
13841	const APIVersion = "2020-09-01"
13842	queryParameters := map[string]interface{}{
13843		"api-version": APIVersion,
13844	}
13845
13846	preparer := autorest.CreatePreparer(
13847		autorest.AsGet(),
13848		autorest.WithBaseURL(client.BaseURI),
13849		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
13850		autorest.WithQueryParameters(queryParameters))
13851	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13852}
13853
13854// GetPremierAddOnSender sends the GetPremierAddOn request. The method will close the
13855// http.Response Body if it receives an error.
13856func (client AppsClient) GetPremierAddOnSender(req *http.Request) (*http.Response, error) {
13857	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13858}
13859
13860// GetPremierAddOnResponder handles the response to the GetPremierAddOn request. The method always
13861// closes the http.Response Body.
13862func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
13863	err = autorest.Respond(
13864		resp,
13865		azure.WithErrorUnlessStatusCode(http.StatusOK),
13866		autorest.ByUnmarshallingJSON(&result),
13867		autorest.ByClosing())
13868	result.Response = autorest.Response{Response: resp}
13869	return
13870}
13871
13872// GetPremierAddOnSlot description for Gets a named add-on of an app.
13873// Parameters:
13874// resourceGroupName - name of the resource group to which the resource belongs.
13875// name - name of the app.
13876// premierAddOnName - add-on name.
13877// slot - name of the deployment slot. If a slot is not specified, the API will get the named add-on for the
13878// production slot.
13879func (client AppsClient) GetPremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) {
13880	if tracing.IsEnabled() {
13881		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPremierAddOnSlot")
13882		defer func() {
13883			sc := -1
13884			if result.Response.Response != nil {
13885				sc = result.Response.Response.StatusCode
13886			}
13887			tracing.EndSpan(ctx, sc, err)
13888		}()
13889	}
13890	if err := validation.Validate([]validation.Validation{
13891		{TargetValue: resourceGroupName,
13892			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13893				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13894				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13895		return result, validation.NewError("web.AppsClient", "GetPremierAddOnSlot", err.Error())
13896	}
13897
13898	req, err := client.GetPremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, slot)
13899	if err != nil {
13900		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", nil, "Failure preparing request")
13901		return
13902	}
13903
13904	resp, err := client.GetPremierAddOnSlotSender(req)
13905	if err != nil {
13906		result.Response = autorest.Response{Response: resp}
13907		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure sending request")
13908		return
13909	}
13910
13911	result, err = client.GetPremierAddOnSlotResponder(resp)
13912	if err != nil {
13913		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPremierAddOnSlot", resp, "Failure responding to request")
13914		return
13915	}
13916
13917	return
13918}
13919
13920// GetPremierAddOnSlotPreparer prepares the GetPremierAddOnSlot request.
13921func (client AppsClient) GetPremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, slot string) (*http.Request, error) {
13922	pathParameters := map[string]interface{}{
13923		"name":              autorest.Encode("path", name),
13924		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
13925		"resourceGroupName": autorest.Encode("path", resourceGroupName),
13926		"slot":              autorest.Encode("path", slot),
13927		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
13928	}
13929
13930	const APIVersion = "2020-09-01"
13931	queryParameters := map[string]interface{}{
13932		"api-version": APIVersion,
13933	}
13934
13935	preparer := autorest.CreatePreparer(
13936		autorest.AsGet(),
13937		autorest.WithBaseURL(client.BaseURI),
13938		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
13939		autorest.WithQueryParameters(queryParameters))
13940	return preparer.Prepare((&http.Request{}).WithContext(ctx))
13941}
13942
13943// GetPremierAddOnSlotSender sends the GetPremierAddOnSlot request. The method will close the
13944// http.Response Body if it receives an error.
13945func (client AppsClient) GetPremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
13946	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
13947}
13948
13949// GetPremierAddOnSlotResponder handles the response to the GetPremierAddOnSlot request. The method always
13950// closes the http.Response Body.
13951func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
13952	err = autorest.Respond(
13953		resp,
13954		azure.WithErrorUnlessStatusCode(http.StatusOK),
13955		autorest.ByUnmarshallingJSON(&result),
13956		autorest.ByClosing())
13957	result.Response = autorest.Response{Response: resp}
13958	return
13959}
13960
13961// GetPrivateAccess description for Gets data around private site access enablement and authorized Virtual Networks
13962// that can access the site.
13963// Parameters:
13964// resourceGroupName - name of the resource group to which the resource belongs.
13965// name - the name of the web app.
13966func (client AppsClient) GetPrivateAccess(ctx context.Context, resourceGroupName string, name string) (result PrivateAccess, err error) {
13967	if tracing.IsEnabled() {
13968		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccess")
13969		defer func() {
13970			sc := -1
13971			if result.Response.Response != nil {
13972				sc = result.Response.Response.StatusCode
13973			}
13974			tracing.EndSpan(ctx, sc, err)
13975		}()
13976	}
13977	if err := validation.Validate([]validation.Validation{
13978		{TargetValue: resourceGroupName,
13979			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
13980				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
13981				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
13982		return result, validation.NewError("web.AppsClient", "GetPrivateAccess", err.Error())
13983	}
13984
13985	req, err := client.GetPrivateAccessPreparer(ctx, resourceGroupName, name)
13986	if err != nil {
13987		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", nil, "Failure preparing request")
13988		return
13989	}
13990
13991	resp, err := client.GetPrivateAccessSender(req)
13992	if err != nil {
13993		result.Response = autorest.Response{Response: resp}
13994		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure sending request")
13995		return
13996	}
13997
13998	result, err = client.GetPrivateAccessResponder(resp)
13999	if err != nil {
14000		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccess", resp, "Failure responding to request")
14001		return
14002	}
14003
14004	return
14005}
14006
14007// GetPrivateAccessPreparer prepares the GetPrivateAccess request.
14008func (client AppsClient) GetPrivateAccessPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14009	pathParameters := map[string]interface{}{
14010		"name":              autorest.Encode("path", name),
14011		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14012		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14013	}
14014
14015	const APIVersion = "2020-09-01"
14016	queryParameters := map[string]interface{}{
14017		"api-version": APIVersion,
14018	}
14019
14020	preparer := autorest.CreatePreparer(
14021		autorest.AsGet(),
14022		autorest.WithBaseURL(client.BaseURI),
14023		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters),
14024		autorest.WithQueryParameters(queryParameters))
14025	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14026}
14027
14028// GetPrivateAccessSender sends the GetPrivateAccess request. The method will close the
14029// http.Response Body if it receives an error.
14030func (client AppsClient) GetPrivateAccessSender(req *http.Request) (*http.Response, error) {
14031	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14032}
14033
14034// GetPrivateAccessResponder handles the response to the GetPrivateAccess request. The method always
14035// closes the http.Response Body.
14036func (client AppsClient) GetPrivateAccessResponder(resp *http.Response) (result PrivateAccess, err error) {
14037	err = autorest.Respond(
14038		resp,
14039		azure.WithErrorUnlessStatusCode(http.StatusOK),
14040		autorest.ByUnmarshallingJSON(&result),
14041		autorest.ByClosing())
14042	result.Response = autorest.Response{Response: resp}
14043	return
14044}
14045
14046// GetPrivateAccessSlot description for Gets data around private site access enablement and authorized Virtual Networks
14047// that can access the site.
14048// Parameters:
14049// resourceGroupName - name of the resource group to which the resource belongs.
14050// name - the name of the web app.
14051// slot - the name of the slot for the web app.
14052func (client AppsClient) GetPrivateAccessSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PrivateAccess, err error) {
14053	if tracing.IsEnabled() {
14054		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateAccessSlot")
14055		defer func() {
14056			sc := -1
14057			if result.Response.Response != nil {
14058				sc = result.Response.Response.StatusCode
14059			}
14060			tracing.EndSpan(ctx, sc, err)
14061		}()
14062	}
14063	if err := validation.Validate([]validation.Validation{
14064		{TargetValue: resourceGroupName,
14065			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14066				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14067				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14068		return result, validation.NewError("web.AppsClient", "GetPrivateAccessSlot", err.Error())
14069	}
14070
14071	req, err := client.GetPrivateAccessSlotPreparer(ctx, resourceGroupName, name, slot)
14072	if err != nil {
14073		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", nil, "Failure preparing request")
14074		return
14075	}
14076
14077	resp, err := client.GetPrivateAccessSlotSender(req)
14078	if err != nil {
14079		result.Response = autorest.Response{Response: resp}
14080		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure sending request")
14081		return
14082	}
14083
14084	result, err = client.GetPrivateAccessSlotResponder(resp)
14085	if err != nil {
14086		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateAccessSlot", resp, "Failure responding to request")
14087		return
14088	}
14089
14090	return
14091}
14092
14093// GetPrivateAccessSlotPreparer prepares the GetPrivateAccessSlot request.
14094func (client AppsClient) GetPrivateAccessSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
14095	pathParameters := map[string]interface{}{
14096		"name":              autorest.Encode("path", name),
14097		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14098		"slot":              autorest.Encode("path", slot),
14099		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14100	}
14101
14102	const APIVersion = "2020-09-01"
14103	queryParameters := map[string]interface{}{
14104		"api-version": APIVersion,
14105	}
14106
14107	preparer := autorest.CreatePreparer(
14108		autorest.AsGet(),
14109		autorest.WithBaseURL(client.BaseURI),
14110		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters),
14111		autorest.WithQueryParameters(queryParameters))
14112	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14113}
14114
14115// GetPrivateAccessSlotSender sends the GetPrivateAccessSlot request. The method will close the
14116// http.Response Body if it receives an error.
14117func (client AppsClient) GetPrivateAccessSlotSender(req *http.Request) (*http.Response, error) {
14118	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14119}
14120
14121// GetPrivateAccessSlotResponder handles the response to the GetPrivateAccessSlot request. The method always
14122// closes the http.Response Body.
14123func (client AppsClient) GetPrivateAccessSlotResponder(resp *http.Response) (result PrivateAccess, err error) {
14124	err = autorest.Respond(
14125		resp,
14126		azure.WithErrorUnlessStatusCode(http.StatusOK),
14127		autorest.ByUnmarshallingJSON(&result),
14128		autorest.ByClosing())
14129	result.Response = autorest.Response{Response: resp}
14130	return
14131}
14132
14133// GetPrivateEndpointConnection description for Gets a private endpoint connection
14134// Parameters:
14135// resourceGroupName - name of the resource group to which the resource belongs.
14136// name - name of the site.
14137func (client AppsClient) GetPrivateEndpointConnection(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (result PrivateEndpointConnectionResource, err error) {
14138	if tracing.IsEnabled() {
14139		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateEndpointConnection")
14140		defer func() {
14141			sc := -1
14142			if result.Response.Response != nil {
14143				sc = result.Response.Response.StatusCode
14144			}
14145			tracing.EndSpan(ctx, sc, err)
14146		}()
14147	}
14148	if err := validation.Validate([]validation.Validation{
14149		{TargetValue: resourceGroupName,
14150			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14151				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14152				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14153		return result, validation.NewError("web.AppsClient", "GetPrivateEndpointConnection", err.Error())
14154	}
14155
14156	req, err := client.GetPrivateEndpointConnectionPreparer(ctx, resourceGroupName, name, privateEndpointConnectionName)
14157	if err != nil {
14158		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnection", nil, "Failure preparing request")
14159		return
14160	}
14161
14162	resp, err := client.GetPrivateEndpointConnectionSender(req)
14163	if err != nil {
14164		result.Response = autorest.Response{Response: resp}
14165		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnection", resp, "Failure sending request")
14166		return
14167	}
14168
14169	result, err = client.GetPrivateEndpointConnectionResponder(resp)
14170	if err != nil {
14171		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateEndpointConnection", resp, "Failure responding to request")
14172		return
14173	}
14174
14175	return
14176}
14177
14178// GetPrivateEndpointConnectionPreparer prepares the GetPrivateEndpointConnection request.
14179func (client AppsClient) GetPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, name string, privateEndpointConnectionName string) (*http.Request, error) {
14180	pathParameters := map[string]interface{}{
14181		"name":                          autorest.Encode("path", name),
14182		"privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
14183		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
14184		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
14185	}
14186
14187	const APIVersion = "2020-09-01"
14188	queryParameters := map[string]interface{}{
14189		"api-version": APIVersion,
14190	}
14191
14192	preparer := autorest.CreatePreparer(
14193		autorest.AsGet(),
14194		autorest.WithBaseURL(client.BaseURI),
14195		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
14196		autorest.WithQueryParameters(queryParameters))
14197	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14198}
14199
14200// GetPrivateEndpointConnectionSender sends the GetPrivateEndpointConnection request. The method will close the
14201// http.Response Body if it receives an error.
14202func (client AppsClient) GetPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) {
14203	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14204}
14205
14206// GetPrivateEndpointConnectionResponder handles the response to the GetPrivateEndpointConnection request. The method always
14207// closes the http.Response Body.
14208func (client AppsClient) GetPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnectionResource, err error) {
14209	err = autorest.Respond(
14210		resp,
14211		azure.WithErrorUnlessStatusCode(http.StatusOK),
14212		autorest.ByUnmarshallingJSON(&result),
14213		autorest.ByClosing())
14214	result.Response = autorest.Response{Response: resp}
14215	return
14216}
14217
14218// GetPrivateLinkResources description for Gets the private link resources
14219// Parameters:
14220// resourceGroupName - name of the resource group to which the resource belongs.
14221// name - name of the site.
14222func (client AppsClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, name string) (result PrivateLinkResourcesWrapper, err error) {
14223	if tracing.IsEnabled() {
14224		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPrivateLinkResources")
14225		defer func() {
14226			sc := -1
14227			if result.Response.Response != nil {
14228				sc = result.Response.Response.StatusCode
14229			}
14230			tracing.EndSpan(ctx, sc, err)
14231		}()
14232	}
14233	if err := validation.Validate([]validation.Validation{
14234		{TargetValue: resourceGroupName,
14235			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14236				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14237				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14238		return result, validation.NewError("web.AppsClient", "GetPrivateLinkResources", err.Error())
14239	}
14240
14241	req, err := client.GetPrivateLinkResourcesPreparer(ctx, resourceGroupName, name)
14242	if err != nil {
14243		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResources", nil, "Failure preparing request")
14244		return
14245	}
14246
14247	resp, err := client.GetPrivateLinkResourcesSender(req)
14248	if err != nil {
14249		result.Response = autorest.Response{Response: resp}
14250		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResources", resp, "Failure sending request")
14251		return
14252	}
14253
14254	result, err = client.GetPrivateLinkResourcesResponder(resp)
14255	if err != nil {
14256		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPrivateLinkResources", resp, "Failure responding to request")
14257		return
14258	}
14259
14260	return
14261}
14262
14263// GetPrivateLinkResourcesPreparer prepares the GetPrivateLinkResources request.
14264func (client AppsClient) GetPrivateLinkResourcesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
14265	pathParameters := map[string]interface{}{
14266		"name":              autorest.Encode("path", name),
14267		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14268		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14269	}
14270
14271	const APIVersion = "2020-09-01"
14272	queryParameters := map[string]interface{}{
14273		"api-version": APIVersion,
14274	}
14275
14276	preparer := autorest.CreatePreparer(
14277		autorest.AsGet(),
14278		autorest.WithBaseURL(client.BaseURI),
14279		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources", pathParameters),
14280		autorest.WithQueryParameters(queryParameters))
14281	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14282}
14283
14284// GetPrivateLinkResourcesSender sends the GetPrivateLinkResources request. The method will close the
14285// http.Response Body if it receives an error.
14286func (client AppsClient) GetPrivateLinkResourcesSender(req *http.Request) (*http.Response, error) {
14287	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14288}
14289
14290// GetPrivateLinkResourcesResponder handles the response to the GetPrivateLinkResources request. The method always
14291// closes the http.Response Body.
14292func (client AppsClient) GetPrivateLinkResourcesResponder(resp *http.Response) (result PrivateLinkResourcesWrapper, err error) {
14293	err = autorest.Respond(
14294		resp,
14295		azure.WithErrorUnlessStatusCode(http.StatusOK),
14296		autorest.ByUnmarshallingJSON(&result),
14297		autorest.ByClosing())
14298	result.Response = autorest.Response{Response: resp}
14299	return
14300}
14301
14302// GetProcess description for Get process information by its ID for a specific scaled-out instance in a web site.
14303// Parameters:
14304// resourceGroupName - name of the resource group to which the resource belongs.
14305// name - site name.
14306// processID - pID.
14307func (client AppsClient) GetProcess(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessInfo, err error) {
14308	if tracing.IsEnabled() {
14309		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcess")
14310		defer func() {
14311			sc := -1
14312			if result.Response.Response != nil {
14313				sc = result.Response.Response.StatusCode
14314			}
14315			tracing.EndSpan(ctx, sc, err)
14316		}()
14317	}
14318	if err := validation.Validate([]validation.Validation{
14319		{TargetValue: resourceGroupName,
14320			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14321				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14322				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14323		return result, validation.NewError("web.AppsClient", "GetProcess", err.Error())
14324	}
14325
14326	req, err := client.GetProcessPreparer(ctx, resourceGroupName, name, processID)
14327	if err != nil {
14328		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request")
14329		return
14330	}
14331
14332	resp, err := client.GetProcessSender(req)
14333	if err != nil {
14334		result.Response = autorest.Response{Response: resp}
14335		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request")
14336		return
14337	}
14338
14339	result, err = client.GetProcessResponder(resp)
14340	if err != nil {
14341		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request")
14342		return
14343	}
14344
14345	return
14346}
14347
14348// GetProcessPreparer prepares the GetProcess request.
14349func (client AppsClient) GetProcessPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
14350	pathParameters := map[string]interface{}{
14351		"name":              autorest.Encode("path", name),
14352		"processId":         autorest.Encode("path", processID),
14353		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14354		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14355	}
14356
14357	const APIVersion = "2020-09-01"
14358	queryParameters := map[string]interface{}{
14359		"api-version": APIVersion,
14360	}
14361
14362	preparer := autorest.CreatePreparer(
14363		autorest.AsGet(),
14364		autorest.WithBaseURL(client.BaseURI),
14365		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters),
14366		autorest.WithQueryParameters(queryParameters))
14367	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14368}
14369
14370// GetProcessSender sends the GetProcess request. The method will close the
14371// http.Response Body if it receives an error.
14372func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) {
14373	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14374}
14375
14376// GetProcessResponder handles the response to the GetProcess request. The method always
14377// closes the http.Response Body.
14378func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) {
14379	err = autorest.Respond(
14380		resp,
14381		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14382		autorest.ByUnmarshallingJSON(&result),
14383		autorest.ByClosing())
14384	result.Response = autorest.Response{Response: resp}
14385	return
14386}
14387
14388// GetProcessDump description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web
14389// site.
14390// Parameters:
14391// resourceGroupName - name of the resource group to which the resource belongs.
14392// name - site name.
14393// processID - pID.
14394func (client AppsClient) GetProcessDump(ctx context.Context, resourceGroupName string, name string, processID string) (result ReadCloser, err error) {
14395	if tracing.IsEnabled() {
14396		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDump")
14397		defer func() {
14398			sc := -1
14399			if result.Response.Response != nil {
14400				sc = result.Response.Response.StatusCode
14401			}
14402			tracing.EndSpan(ctx, sc, err)
14403		}()
14404	}
14405	if err := validation.Validate([]validation.Validation{
14406		{TargetValue: resourceGroupName,
14407			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14408				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14409				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14410		return result, validation.NewError("web.AppsClient", "GetProcessDump", err.Error())
14411	}
14412
14413	req, err := client.GetProcessDumpPreparer(ctx, resourceGroupName, name, processID)
14414	if err != nil {
14415		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request")
14416		return
14417	}
14418
14419	resp, err := client.GetProcessDumpSender(req)
14420	if err != nil {
14421		result.Response = autorest.Response{Response: resp}
14422		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request")
14423		return
14424	}
14425
14426	result, err = client.GetProcessDumpResponder(resp)
14427	if err != nil {
14428		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request")
14429		return
14430	}
14431
14432	return
14433}
14434
14435// GetProcessDumpPreparer prepares the GetProcessDump request.
14436func (client AppsClient) GetProcessDumpPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
14437	pathParameters := map[string]interface{}{
14438		"name":              autorest.Encode("path", name),
14439		"processId":         autorest.Encode("path", processID),
14440		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14441		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14442	}
14443
14444	const APIVersion = "2020-09-01"
14445	queryParameters := map[string]interface{}{
14446		"api-version": APIVersion,
14447	}
14448
14449	preparer := autorest.CreatePreparer(
14450		autorest.AsGet(),
14451		autorest.WithBaseURL(client.BaseURI),
14452		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters),
14453		autorest.WithQueryParameters(queryParameters))
14454	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14455}
14456
14457// GetProcessDumpSender sends the GetProcessDump request. The method will close the
14458// http.Response Body if it receives an error.
14459func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) {
14460	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14461}
14462
14463// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always
14464// closes the http.Response Body.
14465func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result ReadCloser, err error) {
14466	result.Value = &resp.Body
14467	err = autorest.Respond(
14468		resp,
14469		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
14470	result.Response = autorest.Response{Response: resp}
14471	return
14472}
14473
14474// GetProcessDumpSlot description for Get a memory dump of a process by its ID for a specific scaled-out instance in a
14475// web site.
14476// Parameters:
14477// resourceGroupName - name of the resource group to which the resource belongs.
14478// name - site name.
14479// processID - pID.
14480// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
14481// production slot.
14482func (client AppsClient) GetProcessDumpSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ReadCloser, err error) {
14483	if tracing.IsEnabled() {
14484		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessDumpSlot")
14485		defer func() {
14486			sc := -1
14487			if result.Response.Response != nil {
14488				sc = result.Response.Response.StatusCode
14489			}
14490			tracing.EndSpan(ctx, sc, err)
14491		}()
14492	}
14493	if err := validation.Validate([]validation.Validation{
14494		{TargetValue: resourceGroupName,
14495			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14496				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14497				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14498		return result, validation.NewError("web.AppsClient", "GetProcessDumpSlot", err.Error())
14499	}
14500
14501	req, err := client.GetProcessDumpSlotPreparer(ctx, resourceGroupName, name, processID, slot)
14502	if err != nil {
14503		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request")
14504		return
14505	}
14506
14507	resp, err := client.GetProcessDumpSlotSender(req)
14508	if err != nil {
14509		result.Response = autorest.Response{Response: resp}
14510		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request")
14511		return
14512	}
14513
14514	result, err = client.GetProcessDumpSlotResponder(resp)
14515	if err != nil {
14516		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request")
14517		return
14518	}
14519
14520	return
14521}
14522
14523// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request.
14524func (client AppsClient) GetProcessDumpSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
14525	pathParameters := map[string]interface{}{
14526		"name":              autorest.Encode("path", name),
14527		"processId":         autorest.Encode("path", processID),
14528		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14529		"slot":              autorest.Encode("path", slot),
14530		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14531	}
14532
14533	const APIVersion = "2020-09-01"
14534	queryParameters := map[string]interface{}{
14535		"api-version": APIVersion,
14536	}
14537
14538	preparer := autorest.CreatePreparer(
14539		autorest.AsGet(),
14540		autorest.WithBaseURL(client.BaseURI),
14541		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters),
14542		autorest.WithQueryParameters(queryParameters))
14543	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14544}
14545
14546// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the
14547// http.Response Body if it receives an error.
14548func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) {
14549	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14550}
14551
14552// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always
14553// closes the http.Response Body.
14554func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result ReadCloser, err error) {
14555	result.Value = &resp.Body
14556	err = autorest.Respond(
14557		resp,
14558		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound))
14559	result.Response = autorest.Response{Response: resp}
14560	return
14561}
14562
14563// GetProcessModule description for Get process information by its ID for a specific scaled-out instance in a web site.
14564// Parameters:
14565// resourceGroupName - name of the resource group to which the resource belongs.
14566// name - site name.
14567// processID - pID.
14568// baseAddress - module base address.
14569func (client AppsClient) GetProcessModule(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (result ProcessModuleInfo, err error) {
14570	if tracing.IsEnabled() {
14571		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModule")
14572		defer func() {
14573			sc := -1
14574			if result.Response.Response != nil {
14575				sc = result.Response.Response.StatusCode
14576			}
14577			tracing.EndSpan(ctx, sc, err)
14578		}()
14579	}
14580	if err := validation.Validate([]validation.Validation{
14581		{TargetValue: resourceGroupName,
14582			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14583				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14584				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14585		return result, validation.NewError("web.AppsClient", "GetProcessModule", err.Error())
14586	}
14587
14588	req, err := client.GetProcessModulePreparer(ctx, resourceGroupName, name, processID, baseAddress)
14589	if err != nil {
14590		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request")
14591		return
14592	}
14593
14594	resp, err := client.GetProcessModuleSender(req)
14595	if err != nil {
14596		result.Response = autorest.Response{Response: resp}
14597		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request")
14598		return
14599	}
14600
14601	result, err = client.GetProcessModuleResponder(resp)
14602	if err != nil {
14603		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request")
14604		return
14605	}
14606
14607	return
14608}
14609
14610// GetProcessModulePreparer prepares the GetProcessModule request.
14611func (client AppsClient) GetProcessModulePreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string) (*http.Request, error) {
14612	pathParameters := map[string]interface{}{
14613		"baseAddress":       autorest.Encode("path", baseAddress),
14614		"name":              autorest.Encode("path", name),
14615		"processId":         autorest.Encode("path", processID),
14616		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14617		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14618	}
14619
14620	const APIVersion = "2020-09-01"
14621	queryParameters := map[string]interface{}{
14622		"api-version": APIVersion,
14623	}
14624
14625	preparer := autorest.CreatePreparer(
14626		autorest.AsGet(),
14627		autorest.WithBaseURL(client.BaseURI),
14628		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}", pathParameters),
14629		autorest.WithQueryParameters(queryParameters))
14630	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14631}
14632
14633// GetProcessModuleSender sends the GetProcessModule request. The method will close the
14634// http.Response Body if it receives an error.
14635func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) {
14636	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14637}
14638
14639// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always
14640// closes the http.Response Body.
14641func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
14642	err = autorest.Respond(
14643		resp,
14644		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14645		autorest.ByUnmarshallingJSON(&result),
14646		autorest.ByClosing())
14647	result.Response = autorest.Response{Response: resp}
14648	return
14649}
14650
14651// GetProcessModuleSlot description for Get process information by its ID for a specific scaled-out instance in a web
14652// site.
14653// Parameters:
14654// resourceGroupName - name of the resource group to which the resource belongs.
14655// name - site name.
14656// processID - pID.
14657// baseAddress - module base address.
14658// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
14659// production slot.
14660func (client AppsClient) GetProcessModuleSlot(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (result ProcessModuleInfo, err error) {
14661	if tracing.IsEnabled() {
14662		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessModuleSlot")
14663		defer func() {
14664			sc := -1
14665			if result.Response.Response != nil {
14666				sc = result.Response.Response.StatusCode
14667			}
14668			tracing.EndSpan(ctx, sc, err)
14669		}()
14670	}
14671	if err := validation.Validate([]validation.Validation{
14672		{TargetValue: resourceGroupName,
14673			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14674				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14675				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14676		return result, validation.NewError("web.AppsClient", "GetProcessModuleSlot", err.Error())
14677	}
14678
14679	req, err := client.GetProcessModuleSlotPreparer(ctx, resourceGroupName, name, processID, baseAddress, slot)
14680	if err != nil {
14681		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request")
14682		return
14683	}
14684
14685	resp, err := client.GetProcessModuleSlotSender(req)
14686	if err != nil {
14687		result.Response = autorest.Response{Response: resp}
14688		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request")
14689		return
14690	}
14691
14692	result, err = client.GetProcessModuleSlotResponder(resp)
14693	if err != nil {
14694		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request")
14695		return
14696	}
14697
14698	return
14699}
14700
14701// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request.
14702func (client AppsClient) GetProcessModuleSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, baseAddress string, slot string) (*http.Request, error) {
14703	pathParameters := map[string]interface{}{
14704		"baseAddress":       autorest.Encode("path", baseAddress),
14705		"name":              autorest.Encode("path", name),
14706		"processId":         autorest.Encode("path", processID),
14707		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14708		"slot":              autorest.Encode("path", slot),
14709		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14710	}
14711
14712	const APIVersion = "2020-09-01"
14713	queryParameters := map[string]interface{}{
14714		"api-version": APIVersion,
14715	}
14716
14717	preparer := autorest.CreatePreparer(
14718		autorest.AsGet(),
14719		autorest.WithBaseURL(client.BaseURI),
14720		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}", pathParameters),
14721		autorest.WithQueryParameters(queryParameters))
14722	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14723}
14724
14725// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the
14726// http.Response Body if it receives an error.
14727func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) {
14728	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14729}
14730
14731// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always
14732// closes the http.Response Body.
14733func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) {
14734	err = autorest.Respond(
14735		resp,
14736		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14737		autorest.ByUnmarshallingJSON(&result),
14738		autorest.ByClosing())
14739	result.Response = autorest.Response{Response: resp}
14740	return
14741}
14742
14743// GetProcessSlot description for Get process information by its ID for a specific scaled-out instance in a web site.
14744// Parameters:
14745// resourceGroupName - name of the resource group to which the resource belongs.
14746// name - site name.
14747// processID - pID.
14748// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
14749// production slot.
14750func (client AppsClient) GetProcessSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) {
14751	if tracing.IsEnabled() {
14752		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetProcessSlot")
14753		defer func() {
14754			sc := -1
14755			if result.Response.Response != nil {
14756				sc = result.Response.Response.StatusCode
14757			}
14758			tracing.EndSpan(ctx, sc, err)
14759		}()
14760	}
14761	if err := validation.Validate([]validation.Validation{
14762		{TargetValue: resourceGroupName,
14763			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14764				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14765				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14766		return result, validation.NewError("web.AppsClient", "GetProcessSlot", err.Error())
14767	}
14768
14769	req, err := client.GetProcessSlotPreparer(ctx, resourceGroupName, name, processID, slot)
14770	if err != nil {
14771		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request")
14772		return
14773	}
14774
14775	resp, err := client.GetProcessSlotSender(req)
14776	if err != nil {
14777		result.Response = autorest.Response{Response: resp}
14778		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request")
14779		return
14780	}
14781
14782	result, err = client.GetProcessSlotResponder(resp)
14783	if err != nil {
14784		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request")
14785		return
14786	}
14787
14788	return
14789}
14790
14791// GetProcessSlotPreparer prepares the GetProcessSlot request.
14792func (client AppsClient) GetProcessSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
14793	pathParameters := map[string]interface{}{
14794		"name":              autorest.Encode("path", name),
14795		"processId":         autorest.Encode("path", processID),
14796		"resourceGroupName": autorest.Encode("path", resourceGroupName),
14797		"slot":              autorest.Encode("path", slot),
14798		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
14799	}
14800
14801	const APIVersion = "2020-09-01"
14802	queryParameters := map[string]interface{}{
14803		"api-version": APIVersion,
14804	}
14805
14806	preparer := autorest.CreatePreparer(
14807		autorest.AsGet(),
14808		autorest.WithBaseURL(client.BaseURI),
14809		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters),
14810		autorest.WithQueryParameters(queryParameters))
14811	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14812}
14813
14814// GetProcessSlotSender sends the GetProcessSlot request. The method will close the
14815// http.Response Body if it receives an error.
14816func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) {
14817	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14818}
14819
14820// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always
14821// closes the http.Response Body.
14822func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) {
14823	err = autorest.Respond(
14824		resp,
14825		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
14826		autorest.ByUnmarshallingJSON(&result),
14827		autorest.ByClosing())
14828	result.Response = autorest.Response{Response: resp}
14829	return
14830}
14831
14832// GetPublicCertificate description for Get the named public certificate for an app (or deployment slot, if specified).
14833// Parameters:
14834// resourceGroupName - name of the resource group to which the resource belongs.
14835// name - name of the app.
14836// publicCertificateName - public certificate name.
14837func (client AppsClient) GetPublicCertificate(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) {
14838	if tracing.IsEnabled() {
14839		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificate")
14840		defer func() {
14841			sc := -1
14842			if result.Response.Response != nil {
14843				sc = result.Response.Response.StatusCode
14844			}
14845			tracing.EndSpan(ctx, sc, err)
14846		}()
14847	}
14848	if err := validation.Validate([]validation.Validation{
14849		{TargetValue: resourceGroupName,
14850			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14851				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14852				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14853		return result, validation.NewError("web.AppsClient", "GetPublicCertificate", err.Error())
14854	}
14855
14856	req, err := client.GetPublicCertificatePreparer(ctx, resourceGroupName, name, publicCertificateName)
14857	if err != nil {
14858		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request")
14859		return
14860	}
14861
14862	resp, err := client.GetPublicCertificateSender(req)
14863	if err != nil {
14864		result.Response = autorest.Response{Response: resp}
14865		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request")
14866		return
14867	}
14868
14869	result, err = client.GetPublicCertificateResponder(resp)
14870	if err != nil {
14871		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request")
14872		return
14873	}
14874
14875	return
14876}
14877
14878// GetPublicCertificatePreparer prepares the GetPublicCertificate request.
14879func (client AppsClient) GetPublicCertificatePreparer(ctx context.Context, resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) {
14880	pathParameters := map[string]interface{}{
14881		"name":                  autorest.Encode("path", name),
14882		"publicCertificateName": autorest.Encode("path", publicCertificateName),
14883		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
14884		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
14885	}
14886
14887	const APIVersion = "2020-09-01"
14888	queryParameters := map[string]interface{}{
14889		"api-version": APIVersion,
14890	}
14891
14892	preparer := autorest.CreatePreparer(
14893		autorest.AsGet(),
14894		autorest.WithBaseURL(client.BaseURI),
14895		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters),
14896		autorest.WithQueryParameters(queryParameters))
14897	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14898}
14899
14900// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the
14901// http.Response Body if it receives an error.
14902func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) {
14903	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14904}
14905
14906// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always
14907// closes the http.Response Body.
14908func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) {
14909	err = autorest.Respond(
14910		resp,
14911		azure.WithErrorUnlessStatusCode(http.StatusOK),
14912		autorest.ByUnmarshallingJSON(&result),
14913		autorest.ByClosing())
14914	result.Response = autorest.Response{Response: resp}
14915	return
14916}
14917
14918// GetPublicCertificateSlot description for Get the named public certificate for an app (or deployment slot, if
14919// specified).
14920// Parameters:
14921// resourceGroupName - name of the resource group to which the resource belongs.
14922// name - name of the app.
14923// slot - name of the deployment slot. If a slot is not specified, the API the named binding for the production
14924// slot.
14925// publicCertificateName - public certificate name.
14926func (client AppsClient) GetPublicCertificateSlot(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) {
14927	if tracing.IsEnabled() {
14928		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetPublicCertificateSlot")
14929		defer func() {
14930			sc := -1
14931			if result.Response.Response != nil {
14932				sc = result.Response.Response.StatusCode
14933			}
14934			tracing.EndSpan(ctx, sc, err)
14935		}()
14936	}
14937	if err := validation.Validate([]validation.Validation{
14938		{TargetValue: resourceGroupName,
14939			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
14940				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
14941				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
14942		return result, validation.NewError("web.AppsClient", "GetPublicCertificateSlot", err.Error())
14943	}
14944
14945	req, err := client.GetPublicCertificateSlotPreparer(ctx, resourceGroupName, name, slot, publicCertificateName)
14946	if err != nil {
14947		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request")
14948		return
14949	}
14950
14951	resp, err := client.GetPublicCertificateSlotSender(req)
14952	if err != nil {
14953		result.Response = autorest.Response{Response: resp}
14954		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request")
14955		return
14956	}
14957
14958	result, err = client.GetPublicCertificateSlotResponder(resp)
14959	if err != nil {
14960		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request")
14961		return
14962	}
14963
14964	return
14965}
14966
14967// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request.
14968func (client AppsClient) GetPublicCertificateSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) {
14969	pathParameters := map[string]interface{}{
14970		"name":                  autorest.Encode("path", name),
14971		"publicCertificateName": autorest.Encode("path", publicCertificateName),
14972		"resourceGroupName":     autorest.Encode("path", resourceGroupName),
14973		"slot":                  autorest.Encode("path", slot),
14974		"subscriptionId":        autorest.Encode("path", client.SubscriptionID),
14975	}
14976
14977	const APIVersion = "2020-09-01"
14978	queryParameters := map[string]interface{}{
14979		"api-version": APIVersion,
14980	}
14981
14982	preparer := autorest.CreatePreparer(
14983		autorest.AsGet(),
14984		autorest.WithBaseURL(client.BaseURI),
14985		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters),
14986		autorest.WithQueryParameters(queryParameters))
14987	return preparer.Prepare((&http.Request{}).WithContext(ctx))
14988}
14989
14990// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the
14991// http.Response Body if it receives an error.
14992func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) {
14993	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
14994}
14995
14996// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always
14997// closes the http.Response Body.
14998func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) {
14999	err = autorest.Respond(
15000		resp,
15001		azure.WithErrorUnlessStatusCode(http.StatusOK),
15002		autorest.ByUnmarshallingJSON(&result),
15003		autorest.ByClosing())
15004	result.Response = autorest.Response{Response: resp}
15005	return
15006}
15007
15008// GetRelayServiceConnection description for Gets a hybrid connection configuration by its name.
15009// Parameters:
15010// resourceGroupName - name of the resource group to which the resource belongs.
15011// name - name of the app.
15012// entityName - name of the hybrid connection.
15013func (client AppsClient) GetRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) {
15014	if tracing.IsEnabled() {
15015		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnection")
15016		defer func() {
15017			sc := -1
15018			if result.Response.Response != nil {
15019				sc = result.Response.Response.StatusCode
15020			}
15021			tracing.EndSpan(ctx, sc, err)
15022		}()
15023	}
15024	if err := validation.Validate([]validation.Validation{
15025		{TargetValue: resourceGroupName,
15026			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15027				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15028				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15029		return result, validation.NewError("web.AppsClient", "GetRelayServiceConnection", err.Error())
15030	}
15031
15032	req, err := client.GetRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName)
15033	if err != nil {
15034		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", nil, "Failure preparing request")
15035		return
15036	}
15037
15038	resp, err := client.GetRelayServiceConnectionSender(req)
15039	if err != nil {
15040		result.Response = autorest.Response{Response: resp}
15041		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure sending request")
15042		return
15043	}
15044
15045	result, err = client.GetRelayServiceConnectionResponder(resp)
15046	if err != nil {
15047		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnection", resp, "Failure responding to request")
15048		return
15049	}
15050
15051	return
15052}
15053
15054// GetRelayServiceConnectionPreparer prepares the GetRelayServiceConnection request.
15055func (client AppsClient) GetRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string) (*http.Request, error) {
15056	pathParameters := map[string]interface{}{
15057		"entityName":        autorest.Encode("path", entityName),
15058		"name":              autorest.Encode("path", name),
15059		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15060		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15061	}
15062
15063	const APIVersion = "2020-09-01"
15064	queryParameters := map[string]interface{}{
15065		"api-version": APIVersion,
15066	}
15067
15068	preparer := autorest.CreatePreparer(
15069		autorest.AsGet(),
15070		autorest.WithBaseURL(client.BaseURI),
15071		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
15072		autorest.WithQueryParameters(queryParameters))
15073	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15074}
15075
15076// GetRelayServiceConnectionSender sends the GetRelayServiceConnection request. The method will close the
15077// http.Response Body if it receives an error.
15078func (client AppsClient) GetRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
15079	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15080}
15081
15082// GetRelayServiceConnectionResponder handles the response to the GetRelayServiceConnection request. The method always
15083// closes the http.Response Body.
15084func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
15085	err = autorest.Respond(
15086		resp,
15087		azure.WithErrorUnlessStatusCode(http.StatusOK),
15088		autorest.ByUnmarshallingJSON(&result),
15089		autorest.ByClosing())
15090	result.Response = autorest.Response{Response: resp}
15091	return
15092}
15093
15094// GetRelayServiceConnectionSlot description for Gets a hybrid connection configuration by its name.
15095// Parameters:
15096// resourceGroupName - name of the resource group to which the resource belongs.
15097// name - name of the app.
15098// entityName - name of the hybrid connection.
15099// slot - name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the
15100// production slot.
15101func (client AppsClient) GetRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) {
15102	if tracing.IsEnabled() {
15103		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetRelayServiceConnectionSlot")
15104		defer func() {
15105			sc := -1
15106			if result.Response.Response != nil {
15107				sc = result.Response.Response.StatusCode
15108			}
15109			tracing.EndSpan(ctx, sc, err)
15110		}()
15111	}
15112	if err := validation.Validate([]validation.Validation{
15113		{TargetValue: resourceGroupName,
15114			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15115				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15116				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15117		return result, validation.NewError("web.AppsClient", "GetRelayServiceConnectionSlot", err.Error())
15118	}
15119
15120	req, err := client.GetRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, slot)
15121	if err != nil {
15122		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", nil, "Failure preparing request")
15123		return
15124	}
15125
15126	resp, err := client.GetRelayServiceConnectionSlotSender(req)
15127	if err != nil {
15128		result.Response = autorest.Response{Response: resp}
15129		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure sending request")
15130		return
15131	}
15132
15133	result, err = client.GetRelayServiceConnectionSlotResponder(resp)
15134	if err != nil {
15135		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetRelayServiceConnectionSlot", resp, "Failure responding to request")
15136		return
15137	}
15138
15139	return
15140}
15141
15142// GetRelayServiceConnectionSlotPreparer prepares the GetRelayServiceConnectionSlot request.
15143func (client AppsClient) GetRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, slot string) (*http.Request, error) {
15144	pathParameters := map[string]interface{}{
15145		"entityName":        autorest.Encode("path", entityName),
15146		"name":              autorest.Encode("path", name),
15147		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15148		"slot":              autorest.Encode("path", slot),
15149		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15150	}
15151
15152	const APIVersion = "2020-09-01"
15153	queryParameters := map[string]interface{}{
15154		"api-version": APIVersion,
15155	}
15156
15157	preparer := autorest.CreatePreparer(
15158		autorest.AsGet(),
15159		autorest.WithBaseURL(client.BaseURI),
15160		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
15161		autorest.WithQueryParameters(queryParameters))
15162	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15163}
15164
15165// GetRelayServiceConnectionSlotSender sends the GetRelayServiceConnectionSlot request. The method will close the
15166// http.Response Body if it receives an error.
15167func (client AppsClient) GetRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
15168	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15169}
15170
15171// GetRelayServiceConnectionSlotResponder handles the response to the GetRelayServiceConnectionSlot request. The method always
15172// closes the http.Response Body.
15173func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
15174	err = autorest.Respond(
15175		resp,
15176		azure.WithErrorUnlessStatusCode(http.StatusOK),
15177		autorest.ByUnmarshallingJSON(&result),
15178		autorest.ByClosing())
15179	result.Response = autorest.Response{Response: resp}
15180	return
15181}
15182
15183// GetScmAllowed description for Returns whether Scm basic auth is allowed on the site or not.
15184// Parameters:
15185// resourceGroupName - name of the resource group to which the resource belongs.
15186// name - name of the app.
15187func (client AppsClient) GetScmAllowed(ctx context.Context, resourceGroupName string, name string) (result CsmPublishingCredentialsPoliciesEntity, err error) {
15188	if tracing.IsEnabled() {
15189		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetScmAllowed")
15190		defer func() {
15191			sc := -1
15192			if result.Response.Response != nil {
15193				sc = result.Response.Response.StatusCode
15194			}
15195			tracing.EndSpan(ctx, sc, err)
15196		}()
15197	}
15198	if err := validation.Validate([]validation.Validation{
15199		{TargetValue: resourceGroupName,
15200			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15201				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15202				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15203		return result, validation.NewError("web.AppsClient", "GetScmAllowed", err.Error())
15204	}
15205
15206	req, err := client.GetScmAllowedPreparer(ctx, resourceGroupName, name)
15207	if err != nil {
15208		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowed", nil, "Failure preparing request")
15209		return
15210	}
15211
15212	resp, err := client.GetScmAllowedSender(req)
15213	if err != nil {
15214		result.Response = autorest.Response{Response: resp}
15215		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowed", resp, "Failure sending request")
15216		return
15217	}
15218
15219	result, err = client.GetScmAllowedResponder(resp)
15220	if err != nil {
15221		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetScmAllowed", resp, "Failure responding to request")
15222		return
15223	}
15224
15225	return
15226}
15227
15228// GetScmAllowedPreparer prepares the GetScmAllowed request.
15229func (client AppsClient) GetScmAllowedPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
15230	pathParameters := map[string]interface{}{
15231		"name":              autorest.Encode("path", name),
15232		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15233		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15234	}
15235
15236	const APIVersion = "2020-09-01"
15237	queryParameters := map[string]interface{}{
15238		"api-version": APIVersion,
15239	}
15240
15241	preparer := autorest.CreatePreparer(
15242		autorest.AsGet(),
15243		autorest.WithBaseURL(client.BaseURI),
15244		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm", pathParameters),
15245		autorest.WithQueryParameters(queryParameters))
15246	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15247}
15248
15249// GetScmAllowedSender sends the GetScmAllowed request. The method will close the
15250// http.Response Body if it receives an error.
15251func (client AppsClient) GetScmAllowedSender(req *http.Request) (*http.Response, error) {
15252	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15253}
15254
15255// GetScmAllowedResponder handles the response to the GetScmAllowed request. The method always
15256// closes the http.Response Body.
15257func (client AppsClient) GetScmAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
15258	err = autorest.Respond(
15259		resp,
15260		azure.WithErrorUnlessStatusCode(http.StatusOK),
15261		autorest.ByUnmarshallingJSON(&result),
15262		autorest.ByClosing())
15263	result.Response = autorest.Response{Response: resp}
15264	return
15265}
15266
15267// GetSiteExtension description for Get site extension information by its ID for a web site, or a deployment slot.
15268// Parameters:
15269// resourceGroupName - name of the resource group to which the resource belongs.
15270// name - site name.
15271// siteExtensionID - site extension name.
15272func (client AppsClient) GetSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result SiteExtensionInfo, err error) {
15273	if tracing.IsEnabled() {
15274		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtension")
15275		defer func() {
15276			sc := -1
15277			if result.Response.Response != nil {
15278				sc = result.Response.Response.StatusCode
15279			}
15280			tracing.EndSpan(ctx, sc, err)
15281		}()
15282	}
15283	if err := validation.Validate([]validation.Validation{
15284		{TargetValue: resourceGroupName,
15285			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15286				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15287				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15288		return result, validation.NewError("web.AppsClient", "GetSiteExtension", err.Error())
15289	}
15290
15291	req, err := client.GetSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
15292	if err != nil {
15293		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request")
15294		return
15295	}
15296
15297	resp, err := client.GetSiteExtensionSender(req)
15298	if err != nil {
15299		result.Response = autorest.Response{Response: resp}
15300		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request")
15301		return
15302	}
15303
15304	result, err = client.GetSiteExtensionResponder(resp)
15305	if err != nil {
15306		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request")
15307		return
15308	}
15309
15310	return
15311}
15312
15313// GetSiteExtensionPreparer prepares the GetSiteExtension request.
15314func (client AppsClient) GetSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
15315	pathParameters := map[string]interface{}{
15316		"name":              autorest.Encode("path", name),
15317		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15318		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
15319		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15320	}
15321
15322	const APIVersion = "2020-09-01"
15323	queryParameters := map[string]interface{}{
15324		"api-version": APIVersion,
15325	}
15326
15327	preparer := autorest.CreatePreparer(
15328		autorest.AsGet(),
15329		autorest.WithBaseURL(client.BaseURI),
15330		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
15331		autorest.WithQueryParameters(queryParameters))
15332	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15333}
15334
15335// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the
15336// http.Response Body if it receives an error.
15337func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) {
15338	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15339}
15340
15341// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always
15342// closes the http.Response Body.
15343func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
15344	err = autorest.Respond(
15345		resp,
15346		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15347		autorest.ByUnmarshallingJSON(&result),
15348		autorest.ByClosing())
15349	result.Response = autorest.Response{Response: resp}
15350	return
15351}
15352
15353// GetSiteExtensionSlot description for Get site extension information by its ID for a web site, or a deployment slot.
15354// Parameters:
15355// resourceGroupName - name of the resource group to which the resource belongs.
15356// name - site name.
15357// siteExtensionID - site extension name.
15358// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
15359func (client AppsClient) GetSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result SiteExtensionInfo, err error) {
15360	if tracing.IsEnabled() {
15361		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSiteExtensionSlot")
15362		defer func() {
15363			sc := -1
15364			if result.Response.Response != nil {
15365				sc = result.Response.Response.StatusCode
15366			}
15367			tracing.EndSpan(ctx, sc, err)
15368		}()
15369	}
15370	if err := validation.Validate([]validation.Validation{
15371		{TargetValue: resourceGroupName,
15372			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15373				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15374				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15375		return result, validation.NewError("web.AppsClient", "GetSiteExtensionSlot", err.Error())
15376	}
15377
15378	req, err := client.GetSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
15379	if err != nil {
15380		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request")
15381		return
15382	}
15383
15384	resp, err := client.GetSiteExtensionSlotSender(req)
15385	if err != nil {
15386		result.Response = autorest.Response{Response: resp}
15387		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request")
15388		return
15389	}
15390
15391	result, err = client.GetSiteExtensionSlotResponder(resp)
15392	if err != nil {
15393		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request")
15394		return
15395	}
15396
15397	return
15398}
15399
15400// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request.
15401func (client AppsClient) GetSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
15402	pathParameters := map[string]interface{}{
15403		"name":              autorest.Encode("path", name),
15404		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15405		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
15406		"slot":              autorest.Encode("path", slot),
15407		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15408	}
15409
15410	const APIVersion = "2020-09-01"
15411	queryParameters := map[string]interface{}{
15412		"api-version": APIVersion,
15413	}
15414
15415	preparer := autorest.CreatePreparer(
15416		autorest.AsGet(),
15417		autorest.WithBaseURL(client.BaseURI),
15418		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
15419		autorest.WithQueryParameters(queryParameters))
15420	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15421}
15422
15423// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the
15424// http.Response Body if it receives an error.
15425func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) {
15426	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15427}
15428
15429// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always
15430// closes the http.Response Body.
15431func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
15432	err = autorest.Respond(
15433		resp,
15434		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15435		autorest.ByUnmarshallingJSON(&result),
15436		autorest.ByClosing())
15437	result.Response = autorest.Response{Response: resp}
15438	return
15439}
15440
15441// GetSitePhpErrorLogFlag description for Gets web app's event logs.
15442// Parameters:
15443// resourceGroupName - name of the resource group to which the resource belongs.
15444// name - name of web app.
15445func (client AppsClient) GetSitePhpErrorLogFlag(ctx context.Context, resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) {
15446	if tracing.IsEnabled() {
15447		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlag")
15448		defer func() {
15449			sc := -1
15450			if result.Response.Response != nil {
15451				sc = result.Response.Response.StatusCode
15452			}
15453			tracing.EndSpan(ctx, sc, err)
15454		}()
15455	}
15456	if err := validation.Validate([]validation.Validation{
15457		{TargetValue: resourceGroupName,
15458			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15459				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15460				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15461		return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlag", err.Error())
15462	}
15463
15464	req, err := client.GetSitePhpErrorLogFlagPreparer(ctx, resourceGroupName, name)
15465	if err != nil {
15466		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", nil, "Failure preparing request")
15467		return
15468	}
15469
15470	resp, err := client.GetSitePhpErrorLogFlagSender(req)
15471	if err != nil {
15472		result.Response = autorest.Response{Response: resp}
15473		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure sending request")
15474		return
15475	}
15476
15477	result, err = client.GetSitePhpErrorLogFlagResponder(resp)
15478	if err != nil {
15479		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlag", resp, "Failure responding to request")
15480		return
15481	}
15482
15483	return
15484}
15485
15486// GetSitePhpErrorLogFlagPreparer prepares the GetSitePhpErrorLogFlag request.
15487func (client AppsClient) GetSitePhpErrorLogFlagPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
15488	pathParameters := map[string]interface{}{
15489		"name":              autorest.Encode("path", name),
15490		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15491		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15492	}
15493
15494	const APIVersion = "2020-09-01"
15495	queryParameters := map[string]interface{}{
15496		"api-version": APIVersion,
15497	}
15498
15499	preparer := autorest.CreatePreparer(
15500		autorest.AsGet(),
15501		autorest.WithBaseURL(client.BaseURI),
15502		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging", pathParameters),
15503		autorest.WithQueryParameters(queryParameters))
15504	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15505}
15506
15507// GetSitePhpErrorLogFlagSender sends the GetSitePhpErrorLogFlag request. The method will close the
15508// http.Response Body if it receives an error.
15509func (client AppsClient) GetSitePhpErrorLogFlagSender(req *http.Request) (*http.Response, error) {
15510	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15511}
15512
15513// GetSitePhpErrorLogFlagResponder handles the response to the GetSitePhpErrorLogFlag request. The method always
15514// closes the http.Response Body.
15515func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) {
15516	err = autorest.Respond(
15517		resp,
15518		azure.WithErrorUnlessStatusCode(http.StatusOK),
15519		autorest.ByUnmarshallingJSON(&result),
15520		autorest.ByClosing())
15521	result.Response = autorest.Response{Response: resp}
15522	return
15523}
15524
15525// GetSitePhpErrorLogFlagSlot description for Gets web app's event logs.
15526// Parameters:
15527// resourceGroupName - name of the resource group to which the resource belongs.
15528// name - name of web app.
15529// slot - name of web app slot. If not specified then will default to production slot.
15530func (client AppsClient) GetSitePhpErrorLogFlagSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) {
15531	if tracing.IsEnabled() {
15532		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSitePhpErrorLogFlagSlot")
15533		defer func() {
15534			sc := -1
15535			if result.Response.Response != nil {
15536				sc = result.Response.Response.StatusCode
15537			}
15538			tracing.EndSpan(ctx, sc, err)
15539		}()
15540	}
15541	if err := validation.Validate([]validation.Validation{
15542		{TargetValue: resourceGroupName,
15543			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15544				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15545				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15546		return result, validation.NewError("web.AppsClient", "GetSitePhpErrorLogFlagSlot", err.Error())
15547	}
15548
15549	req, err := client.GetSitePhpErrorLogFlagSlotPreparer(ctx, resourceGroupName, name, slot)
15550	if err != nil {
15551		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", nil, "Failure preparing request")
15552		return
15553	}
15554
15555	resp, err := client.GetSitePhpErrorLogFlagSlotSender(req)
15556	if err != nil {
15557		result.Response = autorest.Response{Response: resp}
15558		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure sending request")
15559		return
15560	}
15561
15562	result, err = client.GetSitePhpErrorLogFlagSlotResponder(resp)
15563	if err != nil {
15564		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSitePhpErrorLogFlagSlot", resp, "Failure responding to request")
15565		return
15566	}
15567
15568	return
15569}
15570
15571// GetSitePhpErrorLogFlagSlotPreparer prepares the GetSitePhpErrorLogFlagSlot request.
15572func (client AppsClient) GetSitePhpErrorLogFlagSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
15573	pathParameters := map[string]interface{}{
15574		"name":              autorest.Encode("path", name),
15575		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15576		"slot":              autorest.Encode("path", slot),
15577		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15578	}
15579
15580	const APIVersion = "2020-09-01"
15581	queryParameters := map[string]interface{}{
15582		"api-version": APIVersion,
15583	}
15584
15585	preparer := autorest.CreatePreparer(
15586		autorest.AsGet(),
15587		autorest.WithBaseURL(client.BaseURI),
15588		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging", pathParameters),
15589		autorest.WithQueryParameters(queryParameters))
15590	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15591}
15592
15593// GetSitePhpErrorLogFlagSlotSender sends the GetSitePhpErrorLogFlagSlot request. The method will close the
15594// http.Response Body if it receives an error.
15595func (client AppsClient) GetSitePhpErrorLogFlagSlotSender(req *http.Request) (*http.Response, error) {
15596	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15597}
15598
15599// GetSitePhpErrorLogFlagSlotResponder handles the response to the GetSitePhpErrorLogFlagSlot request. The method always
15600// closes the http.Response Body.
15601func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response) (result SitePhpErrorLogFlag, err error) {
15602	err = autorest.Respond(
15603		resp,
15604		azure.WithErrorUnlessStatusCode(http.StatusOK),
15605		autorest.ByUnmarshallingJSON(&result),
15606		autorest.ByClosing())
15607	result.Response = autorest.Response{Response: resp}
15608	return
15609}
15610
15611// GetSlot description for Gets the details of a web, mobile, or API app.
15612// Parameters:
15613// resourceGroupName - name of the resource group to which the resource belongs.
15614// name - name of the app.
15615// slot - name of the deployment slot. By default, this API returns the production slot.
15616func (client AppsClient) GetSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result Site, err error) {
15617	if tracing.IsEnabled() {
15618		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSlot")
15619		defer func() {
15620			sc := -1
15621			if result.Response.Response != nil {
15622				sc = result.Response.Response.StatusCode
15623			}
15624			tracing.EndSpan(ctx, sc, err)
15625		}()
15626	}
15627	if err := validation.Validate([]validation.Validation{
15628		{TargetValue: resourceGroupName,
15629			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15630				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15631				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15632		return result, validation.NewError("web.AppsClient", "GetSlot", err.Error())
15633	}
15634
15635	req, err := client.GetSlotPreparer(ctx, resourceGroupName, name, slot)
15636	if err != nil {
15637		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", nil, "Failure preparing request")
15638		return
15639	}
15640
15641	resp, err := client.GetSlotSender(req)
15642	if err != nil {
15643		result.Response = autorest.Response{Response: resp}
15644		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure sending request")
15645		return
15646	}
15647
15648	result, err = client.GetSlotResponder(resp)
15649	if err != nil {
15650		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSlot", resp, "Failure responding to request")
15651		return
15652	}
15653
15654	return
15655}
15656
15657// GetSlotPreparer prepares the GetSlot request.
15658func (client AppsClient) GetSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
15659	pathParameters := map[string]interface{}{
15660		"name":              autorest.Encode("path", name),
15661		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15662		"slot":              autorest.Encode("path", slot),
15663		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15664	}
15665
15666	const APIVersion = "2020-09-01"
15667	queryParameters := map[string]interface{}{
15668		"api-version": APIVersion,
15669	}
15670
15671	preparer := autorest.CreatePreparer(
15672		autorest.AsGet(),
15673		autorest.WithBaseURL(client.BaseURI),
15674		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
15675		autorest.WithQueryParameters(queryParameters))
15676	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15677}
15678
15679// GetSlotSender sends the GetSlot request. The method will close the
15680// http.Response Body if it receives an error.
15681func (client AppsClient) GetSlotSender(req *http.Request) (*http.Response, error) {
15682	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15683}
15684
15685// GetSlotResponder handles the response to the GetSlot request. The method always
15686// closes the http.Response Body.
15687func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err error) {
15688	err = autorest.Respond(
15689		resp,
15690		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
15691		autorest.ByUnmarshallingJSON(&result),
15692		autorest.ByClosing())
15693	result.Response = autorest.Response{Response: resp}
15694	return
15695}
15696
15697// GetSourceControl description for Gets the source control configuration of an app.
15698// Parameters:
15699// resourceGroupName - name of the resource group to which the resource belongs.
15700// name - name of the app.
15701func (client AppsClient) GetSourceControl(ctx context.Context, resourceGroupName string, name string) (result SiteSourceControl, err error) {
15702	if tracing.IsEnabled() {
15703		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControl")
15704		defer func() {
15705			sc := -1
15706			if result.Response.Response != nil {
15707				sc = result.Response.Response.StatusCode
15708			}
15709			tracing.EndSpan(ctx, sc, err)
15710		}()
15711	}
15712	if err := validation.Validate([]validation.Validation{
15713		{TargetValue: resourceGroupName,
15714			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15715				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15716				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15717		return result, validation.NewError("web.AppsClient", "GetSourceControl", err.Error())
15718	}
15719
15720	req, err := client.GetSourceControlPreparer(ctx, resourceGroupName, name)
15721	if err != nil {
15722		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", nil, "Failure preparing request")
15723		return
15724	}
15725
15726	resp, err := client.GetSourceControlSender(req)
15727	if err != nil {
15728		result.Response = autorest.Response{Response: resp}
15729		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure sending request")
15730		return
15731	}
15732
15733	result, err = client.GetSourceControlResponder(resp)
15734	if err != nil {
15735		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControl", resp, "Failure responding to request")
15736		return
15737	}
15738
15739	return
15740}
15741
15742// GetSourceControlPreparer prepares the GetSourceControl request.
15743func (client AppsClient) GetSourceControlPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
15744	pathParameters := map[string]interface{}{
15745		"name":              autorest.Encode("path", name),
15746		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15747		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15748	}
15749
15750	const APIVersion = "2020-09-01"
15751	queryParameters := map[string]interface{}{
15752		"api-version": APIVersion,
15753	}
15754
15755	preparer := autorest.CreatePreparer(
15756		autorest.AsGet(),
15757		autorest.WithBaseURL(client.BaseURI),
15758		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
15759		autorest.WithQueryParameters(queryParameters))
15760	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15761}
15762
15763// GetSourceControlSender sends the GetSourceControl request. The method will close the
15764// http.Response Body if it receives an error.
15765func (client AppsClient) GetSourceControlSender(req *http.Request) (*http.Response, error) {
15766	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15767}
15768
15769// GetSourceControlResponder handles the response to the GetSourceControl request. The method always
15770// closes the http.Response Body.
15771func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
15772	err = autorest.Respond(
15773		resp,
15774		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
15775		autorest.ByUnmarshallingJSON(&result),
15776		autorest.ByClosing())
15777	result.Response = autorest.Response{Response: resp}
15778	return
15779}
15780
15781// GetSourceControlSlot description for Gets the source control configuration of an app.
15782// Parameters:
15783// resourceGroupName - name of the resource group to which the resource belongs.
15784// name - name of the app.
15785// slot - name of the deployment slot. If a slot is not specified, the API will get the source control
15786// configuration for the production slot.
15787func (client AppsClient) GetSourceControlSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) {
15788	if tracing.IsEnabled() {
15789		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSourceControlSlot")
15790		defer func() {
15791			sc := -1
15792			if result.Response.Response != nil {
15793				sc = result.Response.Response.StatusCode
15794			}
15795			tracing.EndSpan(ctx, sc, err)
15796		}()
15797	}
15798	if err := validation.Validate([]validation.Validation{
15799		{TargetValue: resourceGroupName,
15800			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15801				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15802				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15803		return result, validation.NewError("web.AppsClient", "GetSourceControlSlot", err.Error())
15804	}
15805
15806	req, err := client.GetSourceControlSlotPreparer(ctx, resourceGroupName, name, slot)
15807	if err != nil {
15808		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", nil, "Failure preparing request")
15809		return
15810	}
15811
15812	resp, err := client.GetSourceControlSlotSender(req)
15813	if err != nil {
15814		result.Response = autorest.Response{Response: resp}
15815		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure sending request")
15816		return
15817	}
15818
15819	result, err = client.GetSourceControlSlotResponder(resp)
15820	if err != nil {
15821		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSourceControlSlot", resp, "Failure responding to request")
15822		return
15823	}
15824
15825	return
15826}
15827
15828// GetSourceControlSlotPreparer prepares the GetSourceControlSlot request.
15829func (client AppsClient) GetSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
15830	pathParameters := map[string]interface{}{
15831		"name":              autorest.Encode("path", name),
15832		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15833		"slot":              autorest.Encode("path", slot),
15834		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15835	}
15836
15837	const APIVersion = "2020-09-01"
15838	queryParameters := map[string]interface{}{
15839		"api-version": APIVersion,
15840	}
15841
15842	preparer := autorest.CreatePreparer(
15843		autorest.AsGet(),
15844		autorest.WithBaseURL(client.BaseURI),
15845		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
15846		autorest.WithQueryParameters(queryParameters))
15847	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15848}
15849
15850// GetSourceControlSlotSender sends the GetSourceControlSlot request. The method will close the
15851// http.Response Body if it receives an error.
15852func (client AppsClient) GetSourceControlSlotSender(req *http.Request) (*http.Response, error) {
15853	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15854}
15855
15856// GetSourceControlSlotResponder handles the response to the GetSourceControlSlot request. The method always
15857// closes the http.Response Body.
15858func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
15859	err = autorest.Respond(
15860		resp,
15861		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
15862		autorest.ByUnmarshallingJSON(&result),
15863		autorest.ByClosing())
15864	result.Response = autorest.Response{Response: resp}
15865	return
15866}
15867
15868// GetSwiftVirtualNetworkConnection description for Gets a Swift Virtual Network connection.
15869// Parameters:
15870// resourceGroupName - name of the resource group to which the resource belongs.
15871// name - name of the app.
15872func (client AppsClient) GetSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string) (result SwiftVirtualNetwork, err error) {
15873	if tracing.IsEnabled() {
15874		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnection")
15875		defer func() {
15876			sc := -1
15877			if result.Response.Response != nil {
15878				sc = result.Response.Response.StatusCode
15879			}
15880			tracing.EndSpan(ctx, sc, err)
15881		}()
15882	}
15883	if err := validation.Validate([]validation.Validation{
15884		{TargetValue: resourceGroupName,
15885			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15886				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15887				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15888		return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnection", err.Error())
15889	}
15890
15891	req, err := client.GetSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name)
15892	if err != nil {
15893		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", nil, "Failure preparing request")
15894		return
15895	}
15896
15897	resp, err := client.GetSwiftVirtualNetworkConnectionSender(req)
15898	if err != nil {
15899		result.Response = autorest.Response{Response: resp}
15900		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure sending request")
15901		return
15902	}
15903
15904	result, err = client.GetSwiftVirtualNetworkConnectionResponder(resp)
15905	if err != nil {
15906		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnection", resp, "Failure responding to request")
15907		return
15908	}
15909
15910	return
15911}
15912
15913// GetSwiftVirtualNetworkConnectionPreparer prepares the GetSwiftVirtualNetworkConnection request.
15914func (client AppsClient) GetSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
15915	pathParameters := map[string]interface{}{
15916		"name":              autorest.Encode("path", name),
15917		"resourceGroupName": autorest.Encode("path", resourceGroupName),
15918		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
15919	}
15920
15921	const APIVersion = "2020-09-01"
15922	queryParameters := map[string]interface{}{
15923		"api-version": APIVersion,
15924	}
15925
15926	preparer := autorest.CreatePreparer(
15927		autorest.AsGet(),
15928		autorest.WithBaseURL(client.BaseURI),
15929		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
15930		autorest.WithQueryParameters(queryParameters))
15931	return preparer.Prepare((&http.Request{}).WithContext(ctx))
15932}
15933
15934// GetSwiftVirtualNetworkConnectionSender sends the GetSwiftVirtualNetworkConnection request. The method will close the
15935// http.Response Body if it receives an error.
15936func (client AppsClient) GetSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
15937	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
15938}
15939
15940// GetSwiftVirtualNetworkConnectionResponder handles the response to the GetSwiftVirtualNetworkConnection request. The method always
15941// closes the http.Response Body.
15942func (client AppsClient) GetSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
15943	err = autorest.Respond(
15944		resp,
15945		azure.WithErrorUnlessStatusCode(http.StatusOK),
15946		autorest.ByUnmarshallingJSON(&result),
15947		autorest.ByClosing())
15948	result.Response = autorest.Response{Response: resp}
15949	return
15950}
15951
15952// GetSwiftVirtualNetworkConnectionSlot description for Gets a Swift Virtual Network connection.
15953// Parameters:
15954// resourceGroupName - name of the resource group to which the resource belongs.
15955// name - name of the app.
15956// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the
15957// production slot's Virtual Network.
15958func (client AppsClient) GetSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SwiftVirtualNetwork, err error) {
15959	if tracing.IsEnabled() {
15960		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetSwiftVirtualNetworkConnectionSlot")
15961		defer func() {
15962			sc := -1
15963			if result.Response.Response != nil {
15964				sc = result.Response.Response.StatusCode
15965			}
15966			tracing.EndSpan(ctx, sc, err)
15967		}()
15968	}
15969	if err := validation.Validate([]validation.Validation{
15970		{TargetValue: resourceGroupName,
15971			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
15972				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
15973				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
15974		return result, validation.NewError("web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", err.Error())
15975	}
15976
15977	req, err := client.GetSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, slot)
15978	if err != nil {
15979		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
15980		return
15981	}
15982
15983	resp, err := client.GetSwiftVirtualNetworkConnectionSlotSender(req)
15984	if err != nil {
15985		result.Response = autorest.Response{Response: resp}
15986		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
15987		return
15988	}
15989
15990	result, err = client.GetSwiftVirtualNetworkConnectionSlotResponder(resp)
15991	if err != nil {
15992		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
15993		return
15994	}
15995
15996	return
15997}
15998
15999// GetSwiftVirtualNetworkConnectionSlotPreparer prepares the GetSwiftVirtualNetworkConnectionSlot request.
16000func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
16001	pathParameters := map[string]interface{}{
16002		"name":              autorest.Encode("path", name),
16003		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16004		"slot":              autorest.Encode("path", slot),
16005		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16006	}
16007
16008	const APIVersion = "2020-09-01"
16009	queryParameters := map[string]interface{}{
16010		"api-version": APIVersion,
16011	}
16012
16013	preparer := autorest.CreatePreparer(
16014		autorest.AsGet(),
16015		autorest.WithBaseURL(client.BaseURI),
16016		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
16017		autorest.WithQueryParameters(queryParameters))
16018	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16019}
16020
16021// GetSwiftVirtualNetworkConnectionSlotSender sends the GetSwiftVirtualNetworkConnectionSlot request. The method will close the
16022// http.Response Body if it receives an error.
16023func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
16024	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16025}
16026
16027// GetSwiftVirtualNetworkConnectionSlotResponder handles the response to the GetSwiftVirtualNetworkConnectionSlot request. The method always
16028// closes the http.Response Body.
16029func (client AppsClient) GetSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
16030	err = autorest.Respond(
16031		resp,
16032		azure.WithErrorUnlessStatusCode(http.StatusOK),
16033		autorest.ByUnmarshallingJSON(&result),
16034		autorest.ByClosing())
16035	result.Response = autorest.Response{Response: resp}
16036	return
16037}
16038
16039// GetTriggeredWebJob description for Gets a triggered web job by its ID for an app, or a deployment slot.
16040// Parameters:
16041// resourceGroupName - name of the resource group to which the resource belongs.
16042// name - site name.
16043// webJobName - name of Web Job.
16044func (client AppsClient) GetTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredWebJob, err error) {
16045	if tracing.IsEnabled() {
16046		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJob")
16047		defer func() {
16048			sc := -1
16049			if result.Response.Response != nil {
16050				sc = result.Response.Response.StatusCode
16051			}
16052			tracing.EndSpan(ctx, sc, err)
16053		}()
16054	}
16055	if err := validation.Validate([]validation.Validation{
16056		{TargetValue: resourceGroupName,
16057			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16058				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16059				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16060		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJob", err.Error())
16061	}
16062
16063	req, err := client.GetTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
16064	if err != nil {
16065		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request")
16066		return
16067	}
16068
16069	resp, err := client.GetTriggeredWebJobSender(req)
16070	if err != nil {
16071		result.Response = autorest.Response{Response: resp}
16072		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request")
16073		return
16074	}
16075
16076	result, err = client.GetTriggeredWebJobResponder(resp)
16077	if err != nil {
16078		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request")
16079		return
16080	}
16081
16082	return
16083}
16084
16085// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request.
16086func (client AppsClient) GetTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
16087	pathParameters := map[string]interface{}{
16088		"name":              autorest.Encode("path", name),
16089		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16090		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16091		"webJobName":        autorest.Encode("path", webJobName),
16092	}
16093
16094	const APIVersion = "2020-09-01"
16095	queryParameters := map[string]interface{}{
16096		"api-version": APIVersion,
16097	}
16098
16099	preparer := autorest.CreatePreparer(
16100		autorest.AsGet(),
16101		autorest.WithBaseURL(client.BaseURI),
16102		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters),
16103		autorest.WithQueryParameters(queryParameters))
16104	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16105}
16106
16107// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the
16108// http.Response Body if it receives an error.
16109func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
16110	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16111}
16112
16113// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always
16114// closes the http.Response Body.
16115func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) {
16116	err = autorest.Respond(
16117		resp,
16118		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
16119		autorest.ByUnmarshallingJSON(&result),
16120		autorest.ByClosing())
16121	result.Response = autorest.Response{Response: resp}
16122	return
16123}
16124
16125// GetTriggeredWebJobHistory description for Gets a triggered web job's history by its ID for an app, , or a deployment
16126// slot.
16127// Parameters:
16128// resourceGroupName - name of the resource group to which the resource belongs.
16129// name - site name.
16130// webJobName - name of Web Job.
16131// ID - history ID.
16132func (client AppsClient) GetTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (result TriggeredJobHistory, err error) {
16133	if tracing.IsEnabled() {
16134		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistory")
16135		defer func() {
16136			sc := -1
16137			if result.Response.Response != nil {
16138				sc = result.Response.Response.StatusCode
16139			}
16140			tracing.EndSpan(ctx, sc, err)
16141		}()
16142	}
16143	if err := validation.Validate([]validation.Validation{
16144		{TargetValue: resourceGroupName,
16145			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16146				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16147				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16148		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistory", err.Error())
16149	}
16150
16151	req, err := client.GetTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName, ID)
16152	if err != nil {
16153		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request")
16154		return
16155	}
16156
16157	resp, err := client.GetTriggeredWebJobHistorySender(req)
16158	if err != nil {
16159		result.Response = autorest.Response{Response: resp}
16160		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request")
16161		return
16162	}
16163
16164	result, err = client.GetTriggeredWebJobHistoryResponder(resp)
16165	if err != nil {
16166		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request")
16167		return
16168	}
16169
16170	return
16171}
16172
16173// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request.
16174func (client AppsClient) GetTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string) (*http.Request, error) {
16175	pathParameters := map[string]interface{}{
16176		"id":                autorest.Encode("path", ID),
16177		"name":              autorest.Encode("path", name),
16178		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16179		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16180		"webJobName":        autorest.Encode("path", webJobName),
16181	}
16182
16183	const APIVersion = "2020-09-01"
16184	queryParameters := map[string]interface{}{
16185		"api-version": APIVersion,
16186	}
16187
16188	preparer := autorest.CreatePreparer(
16189		autorest.AsGet(),
16190		autorest.WithBaseURL(client.BaseURI),
16191		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters),
16192		autorest.WithQueryParameters(queryParameters))
16193	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16194}
16195
16196// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the
16197// http.Response Body if it receives an error.
16198func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) {
16199	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16200}
16201
16202// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always
16203// closes the http.Response Body.
16204func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) {
16205	err = autorest.Respond(
16206		resp,
16207		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
16208		autorest.ByUnmarshallingJSON(&result),
16209		autorest.ByClosing())
16210	result.Response = autorest.Response{Response: resp}
16211	return
16212}
16213
16214// GetTriggeredWebJobHistorySlot description for Gets a triggered web job's history by its ID for an app, , or a
16215// deployment slot.
16216// Parameters:
16217// resourceGroupName - name of the resource group to which the resource belongs.
16218// name - site name.
16219// webJobName - name of Web Job.
16220// ID - history ID.
16221// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
16222func (client AppsClient) GetTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (result TriggeredJobHistory, err error) {
16223	if tracing.IsEnabled() {
16224		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobHistorySlot")
16225		defer func() {
16226			sc := -1
16227			if result.Response.Response != nil {
16228				sc = result.Response.Response.StatusCode
16229			}
16230			tracing.EndSpan(ctx, sc, err)
16231		}()
16232	}
16233	if err := validation.Validate([]validation.Validation{
16234		{TargetValue: resourceGroupName,
16235			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16236				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16237				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16238		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobHistorySlot", err.Error())
16239	}
16240
16241	req, err := client.GetTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, ID, slot)
16242	if err != nil {
16243		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request")
16244		return
16245	}
16246
16247	resp, err := client.GetTriggeredWebJobHistorySlotSender(req)
16248	if err != nil {
16249		result.Response = autorest.Response{Response: resp}
16250		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request")
16251		return
16252	}
16253
16254	result, err = client.GetTriggeredWebJobHistorySlotResponder(resp)
16255	if err != nil {
16256		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request")
16257		return
16258	}
16259
16260	return
16261}
16262
16263// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request.
16264func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, ID string, slot string) (*http.Request, error) {
16265	pathParameters := map[string]interface{}{
16266		"id":                autorest.Encode("path", ID),
16267		"name":              autorest.Encode("path", name),
16268		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16269		"slot":              autorest.Encode("path", slot),
16270		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16271		"webJobName":        autorest.Encode("path", webJobName),
16272	}
16273
16274	const APIVersion = "2020-09-01"
16275	queryParameters := map[string]interface{}{
16276		"api-version": APIVersion,
16277	}
16278
16279	preparer := autorest.CreatePreparer(
16280		autorest.AsGet(),
16281		autorest.WithBaseURL(client.BaseURI),
16282		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters),
16283		autorest.WithQueryParameters(queryParameters))
16284	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16285}
16286
16287// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the
16288// http.Response Body if it receives an error.
16289func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) {
16290	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16291}
16292
16293// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always
16294// closes the http.Response Body.
16295func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) {
16296	err = autorest.Respond(
16297		resp,
16298		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
16299		autorest.ByUnmarshallingJSON(&result),
16300		autorest.ByClosing())
16301	result.Response = autorest.Response{Response: resp}
16302	return
16303}
16304
16305// GetTriggeredWebJobSlot description for Gets a triggered web job by its ID for an app, or a deployment slot.
16306// Parameters:
16307// resourceGroupName - name of the resource group to which the resource belongs.
16308// name - site name.
16309// webJobName - name of Web Job.
16310// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
16311func (client AppsClient) GetTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredWebJob, err error) {
16312	if tracing.IsEnabled() {
16313		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetTriggeredWebJobSlot")
16314		defer func() {
16315			sc := -1
16316			if result.Response.Response != nil {
16317				sc = result.Response.Response.StatusCode
16318			}
16319			tracing.EndSpan(ctx, sc, err)
16320		}()
16321	}
16322	if err := validation.Validate([]validation.Validation{
16323		{TargetValue: resourceGroupName,
16324			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16325				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16326				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16327		return result, validation.NewError("web.AppsClient", "GetTriggeredWebJobSlot", err.Error())
16328	}
16329
16330	req, err := client.GetTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
16331	if err != nil {
16332		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request")
16333		return
16334	}
16335
16336	resp, err := client.GetTriggeredWebJobSlotSender(req)
16337	if err != nil {
16338		result.Response = autorest.Response{Response: resp}
16339		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request")
16340		return
16341	}
16342
16343	result, err = client.GetTriggeredWebJobSlotResponder(resp)
16344	if err != nil {
16345		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request")
16346		return
16347	}
16348
16349	return
16350}
16351
16352// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request.
16353func (client AppsClient) GetTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
16354	pathParameters := map[string]interface{}{
16355		"name":              autorest.Encode("path", name),
16356		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16357		"slot":              autorest.Encode("path", slot),
16358		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16359		"webJobName":        autorest.Encode("path", webJobName),
16360	}
16361
16362	const APIVersion = "2020-09-01"
16363	queryParameters := map[string]interface{}{
16364		"api-version": APIVersion,
16365	}
16366
16367	preparer := autorest.CreatePreparer(
16368		autorest.AsGet(),
16369		autorest.WithBaseURL(client.BaseURI),
16370		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters),
16371		autorest.WithQueryParameters(queryParameters))
16372	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16373}
16374
16375// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the
16376// http.Response Body if it receives an error.
16377func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
16378	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16379}
16380
16381// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always
16382// closes the http.Response Body.
16383func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) {
16384	err = autorest.Respond(
16385		resp,
16386		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
16387		autorest.ByUnmarshallingJSON(&result),
16388		autorest.ByClosing())
16389	result.Response = autorest.Response{Response: resp}
16390	return
16391}
16392
16393// GetVnetConnection description for Gets a virtual network the app (or deployment slot) is connected to by name.
16394// Parameters:
16395// resourceGroupName - name of the resource group to which the resource belongs.
16396// name - name of the app.
16397// vnetName - name of the virtual network.
16398func (client AppsClient) GetVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) {
16399	if tracing.IsEnabled() {
16400		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnection")
16401		defer func() {
16402			sc := -1
16403			if result.Response.Response != nil {
16404				sc = result.Response.Response.StatusCode
16405			}
16406			tracing.EndSpan(ctx, sc, err)
16407		}()
16408	}
16409	if err := validation.Validate([]validation.Validation{
16410		{TargetValue: resourceGroupName,
16411			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16412				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16413				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16414		return result, validation.NewError("web.AppsClient", "GetVnetConnection", err.Error())
16415	}
16416
16417	req, err := client.GetVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName)
16418	if err != nil {
16419		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", nil, "Failure preparing request")
16420		return
16421	}
16422
16423	resp, err := client.GetVnetConnectionSender(req)
16424	if err != nil {
16425		result.Response = autorest.Response{Response: resp}
16426		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure sending request")
16427		return
16428	}
16429
16430	result, err = client.GetVnetConnectionResponder(resp)
16431	if err != nil {
16432		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnection", resp, "Failure responding to request")
16433		return
16434	}
16435
16436	return
16437}
16438
16439// GetVnetConnectionPreparer prepares the GetVnetConnection request.
16440func (client AppsClient) GetVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string) (*http.Request, error) {
16441	pathParameters := map[string]interface{}{
16442		"name":              autorest.Encode("path", name),
16443		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16444		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16445		"vnetName":          autorest.Encode("path", vnetName),
16446	}
16447
16448	const APIVersion = "2020-09-01"
16449	queryParameters := map[string]interface{}{
16450		"api-version": APIVersion,
16451	}
16452
16453	preparer := autorest.CreatePreparer(
16454		autorest.AsGet(),
16455		autorest.WithBaseURL(client.BaseURI),
16456		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
16457		autorest.WithQueryParameters(queryParameters))
16458	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16459}
16460
16461// GetVnetConnectionSender sends the GetVnetConnection request. The method will close the
16462// http.Response Body if it receives an error.
16463func (client AppsClient) GetVnetConnectionSender(req *http.Request) (*http.Response, error) {
16464	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16465}
16466
16467// GetVnetConnectionResponder handles the response to the GetVnetConnection request. The method always
16468// closes the http.Response Body.
16469func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
16470	err = autorest.Respond(
16471		resp,
16472		azure.WithErrorUnlessStatusCode(http.StatusOK),
16473		autorest.ByUnmarshallingJSON(&result),
16474		autorest.ByClosing())
16475	result.Response = autorest.Response{Response: resp}
16476	return
16477}
16478
16479// GetVnetConnectionGateway description for Gets an app's Virtual Network gateway.
16480// Parameters:
16481// resourceGroupName - name of the resource group to which the resource belongs.
16482// name - name of the app.
16483// vnetName - name of the Virtual Network.
16484// gatewayName - name of the gateway. Currently, the only supported string is "primary".
16485func (client AppsClient) GetVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) {
16486	if tracing.IsEnabled() {
16487		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGateway")
16488		defer func() {
16489			sc := -1
16490			if result.Response.Response != nil {
16491				sc = result.Response.Response.StatusCode
16492			}
16493			tracing.EndSpan(ctx, sc, err)
16494		}()
16495	}
16496	if err := validation.Validate([]validation.Validation{
16497		{TargetValue: resourceGroupName,
16498			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16499				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16500				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16501		return result, validation.NewError("web.AppsClient", "GetVnetConnectionGateway", err.Error())
16502	}
16503
16504	req, err := client.GetVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName)
16505	if err != nil {
16506		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", nil, "Failure preparing request")
16507		return
16508	}
16509
16510	resp, err := client.GetVnetConnectionGatewaySender(req)
16511	if err != nil {
16512		result.Response = autorest.Response{Response: resp}
16513		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure sending request")
16514		return
16515	}
16516
16517	result, err = client.GetVnetConnectionGatewayResponder(resp)
16518	if err != nil {
16519		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGateway", resp, "Failure responding to request")
16520		return
16521	}
16522
16523	return
16524}
16525
16526// GetVnetConnectionGatewayPreparer prepares the GetVnetConnectionGateway request.
16527func (client AppsClient) GetVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string) (*http.Request, error) {
16528	pathParameters := map[string]interface{}{
16529		"gatewayName":       autorest.Encode("path", gatewayName),
16530		"name":              autorest.Encode("path", name),
16531		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16532		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16533		"vnetName":          autorest.Encode("path", vnetName),
16534	}
16535
16536	const APIVersion = "2020-09-01"
16537	queryParameters := map[string]interface{}{
16538		"api-version": APIVersion,
16539	}
16540
16541	preparer := autorest.CreatePreparer(
16542		autorest.AsGet(),
16543		autorest.WithBaseURL(client.BaseURI),
16544		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
16545		autorest.WithQueryParameters(queryParameters))
16546	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16547}
16548
16549// GetVnetConnectionGatewaySender sends the GetVnetConnectionGateway request. The method will close the
16550// http.Response Body if it receives an error.
16551func (client AppsClient) GetVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
16552	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16553}
16554
16555// GetVnetConnectionGatewayResponder handles the response to the GetVnetConnectionGateway request. The method always
16556// closes the http.Response Body.
16557func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
16558	err = autorest.Respond(
16559		resp,
16560		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
16561		autorest.ByUnmarshallingJSON(&result),
16562		autorest.ByClosing())
16563	result.Response = autorest.Response{Response: resp}
16564	return
16565}
16566
16567// GetVnetConnectionGatewaySlot description for Gets an app's Virtual Network gateway.
16568// Parameters:
16569// resourceGroupName - name of the resource group to which the resource belongs.
16570// name - name of the app.
16571// vnetName - name of the Virtual Network.
16572// gatewayName - name of the gateway. Currently, the only supported string is "primary".
16573// slot - name of the deployment slot. If a slot is not specified, the API will get a gateway for the
16574// production slot's Virtual Network.
16575func (client AppsClient) GetVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) {
16576	if tracing.IsEnabled() {
16577		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionGatewaySlot")
16578		defer func() {
16579			sc := -1
16580			if result.Response.Response != nil {
16581				sc = result.Response.Response.StatusCode
16582			}
16583			tracing.EndSpan(ctx, sc, err)
16584		}()
16585	}
16586	if err := validation.Validate([]validation.Validation{
16587		{TargetValue: resourceGroupName,
16588			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16589				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16590				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16591		return result, validation.NewError("web.AppsClient", "GetVnetConnectionGatewaySlot", err.Error())
16592	}
16593
16594	req, err := client.GetVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, slot)
16595	if err != nil {
16596		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", nil, "Failure preparing request")
16597		return
16598	}
16599
16600	resp, err := client.GetVnetConnectionGatewaySlotSender(req)
16601	if err != nil {
16602		result.Response = autorest.Response{Response: resp}
16603		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure sending request")
16604		return
16605	}
16606
16607	result, err = client.GetVnetConnectionGatewaySlotResponder(resp)
16608	if err != nil {
16609		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionGatewaySlot", resp, "Failure responding to request")
16610		return
16611	}
16612
16613	return
16614}
16615
16616// GetVnetConnectionGatewaySlotPreparer prepares the GetVnetConnectionGatewaySlot request.
16617func (client AppsClient) GetVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (*http.Request, error) {
16618	pathParameters := map[string]interface{}{
16619		"gatewayName":       autorest.Encode("path", gatewayName),
16620		"name":              autorest.Encode("path", name),
16621		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16622		"slot":              autorest.Encode("path", slot),
16623		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16624		"vnetName":          autorest.Encode("path", vnetName),
16625	}
16626
16627	const APIVersion = "2020-09-01"
16628	queryParameters := map[string]interface{}{
16629		"api-version": APIVersion,
16630	}
16631
16632	preparer := autorest.CreatePreparer(
16633		autorest.AsGet(),
16634		autorest.WithBaseURL(client.BaseURI),
16635		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
16636		autorest.WithQueryParameters(queryParameters))
16637	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16638}
16639
16640// GetVnetConnectionGatewaySlotSender sends the GetVnetConnectionGatewaySlot request. The method will close the
16641// http.Response Body if it receives an error.
16642func (client AppsClient) GetVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
16643	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16644}
16645
16646// GetVnetConnectionGatewaySlotResponder handles the response to the GetVnetConnectionGatewaySlot request. The method always
16647// closes the http.Response Body.
16648func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
16649	err = autorest.Respond(
16650		resp,
16651		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
16652		autorest.ByUnmarshallingJSON(&result),
16653		autorest.ByClosing())
16654	result.Response = autorest.Response{Response: resp}
16655	return
16656}
16657
16658// GetVnetConnectionSlot description for Gets a virtual network the app (or deployment slot) is connected to by name.
16659// Parameters:
16660// resourceGroupName - name of the resource group to which the resource belongs.
16661// name - name of the app.
16662// vnetName - name of the virtual network.
16663// slot - name of the deployment slot. If a slot is not specified, the API will get the named virtual network
16664// for the production slot.
16665func (client AppsClient) GetVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) {
16666	if tracing.IsEnabled() {
16667		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetVnetConnectionSlot")
16668		defer func() {
16669			sc := -1
16670			if result.Response.Response != nil {
16671				sc = result.Response.Response.StatusCode
16672			}
16673			tracing.EndSpan(ctx, sc, err)
16674		}()
16675	}
16676	if err := validation.Validate([]validation.Validation{
16677		{TargetValue: resourceGroupName,
16678			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16679				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16680				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16681		return result, validation.NewError("web.AppsClient", "GetVnetConnectionSlot", err.Error())
16682	}
16683
16684	req, err := client.GetVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, slot)
16685	if err != nil {
16686		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", nil, "Failure preparing request")
16687		return
16688	}
16689
16690	resp, err := client.GetVnetConnectionSlotSender(req)
16691	if err != nil {
16692		result.Response = autorest.Response{Response: resp}
16693		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure sending request")
16694		return
16695	}
16696
16697	result, err = client.GetVnetConnectionSlotResponder(resp)
16698	if err != nil {
16699		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetVnetConnectionSlot", resp, "Failure responding to request")
16700		return
16701	}
16702
16703	return
16704}
16705
16706// GetVnetConnectionSlotPreparer prepares the GetVnetConnectionSlot request.
16707func (client AppsClient) GetVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, slot string) (*http.Request, error) {
16708	pathParameters := map[string]interface{}{
16709		"name":              autorest.Encode("path", name),
16710		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16711		"slot":              autorest.Encode("path", slot),
16712		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16713		"vnetName":          autorest.Encode("path", vnetName),
16714	}
16715
16716	const APIVersion = "2020-09-01"
16717	queryParameters := map[string]interface{}{
16718		"api-version": APIVersion,
16719	}
16720
16721	preparer := autorest.CreatePreparer(
16722		autorest.AsGet(),
16723		autorest.WithBaseURL(client.BaseURI),
16724		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
16725		autorest.WithQueryParameters(queryParameters))
16726	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16727}
16728
16729// GetVnetConnectionSlotSender sends the GetVnetConnectionSlot request. The method will close the
16730// http.Response Body if it receives an error.
16731func (client AppsClient) GetVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
16732	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16733}
16734
16735// GetVnetConnectionSlotResponder handles the response to the GetVnetConnectionSlot request. The method always
16736// closes the http.Response Body.
16737func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
16738	err = autorest.Respond(
16739		resp,
16740		azure.WithErrorUnlessStatusCode(http.StatusOK),
16741		autorest.ByUnmarshallingJSON(&result),
16742		autorest.ByClosing())
16743	result.Response = autorest.Response{Response: resp}
16744	return
16745}
16746
16747// GetWebJob description for Get webjob information for an app, or a deployment slot.
16748// Parameters:
16749// resourceGroupName - name of the resource group to which the resource belongs.
16750// name - site name.
16751// webJobName - name of the web job.
16752func (client AppsClient) GetWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result Job, err error) {
16753	if tracing.IsEnabled() {
16754		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJob")
16755		defer func() {
16756			sc := -1
16757			if result.Response.Response != nil {
16758				sc = result.Response.Response.StatusCode
16759			}
16760			tracing.EndSpan(ctx, sc, err)
16761		}()
16762	}
16763	if err := validation.Validate([]validation.Validation{
16764		{TargetValue: resourceGroupName,
16765			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16766				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16767				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16768		return result, validation.NewError("web.AppsClient", "GetWebJob", err.Error())
16769	}
16770
16771	req, err := client.GetWebJobPreparer(ctx, resourceGroupName, name, webJobName)
16772	if err != nil {
16773		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request")
16774		return
16775	}
16776
16777	resp, err := client.GetWebJobSender(req)
16778	if err != nil {
16779		result.Response = autorest.Response{Response: resp}
16780		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request")
16781		return
16782	}
16783
16784	result, err = client.GetWebJobResponder(resp)
16785	if err != nil {
16786		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request")
16787		return
16788	}
16789
16790	return
16791}
16792
16793// GetWebJobPreparer prepares the GetWebJob request.
16794func (client AppsClient) GetWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
16795	pathParameters := map[string]interface{}{
16796		"name":              autorest.Encode("path", name),
16797		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16798		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16799		"webJobName":        autorest.Encode("path", webJobName),
16800	}
16801
16802	const APIVersion = "2020-09-01"
16803	queryParameters := map[string]interface{}{
16804		"api-version": APIVersion,
16805	}
16806
16807	preparer := autorest.CreatePreparer(
16808		autorest.AsGet(),
16809		autorest.WithBaseURL(client.BaseURI),
16810		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters),
16811		autorest.WithQueryParameters(queryParameters))
16812	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16813}
16814
16815// GetWebJobSender sends the GetWebJob request. The method will close the
16816// http.Response Body if it receives an error.
16817func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) {
16818	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16819}
16820
16821// GetWebJobResponder handles the response to the GetWebJob request. The method always
16822// closes the http.Response Body.
16823func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) {
16824	err = autorest.Respond(
16825		resp,
16826		azure.WithErrorUnlessStatusCode(http.StatusOK),
16827		autorest.ByUnmarshallingJSON(&result),
16828		autorest.ByClosing())
16829	result.Response = autorest.Response{Response: resp}
16830	return
16831}
16832
16833// GetWebJobSlot description for Get webjob information for an app, or a deployment slot.
16834// Parameters:
16835// resourceGroupName - name of the resource group to which the resource belongs.
16836// name - site name.
16837// webJobName - name of the web job.
16838// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
16839// production slot.
16840func (client AppsClient) GetWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) {
16841	if tracing.IsEnabled() {
16842		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebJobSlot")
16843		defer func() {
16844			sc := -1
16845			if result.Response.Response != nil {
16846				sc = result.Response.Response.StatusCode
16847			}
16848			tracing.EndSpan(ctx, sc, err)
16849		}()
16850	}
16851	if err := validation.Validate([]validation.Validation{
16852		{TargetValue: resourceGroupName,
16853			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16854				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16855				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16856		return result, validation.NewError("web.AppsClient", "GetWebJobSlot", err.Error())
16857	}
16858
16859	req, err := client.GetWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
16860	if err != nil {
16861		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request")
16862		return
16863	}
16864
16865	resp, err := client.GetWebJobSlotSender(req)
16866	if err != nil {
16867		result.Response = autorest.Response{Response: resp}
16868		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request")
16869		return
16870	}
16871
16872	result, err = client.GetWebJobSlotResponder(resp)
16873	if err != nil {
16874		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request")
16875		return
16876	}
16877
16878	return
16879}
16880
16881// GetWebJobSlotPreparer prepares the GetWebJobSlot request.
16882func (client AppsClient) GetWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
16883	pathParameters := map[string]interface{}{
16884		"name":              autorest.Encode("path", name),
16885		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16886		"slot":              autorest.Encode("path", slot),
16887		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16888		"webJobName":        autorest.Encode("path", webJobName),
16889	}
16890
16891	const APIVersion = "2020-09-01"
16892	queryParameters := map[string]interface{}{
16893		"api-version": APIVersion,
16894	}
16895
16896	preparer := autorest.CreatePreparer(
16897		autorest.AsGet(),
16898		autorest.WithBaseURL(client.BaseURI),
16899		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters),
16900		autorest.WithQueryParameters(queryParameters))
16901	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16902}
16903
16904// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the
16905// http.Response Body if it receives an error.
16906func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) {
16907	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16908}
16909
16910// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always
16911// closes the http.Response Body.
16912func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) {
16913	err = autorest.Respond(
16914		resp,
16915		azure.WithErrorUnlessStatusCode(http.StatusOK),
16916		autorest.ByUnmarshallingJSON(&result),
16917		autorest.ByClosing())
16918	result.Response = autorest.Response{Response: resp}
16919	return
16920}
16921
16922// GetWebSiteContainerLogs description for Gets the last lines of docker logs for the given site
16923// Parameters:
16924// resourceGroupName - name of the resource group to which the resource belongs.
16925// name - name of web app.
16926func (client AppsClient) GetWebSiteContainerLogs(ctx context.Context, resourceGroupName string, name string) (result ReadCloser, err error) {
16927	if tracing.IsEnabled() {
16928		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogs")
16929		defer func() {
16930			sc := -1
16931			if result.Response.Response != nil {
16932				sc = result.Response.Response.StatusCode
16933			}
16934			tracing.EndSpan(ctx, sc, err)
16935		}()
16936	}
16937	if err := validation.Validate([]validation.Validation{
16938		{TargetValue: resourceGroupName,
16939			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
16940				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
16941				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
16942		return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogs", err.Error())
16943	}
16944
16945	req, err := client.GetWebSiteContainerLogsPreparer(ctx, resourceGroupName, name)
16946	if err != nil {
16947		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", nil, "Failure preparing request")
16948		return
16949	}
16950
16951	resp, err := client.GetWebSiteContainerLogsSender(req)
16952	if err != nil {
16953		result.Response = autorest.Response{Response: resp}
16954		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure sending request")
16955		return
16956	}
16957
16958	result, err = client.GetWebSiteContainerLogsResponder(resp)
16959	if err != nil {
16960		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogs", resp, "Failure responding to request")
16961		return
16962	}
16963
16964	return
16965}
16966
16967// GetWebSiteContainerLogsPreparer prepares the GetWebSiteContainerLogs request.
16968func (client AppsClient) GetWebSiteContainerLogsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
16969	pathParameters := map[string]interface{}{
16970		"name":              autorest.Encode("path", name),
16971		"resourceGroupName": autorest.Encode("path", resourceGroupName),
16972		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
16973	}
16974
16975	const APIVersion = "2020-09-01"
16976	queryParameters := map[string]interface{}{
16977		"api-version": APIVersion,
16978	}
16979
16980	preparer := autorest.CreatePreparer(
16981		autorest.AsPost(),
16982		autorest.WithBaseURL(client.BaseURI),
16983		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs", pathParameters),
16984		autorest.WithQueryParameters(queryParameters))
16985	return preparer.Prepare((&http.Request{}).WithContext(ctx))
16986}
16987
16988// GetWebSiteContainerLogsSender sends the GetWebSiteContainerLogs request. The method will close the
16989// http.Response Body if it receives an error.
16990func (client AppsClient) GetWebSiteContainerLogsSender(req *http.Request) (*http.Response, error) {
16991	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
16992}
16993
16994// GetWebSiteContainerLogsResponder handles the response to the GetWebSiteContainerLogs request. The method always
16995// closes the http.Response Body.
16996func (client AppsClient) GetWebSiteContainerLogsResponder(resp *http.Response) (result ReadCloser, err error) {
16997	result.Value = &resp.Body
16998	err = autorest.Respond(
16999		resp,
17000		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
17001	result.Response = autorest.Response{Response: resp}
17002	return
17003}
17004
17005// GetWebSiteContainerLogsSlot description for Gets the last lines of docker logs for the given site
17006// Parameters:
17007// resourceGroupName - name of the resource group to which the resource belongs.
17008// name - name of web app.
17009// slot - name of web app slot. If not specified then will default to production slot.
17010func (client AppsClient) GetWebSiteContainerLogsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ReadCloser, err error) {
17011	if tracing.IsEnabled() {
17012		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.GetWebSiteContainerLogsSlot")
17013		defer func() {
17014			sc := -1
17015			if result.Response.Response != nil {
17016				sc = result.Response.Response.StatusCode
17017			}
17018			tracing.EndSpan(ctx, sc, err)
17019		}()
17020	}
17021	if err := validation.Validate([]validation.Validation{
17022		{TargetValue: resourceGroupName,
17023			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17024				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17025				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17026		return result, validation.NewError("web.AppsClient", "GetWebSiteContainerLogsSlot", err.Error())
17027	}
17028
17029	req, err := client.GetWebSiteContainerLogsSlotPreparer(ctx, resourceGroupName, name, slot)
17030	if err != nil {
17031		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", nil, "Failure preparing request")
17032		return
17033	}
17034
17035	resp, err := client.GetWebSiteContainerLogsSlotSender(req)
17036	if err != nil {
17037		result.Response = autorest.Response{Response: resp}
17038		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure sending request")
17039		return
17040	}
17041
17042	result, err = client.GetWebSiteContainerLogsSlotResponder(resp)
17043	if err != nil {
17044		err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebSiteContainerLogsSlot", resp, "Failure responding to request")
17045		return
17046	}
17047
17048	return
17049}
17050
17051// GetWebSiteContainerLogsSlotPreparer prepares the GetWebSiteContainerLogsSlot request.
17052func (client AppsClient) GetWebSiteContainerLogsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17053	pathParameters := map[string]interface{}{
17054		"name":              autorest.Encode("path", name),
17055		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17056		"slot":              autorest.Encode("path", slot),
17057		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17058	}
17059
17060	const APIVersion = "2020-09-01"
17061	queryParameters := map[string]interface{}{
17062		"api-version": APIVersion,
17063	}
17064
17065	preparer := autorest.CreatePreparer(
17066		autorest.AsPost(),
17067		autorest.WithBaseURL(client.BaseURI),
17068		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs", pathParameters),
17069		autorest.WithQueryParameters(queryParameters))
17070	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17071}
17072
17073// GetWebSiteContainerLogsSlotSender sends the GetWebSiteContainerLogsSlot request. The method will close the
17074// http.Response Body if it receives an error.
17075func (client AppsClient) GetWebSiteContainerLogsSlotSender(req *http.Request) (*http.Response, error) {
17076	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17077}
17078
17079// GetWebSiteContainerLogsSlotResponder handles the response to the GetWebSiteContainerLogsSlot request. The method always
17080// closes the http.Response Body.
17081func (client AppsClient) GetWebSiteContainerLogsSlotResponder(resp *http.Response) (result ReadCloser, err error) {
17082	result.Value = &resp.Body
17083	err = autorest.Respond(
17084		resp,
17085		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
17086	result.Response = autorest.Response{Response: resp}
17087	return
17088}
17089
17090// InstallSiteExtension description for Install site extension on a web site, or a deployment slot.
17091// Parameters:
17092// resourceGroupName - name of the resource group to which the resource belongs.
17093// name - site name.
17094// siteExtensionID - site extension name.
17095func (client AppsClient) InstallSiteExtension(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (result AppsInstallSiteExtensionFuture, err error) {
17096	if tracing.IsEnabled() {
17097		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtension")
17098		defer func() {
17099			sc := -1
17100			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
17101				sc = result.FutureAPI.Response().StatusCode
17102			}
17103			tracing.EndSpan(ctx, sc, err)
17104		}()
17105	}
17106	if err := validation.Validate([]validation.Validation{
17107		{TargetValue: resourceGroupName,
17108			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17109				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17110				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17111		return result, validation.NewError("web.AppsClient", "InstallSiteExtension", err.Error())
17112	}
17113
17114	req, err := client.InstallSiteExtensionPreparer(ctx, resourceGroupName, name, siteExtensionID)
17115	if err != nil {
17116		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request")
17117		return
17118	}
17119
17120	result, err = client.InstallSiteExtensionSender(req)
17121	if err != nil {
17122		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure sending request")
17123		return
17124	}
17125
17126	return
17127}
17128
17129// InstallSiteExtensionPreparer prepares the InstallSiteExtension request.
17130func (client AppsClient) InstallSiteExtensionPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string) (*http.Request, error) {
17131	pathParameters := map[string]interface{}{
17132		"name":              autorest.Encode("path", name),
17133		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17134		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
17135		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17136	}
17137
17138	const APIVersion = "2020-09-01"
17139	queryParameters := map[string]interface{}{
17140		"api-version": APIVersion,
17141	}
17142
17143	preparer := autorest.CreatePreparer(
17144		autorest.AsPut(),
17145		autorest.WithBaseURL(client.BaseURI),
17146		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}", pathParameters),
17147		autorest.WithQueryParameters(queryParameters))
17148	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17149}
17150
17151// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the
17152// http.Response Body if it receives an error.
17153func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (future AppsInstallSiteExtensionFuture, err error) {
17154	var resp *http.Response
17155	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
17156	if err != nil {
17157		return
17158	}
17159	var azf azure.Future
17160	azf, err = azure.NewFutureFromResponse(resp)
17161	future.FutureAPI = &azf
17162	future.Result = func(client AppsClient) (sei SiteExtensionInfo, err error) {
17163		var done bool
17164		done, err = future.DoneWithContext(context.Background(), client)
17165		if err != nil {
17166			err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", future.Response(), "Polling failure")
17167			return
17168		}
17169		if !done {
17170			err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionFuture")
17171			return
17172		}
17173		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17174		sei.Response.Response, err = future.GetResult(sender)
17175		if sei.Response.Response == nil && err == nil {
17176			err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", nil, "received nil response and error")
17177		}
17178		if err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
17179			sei, err = client.InstallSiteExtensionResponder(sei.Response.Response)
17180			if err != nil {
17181				err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionFuture", "Result", sei.Response.Response, "Failure responding to request")
17182			}
17183		}
17184		return
17185	}
17186	return
17187}
17188
17189// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always
17190// closes the http.Response Body.
17191func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
17192	err = autorest.Respond(
17193		resp,
17194		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests),
17195		autorest.ByUnmarshallingJSON(&result),
17196		autorest.ByClosing())
17197	result.Response = autorest.Response{Response: resp}
17198	return
17199}
17200
17201// InstallSiteExtensionSlot description for Install site extension on a web site, or a deployment slot.
17202// Parameters:
17203// resourceGroupName - name of the resource group to which the resource belongs.
17204// name - site name.
17205// siteExtensionID - site extension name.
17206// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
17207func (client AppsClient) InstallSiteExtensionSlot(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (result AppsInstallSiteExtensionSlotFuture, err error) {
17208	if tracing.IsEnabled() {
17209		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.InstallSiteExtensionSlot")
17210		defer func() {
17211			sc := -1
17212			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
17213				sc = result.FutureAPI.Response().StatusCode
17214			}
17215			tracing.EndSpan(ctx, sc, err)
17216		}()
17217	}
17218	if err := validation.Validate([]validation.Validation{
17219		{TargetValue: resourceGroupName,
17220			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17221				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17222				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17223		return result, validation.NewError("web.AppsClient", "InstallSiteExtensionSlot", err.Error())
17224	}
17225
17226	req, err := client.InstallSiteExtensionSlotPreparer(ctx, resourceGroupName, name, siteExtensionID, slot)
17227	if err != nil {
17228		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request")
17229		return
17230	}
17231
17232	result, err = client.InstallSiteExtensionSlotSender(req)
17233	if err != nil {
17234		err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure sending request")
17235		return
17236	}
17237
17238	return
17239}
17240
17241// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request.
17242func (client AppsClient) InstallSiteExtensionSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteExtensionID string, slot string) (*http.Request, error) {
17243	pathParameters := map[string]interface{}{
17244		"name":              autorest.Encode("path", name),
17245		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17246		"siteExtensionId":   autorest.Encode("path", siteExtensionID),
17247		"slot":              autorest.Encode("path", slot),
17248		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17249	}
17250
17251	const APIVersion = "2020-09-01"
17252	queryParameters := map[string]interface{}{
17253		"api-version": APIVersion,
17254	}
17255
17256	preparer := autorest.CreatePreparer(
17257		autorest.AsPut(),
17258		autorest.WithBaseURL(client.BaseURI),
17259		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}", pathParameters),
17260		autorest.WithQueryParameters(queryParameters))
17261	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17262}
17263
17264// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the
17265// http.Response Body if it receives an error.
17266func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (future AppsInstallSiteExtensionSlotFuture, err error) {
17267	var resp *http.Response
17268	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
17269	if err != nil {
17270		return
17271	}
17272	var azf azure.Future
17273	azf, err = azure.NewFutureFromResponse(resp)
17274	future.FutureAPI = &azf
17275	future.Result = func(client AppsClient) (sei SiteExtensionInfo, err error) {
17276		var done bool
17277		done, err = future.DoneWithContext(context.Background(), client)
17278		if err != nil {
17279			err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", future.Response(), "Polling failure")
17280			return
17281		}
17282		if !done {
17283			err = azure.NewAsyncOpIncompleteError("web.AppsInstallSiteExtensionSlotFuture")
17284			return
17285		}
17286		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
17287		sei.Response.Response, err = future.GetResult(sender)
17288		if sei.Response.Response == nil && err == nil {
17289			err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", nil, "received nil response and error")
17290		}
17291		if err == nil && sei.Response.Response.StatusCode != http.StatusNoContent {
17292			sei, err = client.InstallSiteExtensionSlotResponder(sei.Response.Response)
17293			if err != nil {
17294				err = autorest.NewErrorWithError(err, "web.AppsInstallSiteExtensionSlotFuture", "Result", sei.Response.Response, "Failure responding to request")
17295			}
17296		}
17297		return
17298	}
17299	return
17300}
17301
17302// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always
17303// closes the http.Response Body.
17304func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) {
17305	err = autorest.Respond(
17306		resp,
17307		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusTooManyRequests),
17308		autorest.ByUnmarshallingJSON(&result),
17309		autorest.ByClosing())
17310	result.Response = autorest.Response{Response: resp}
17311	return
17312}
17313
17314// IsCloneable description for Shows whether an app can be cloned to another resource group or subscription.
17315// Parameters:
17316// resourceGroupName - name of the resource group to which the resource belongs.
17317// name - name of the app.
17318func (client AppsClient) IsCloneable(ctx context.Context, resourceGroupName string, name string) (result SiteCloneability, err error) {
17319	if tracing.IsEnabled() {
17320		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneable")
17321		defer func() {
17322			sc := -1
17323			if result.Response.Response != nil {
17324				sc = result.Response.Response.StatusCode
17325			}
17326			tracing.EndSpan(ctx, sc, err)
17327		}()
17328	}
17329	if err := validation.Validate([]validation.Validation{
17330		{TargetValue: resourceGroupName,
17331			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17332				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17333				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17334		return result, validation.NewError("web.AppsClient", "IsCloneable", err.Error())
17335	}
17336
17337	req, err := client.IsCloneablePreparer(ctx, resourceGroupName, name)
17338	if err != nil {
17339		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", nil, "Failure preparing request")
17340		return
17341	}
17342
17343	resp, err := client.IsCloneableSender(req)
17344	if err != nil {
17345		result.Response = autorest.Response{Response: resp}
17346		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure sending request")
17347		return
17348	}
17349
17350	result, err = client.IsCloneableResponder(resp)
17351	if err != nil {
17352		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneable", resp, "Failure responding to request")
17353		return
17354	}
17355
17356	return
17357}
17358
17359// IsCloneablePreparer prepares the IsCloneable request.
17360func (client AppsClient) IsCloneablePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17361	pathParameters := map[string]interface{}{
17362		"name":              autorest.Encode("path", name),
17363		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17364		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17365	}
17366
17367	const APIVersion = "2020-09-01"
17368	queryParameters := map[string]interface{}{
17369		"api-version": APIVersion,
17370	}
17371
17372	preparer := autorest.CreatePreparer(
17373		autorest.AsPost(),
17374		autorest.WithBaseURL(client.BaseURI),
17375		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable", pathParameters),
17376		autorest.WithQueryParameters(queryParameters))
17377	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17378}
17379
17380// IsCloneableSender sends the IsCloneable request. The method will close the
17381// http.Response Body if it receives an error.
17382func (client AppsClient) IsCloneableSender(req *http.Request) (*http.Response, error) {
17383	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17384}
17385
17386// IsCloneableResponder handles the response to the IsCloneable request. The method always
17387// closes the http.Response Body.
17388func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteCloneability, err error) {
17389	err = autorest.Respond(
17390		resp,
17391		azure.WithErrorUnlessStatusCode(http.StatusOK),
17392		autorest.ByUnmarshallingJSON(&result),
17393		autorest.ByClosing())
17394	result.Response = autorest.Response{Response: resp}
17395	return
17396}
17397
17398// IsCloneableSlot description for Shows whether an app can be cloned to another resource group or subscription.
17399// Parameters:
17400// resourceGroupName - name of the resource group to which the resource belongs.
17401// name - name of the app.
17402// slot - name of the deployment slot. By default, this API returns information on the production slot.
17403func (client AppsClient) IsCloneableSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteCloneability, err error) {
17404	if tracing.IsEnabled() {
17405		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.IsCloneableSlot")
17406		defer func() {
17407			sc := -1
17408			if result.Response.Response != nil {
17409				sc = result.Response.Response.StatusCode
17410			}
17411			tracing.EndSpan(ctx, sc, err)
17412		}()
17413	}
17414	if err := validation.Validate([]validation.Validation{
17415		{TargetValue: resourceGroupName,
17416			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17417				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17418				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17419		return result, validation.NewError("web.AppsClient", "IsCloneableSlot", err.Error())
17420	}
17421
17422	req, err := client.IsCloneableSlotPreparer(ctx, resourceGroupName, name, slot)
17423	if err != nil {
17424		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", nil, "Failure preparing request")
17425		return
17426	}
17427
17428	resp, err := client.IsCloneableSlotSender(req)
17429	if err != nil {
17430		result.Response = autorest.Response{Response: resp}
17431		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure sending request")
17432		return
17433	}
17434
17435	result, err = client.IsCloneableSlotResponder(resp)
17436	if err != nil {
17437		err = autorest.NewErrorWithError(err, "web.AppsClient", "IsCloneableSlot", resp, "Failure responding to request")
17438		return
17439	}
17440
17441	return
17442}
17443
17444// IsCloneableSlotPreparer prepares the IsCloneableSlot request.
17445func (client AppsClient) IsCloneableSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17446	pathParameters := map[string]interface{}{
17447		"name":              autorest.Encode("path", name),
17448		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17449		"slot":              autorest.Encode("path", slot),
17450		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17451	}
17452
17453	const APIVersion = "2020-09-01"
17454	queryParameters := map[string]interface{}{
17455		"api-version": APIVersion,
17456	}
17457
17458	preparer := autorest.CreatePreparer(
17459		autorest.AsPost(),
17460		autorest.WithBaseURL(client.BaseURI),
17461		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable", pathParameters),
17462		autorest.WithQueryParameters(queryParameters))
17463	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17464}
17465
17466// IsCloneableSlotSender sends the IsCloneableSlot request. The method will close the
17467// http.Response Body if it receives an error.
17468func (client AppsClient) IsCloneableSlotSender(req *http.Request) (*http.Response, error) {
17469	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17470}
17471
17472// IsCloneableSlotResponder handles the response to the IsCloneableSlot request. The method always
17473// closes the http.Response Body.
17474func (client AppsClient) IsCloneableSlotResponder(resp *http.Response) (result SiteCloneability, err error) {
17475	err = autorest.Respond(
17476		resp,
17477		azure.WithErrorUnlessStatusCode(http.StatusOK),
17478		autorest.ByUnmarshallingJSON(&result),
17479		autorest.ByClosing())
17480	result.Response = autorest.Response{Response: resp}
17481	return
17482}
17483
17484// List description for Get all apps for a subscription.
17485func (client AppsClient) List(ctx context.Context) (result AppCollectionPage, err error) {
17486	if tracing.IsEnabled() {
17487		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List")
17488		defer func() {
17489			sc := -1
17490			if result.ac.Response.Response != nil {
17491				sc = result.ac.Response.Response.StatusCode
17492			}
17493			tracing.EndSpan(ctx, sc, err)
17494		}()
17495	}
17496	result.fn = client.listNextResults
17497	req, err := client.ListPreparer(ctx)
17498	if err != nil {
17499		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", nil, "Failure preparing request")
17500		return
17501	}
17502
17503	resp, err := client.ListSender(req)
17504	if err != nil {
17505		result.ac.Response = autorest.Response{Response: resp}
17506		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure sending request")
17507		return
17508	}
17509
17510	result.ac, err = client.ListResponder(resp)
17511	if err != nil {
17512		err = autorest.NewErrorWithError(err, "web.AppsClient", "List", resp, "Failure responding to request")
17513		return
17514	}
17515	if result.ac.hasNextLink() && result.ac.IsEmpty() {
17516		err = result.NextWithContext(ctx)
17517		return
17518	}
17519
17520	return
17521}
17522
17523// ListPreparer prepares the List request.
17524func (client AppsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
17525	pathParameters := map[string]interface{}{
17526		"subscriptionId": autorest.Encode("path", client.SubscriptionID),
17527	}
17528
17529	const APIVersion = "2020-09-01"
17530	queryParameters := map[string]interface{}{
17531		"api-version": APIVersion,
17532	}
17533
17534	preparer := autorest.CreatePreparer(
17535		autorest.AsGet(),
17536		autorest.WithBaseURL(client.BaseURI),
17537		autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites", pathParameters),
17538		autorest.WithQueryParameters(queryParameters))
17539	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17540}
17541
17542// ListSender sends the List request. The method will close the
17543// http.Response Body if it receives an error.
17544func (client AppsClient) ListSender(req *http.Request) (*http.Response, error) {
17545	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17546}
17547
17548// ListResponder handles the response to the List request. The method always
17549// closes the http.Response Body.
17550func (client AppsClient) ListResponder(resp *http.Response) (result AppCollection, err error) {
17551	err = autorest.Respond(
17552		resp,
17553		azure.WithErrorUnlessStatusCode(http.StatusOK),
17554		autorest.ByUnmarshallingJSON(&result),
17555		autorest.ByClosing())
17556	result.Response = autorest.Response{Response: resp}
17557	return
17558}
17559
17560// listNextResults retrieves the next set of results, if any.
17561func (client AppsClient) listNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
17562	req, err := lastResults.appCollectionPreparer(ctx)
17563	if err != nil {
17564		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", nil, "Failure preparing next results request")
17565	}
17566	if req == nil {
17567		return
17568	}
17569	resp, err := client.ListSender(req)
17570	if err != nil {
17571		result.Response = autorest.Response{Response: resp}
17572		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure sending next results request")
17573	}
17574	result, err = client.ListResponder(resp)
17575	if err != nil {
17576		err = autorest.NewErrorWithError(err, "web.AppsClient", "listNextResults", resp, "Failure responding to next results request")
17577	}
17578	return
17579}
17580
17581// ListComplete enumerates all values, automatically crossing page boundaries as required.
17582func (client AppsClient) ListComplete(ctx context.Context) (result AppCollectionIterator, err error) {
17583	if tracing.IsEnabled() {
17584		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.List")
17585		defer func() {
17586			sc := -1
17587			if result.Response().Response.Response != nil {
17588				sc = result.page.Response().Response.Response.StatusCode
17589			}
17590			tracing.EndSpan(ctx, sc, err)
17591		}()
17592	}
17593	result.page, err = client.List(ctx)
17594	return
17595}
17596
17597// ListApplicationSettings description for Gets the application settings of an app.
17598// Parameters:
17599// resourceGroupName - name of the resource group to which the resource belongs.
17600// name - name of the app.
17601func (client AppsClient) ListApplicationSettings(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) {
17602	if tracing.IsEnabled() {
17603		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettings")
17604		defer func() {
17605			sc := -1
17606			if result.Response.Response != nil {
17607				sc = result.Response.Response.StatusCode
17608			}
17609			tracing.EndSpan(ctx, sc, err)
17610		}()
17611	}
17612	if err := validation.Validate([]validation.Validation{
17613		{TargetValue: resourceGroupName,
17614			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17615				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17616				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17617		return result, validation.NewError("web.AppsClient", "ListApplicationSettings", err.Error())
17618	}
17619
17620	req, err := client.ListApplicationSettingsPreparer(ctx, resourceGroupName, name)
17621	if err != nil {
17622		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", nil, "Failure preparing request")
17623		return
17624	}
17625
17626	resp, err := client.ListApplicationSettingsSender(req)
17627	if err != nil {
17628		result.Response = autorest.Response{Response: resp}
17629		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure sending request")
17630		return
17631	}
17632
17633	result, err = client.ListApplicationSettingsResponder(resp)
17634	if err != nil {
17635		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettings", resp, "Failure responding to request")
17636		return
17637	}
17638
17639	return
17640}
17641
17642// ListApplicationSettingsPreparer prepares the ListApplicationSettings request.
17643func (client AppsClient) ListApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17644	pathParameters := map[string]interface{}{
17645		"name":              autorest.Encode("path", name),
17646		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17647		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17648	}
17649
17650	const APIVersion = "2020-09-01"
17651	queryParameters := map[string]interface{}{
17652		"api-version": APIVersion,
17653	}
17654
17655	preparer := autorest.CreatePreparer(
17656		autorest.AsPost(),
17657		autorest.WithBaseURL(client.BaseURI),
17658		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list", pathParameters),
17659		autorest.WithQueryParameters(queryParameters))
17660	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17661}
17662
17663// ListApplicationSettingsSender sends the ListApplicationSettings request. The method will close the
17664// http.Response Body if it receives an error.
17665func (client AppsClient) ListApplicationSettingsSender(req *http.Request) (*http.Response, error) {
17666	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17667}
17668
17669// ListApplicationSettingsResponder handles the response to the ListApplicationSettings request. The method always
17670// closes the http.Response Body.
17671func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) {
17672	err = autorest.Respond(
17673		resp,
17674		azure.WithErrorUnlessStatusCode(http.StatusOK),
17675		autorest.ByUnmarshallingJSON(&result),
17676		autorest.ByClosing())
17677	result.Response = autorest.Response{Response: resp}
17678	return
17679}
17680
17681// ListApplicationSettingsSlot description for Gets the application settings of an app.
17682// Parameters:
17683// resourceGroupName - name of the resource group to which the resource belongs.
17684// name - name of the app.
17685// slot - name of the deployment slot. If a slot is not specified, the API will get the application settings
17686// for the production slot.
17687func (client AppsClient) ListApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) {
17688	if tracing.IsEnabled() {
17689		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListApplicationSettingsSlot")
17690		defer func() {
17691			sc := -1
17692			if result.Response.Response != nil {
17693				sc = result.Response.Response.StatusCode
17694			}
17695			tracing.EndSpan(ctx, sc, err)
17696		}()
17697	}
17698	if err := validation.Validate([]validation.Validation{
17699		{TargetValue: resourceGroupName,
17700			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17701				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17702				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17703		return result, validation.NewError("web.AppsClient", "ListApplicationSettingsSlot", err.Error())
17704	}
17705
17706	req, err := client.ListApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
17707	if err != nil {
17708		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", nil, "Failure preparing request")
17709		return
17710	}
17711
17712	resp, err := client.ListApplicationSettingsSlotSender(req)
17713	if err != nil {
17714		result.Response = autorest.Response{Response: resp}
17715		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure sending request")
17716		return
17717	}
17718
17719	result, err = client.ListApplicationSettingsSlotResponder(resp)
17720	if err != nil {
17721		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListApplicationSettingsSlot", resp, "Failure responding to request")
17722		return
17723	}
17724
17725	return
17726}
17727
17728// ListApplicationSettingsSlotPreparer prepares the ListApplicationSettingsSlot request.
17729func (client AppsClient) ListApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17730	pathParameters := map[string]interface{}{
17731		"name":              autorest.Encode("path", name),
17732		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17733		"slot":              autorest.Encode("path", slot),
17734		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17735	}
17736
17737	const APIVersion = "2020-09-01"
17738	queryParameters := map[string]interface{}{
17739		"api-version": APIVersion,
17740	}
17741
17742	preparer := autorest.CreatePreparer(
17743		autorest.AsPost(),
17744		autorest.WithBaseURL(client.BaseURI),
17745		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list", pathParameters),
17746		autorest.WithQueryParameters(queryParameters))
17747	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17748}
17749
17750// ListApplicationSettingsSlotSender sends the ListApplicationSettingsSlot request. The method will close the
17751// http.Response Body if it receives an error.
17752func (client AppsClient) ListApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) {
17753	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17754}
17755
17756// ListApplicationSettingsSlotResponder handles the response to the ListApplicationSettingsSlot request. The method always
17757// closes the http.Response Body.
17758func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) {
17759	err = autorest.Respond(
17760		resp,
17761		azure.WithErrorUnlessStatusCode(http.StatusOK),
17762		autorest.ByUnmarshallingJSON(&result),
17763		autorest.ByClosing())
17764	result.Response = autorest.Response{Response: resp}
17765	return
17766}
17767
17768// ListAzureStorageAccounts description for Gets the Azure storage account configurations of an app.
17769// Parameters:
17770// resourceGroupName - name of the resource group to which the resource belongs.
17771// name - name of the app.
17772func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) {
17773	if tracing.IsEnabled() {
17774		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccounts")
17775		defer func() {
17776			sc := -1
17777			if result.Response.Response != nil {
17778				sc = result.Response.Response.StatusCode
17779			}
17780			tracing.EndSpan(ctx, sc, err)
17781		}()
17782	}
17783	if err := validation.Validate([]validation.Validation{
17784		{TargetValue: resourceGroupName,
17785			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17786				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17787				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17788		return result, validation.NewError("web.AppsClient", "ListAzureStorageAccounts", err.Error())
17789	}
17790
17791	req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name)
17792	if err != nil {
17793		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request")
17794		return
17795	}
17796
17797	resp, err := client.ListAzureStorageAccountsSender(req)
17798	if err != nil {
17799		result.Response = autorest.Response{Response: resp}
17800		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request")
17801		return
17802	}
17803
17804	result, err = client.ListAzureStorageAccountsResponder(resp)
17805	if err != nil {
17806		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request")
17807		return
17808	}
17809
17810	return
17811}
17812
17813// ListAzureStorageAccountsPreparer prepares the ListAzureStorageAccounts request.
17814func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17815	pathParameters := map[string]interface{}{
17816		"name":              autorest.Encode("path", name),
17817		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17818		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17819	}
17820
17821	const APIVersion = "2020-09-01"
17822	queryParameters := map[string]interface{}{
17823		"api-version": APIVersion,
17824	}
17825
17826	preparer := autorest.CreatePreparer(
17827		autorest.AsPost(),
17828		autorest.WithBaseURL(client.BaseURI),
17829		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters),
17830		autorest.WithQueryParameters(queryParameters))
17831	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17832}
17833
17834// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the
17835// http.Response Body if it receives an error.
17836func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) {
17837	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17838}
17839
17840// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always
17841// closes the http.Response Body.
17842func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
17843	err = autorest.Respond(
17844		resp,
17845		azure.WithErrorUnlessStatusCode(http.StatusOK),
17846		autorest.ByUnmarshallingJSON(&result),
17847		autorest.ByClosing())
17848	result.Response = autorest.Response{Response: resp}
17849	return
17850}
17851
17852// ListAzureStorageAccountsSlot description for Gets the Azure storage account configurations of an app.
17853// Parameters:
17854// resourceGroupName - name of the resource group to which the resource belongs.
17855// name - name of the app.
17856// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage
17857// account configurations for the production slot.
17858func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) {
17859	if tracing.IsEnabled() {
17860		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListAzureStorageAccountsSlot")
17861		defer func() {
17862			sc := -1
17863			if result.Response.Response != nil {
17864				sc = result.Response.Response.StatusCode
17865			}
17866			tracing.EndSpan(ctx, sc, err)
17867		}()
17868	}
17869	if err := validation.Validate([]validation.Validation{
17870		{TargetValue: resourceGroupName,
17871			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17872				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17873				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17874		return result, validation.NewError("web.AppsClient", "ListAzureStorageAccountsSlot", err.Error())
17875	}
17876
17877	req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot)
17878	if err != nil {
17879		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request")
17880		return
17881	}
17882
17883	resp, err := client.ListAzureStorageAccountsSlotSender(req)
17884	if err != nil {
17885		result.Response = autorest.Response{Response: resp}
17886		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request")
17887		return
17888	}
17889
17890	result, err = client.ListAzureStorageAccountsSlotResponder(resp)
17891	if err != nil {
17892		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure responding to request")
17893		return
17894	}
17895
17896	return
17897}
17898
17899// ListAzureStorageAccountsSlotPreparer prepares the ListAzureStorageAccountsSlot request.
17900func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
17901	pathParameters := map[string]interface{}{
17902		"name":              autorest.Encode("path", name),
17903		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17904		"slot":              autorest.Encode("path", slot),
17905		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17906	}
17907
17908	const APIVersion = "2020-09-01"
17909	queryParameters := map[string]interface{}{
17910		"api-version": APIVersion,
17911	}
17912
17913	preparer := autorest.CreatePreparer(
17914		autorest.AsPost(),
17915		autorest.WithBaseURL(client.BaseURI),
17916		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters),
17917		autorest.WithQueryParameters(queryParameters))
17918	return preparer.Prepare((&http.Request{}).WithContext(ctx))
17919}
17920
17921// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the
17922// http.Response Body if it receives an error.
17923func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) {
17924	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
17925}
17926
17927// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always
17928// closes the http.Response Body.
17929func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
17930	err = autorest.Respond(
17931		resp,
17932		azure.WithErrorUnlessStatusCode(http.StatusOK),
17933		autorest.ByUnmarshallingJSON(&result),
17934		autorest.ByClosing())
17935	result.Response = autorest.Response{Response: resp}
17936	return
17937}
17938
17939// ListBackups description for Gets existing backups of an app.
17940// Parameters:
17941// resourceGroupName - name of the resource group to which the resource belongs.
17942// name - name of the app.
17943func (client AppsClient) ListBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) {
17944	if tracing.IsEnabled() {
17945		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups")
17946		defer func() {
17947			sc := -1
17948			if result.bic.Response.Response != nil {
17949				sc = result.bic.Response.Response.StatusCode
17950			}
17951			tracing.EndSpan(ctx, sc, err)
17952		}()
17953	}
17954	if err := validation.Validate([]validation.Validation{
17955		{TargetValue: resourceGroupName,
17956			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
17957				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
17958				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
17959		return result, validation.NewError("web.AppsClient", "ListBackups", err.Error())
17960	}
17961
17962	result.fn = client.listBackupsNextResults
17963	req, err := client.ListBackupsPreparer(ctx, resourceGroupName, name)
17964	if err != nil {
17965		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", nil, "Failure preparing request")
17966		return
17967	}
17968
17969	resp, err := client.ListBackupsSender(req)
17970	if err != nil {
17971		result.bic.Response = autorest.Response{Response: resp}
17972		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure sending request")
17973		return
17974	}
17975
17976	result.bic, err = client.ListBackupsResponder(resp)
17977	if err != nil {
17978		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackups", resp, "Failure responding to request")
17979		return
17980	}
17981	if result.bic.hasNextLink() && result.bic.IsEmpty() {
17982		err = result.NextWithContext(ctx)
17983		return
17984	}
17985
17986	return
17987}
17988
17989// ListBackupsPreparer prepares the ListBackups request.
17990func (client AppsClient) ListBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
17991	pathParameters := map[string]interface{}{
17992		"name":              autorest.Encode("path", name),
17993		"resourceGroupName": autorest.Encode("path", resourceGroupName),
17994		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
17995	}
17996
17997	const APIVersion = "2020-09-01"
17998	queryParameters := map[string]interface{}{
17999		"api-version": APIVersion,
18000	}
18001
18002	preparer := autorest.CreatePreparer(
18003		autorest.AsGet(),
18004		autorest.WithBaseURL(client.BaseURI),
18005		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups", pathParameters),
18006		autorest.WithQueryParameters(queryParameters))
18007	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18008}
18009
18010// ListBackupsSender sends the ListBackups request. The method will close the
18011// http.Response Body if it receives an error.
18012func (client AppsClient) ListBackupsSender(req *http.Request) (*http.Response, error) {
18013	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18014}
18015
18016// ListBackupsResponder handles the response to the ListBackups request. The method always
18017// closes the http.Response Body.
18018func (client AppsClient) ListBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) {
18019	err = autorest.Respond(
18020		resp,
18021		azure.WithErrorUnlessStatusCode(http.StatusOK),
18022		autorest.ByUnmarshallingJSON(&result),
18023		autorest.ByClosing())
18024	result.Response = autorest.Response{Response: resp}
18025	return
18026}
18027
18028// listBackupsNextResults retrieves the next set of results, if any.
18029func (client AppsClient) listBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
18030	req, err := lastResults.backupItemCollectionPreparer(ctx)
18031	if err != nil {
18032		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", nil, "Failure preparing next results request")
18033	}
18034	if req == nil {
18035		return
18036	}
18037	resp, err := client.ListBackupsSender(req)
18038	if err != nil {
18039		result.Response = autorest.Response{Response: resp}
18040		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure sending next results request")
18041	}
18042	result, err = client.ListBackupsResponder(resp)
18043	if err != nil {
18044		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsNextResults", resp, "Failure responding to next results request")
18045	}
18046	return
18047}
18048
18049// ListBackupsComplete enumerates all values, automatically crossing page boundaries as required.
18050func (client AppsClient) ListBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) {
18051	if tracing.IsEnabled() {
18052		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackups")
18053		defer func() {
18054			sc := -1
18055			if result.Response().Response.Response != nil {
18056				sc = result.page.Response().Response.Response.StatusCode
18057			}
18058			tracing.EndSpan(ctx, sc, err)
18059		}()
18060	}
18061	result.page, err = client.ListBackups(ctx, resourceGroupName, name)
18062	return
18063}
18064
18065// ListBackupsSlot description for Gets existing backups of an app.
18066// Parameters:
18067// resourceGroupName - name of the resource group to which the resource belongs.
18068// name - name of the app.
18069// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production
18070// slot.
18071func (client AppsClient) ListBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) {
18072	if tracing.IsEnabled() {
18073		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot")
18074		defer func() {
18075			sc := -1
18076			if result.bic.Response.Response != nil {
18077				sc = result.bic.Response.Response.StatusCode
18078			}
18079			tracing.EndSpan(ctx, sc, err)
18080		}()
18081	}
18082	if err := validation.Validate([]validation.Validation{
18083		{TargetValue: resourceGroupName,
18084			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18085				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18086				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18087		return result, validation.NewError("web.AppsClient", "ListBackupsSlot", err.Error())
18088	}
18089
18090	result.fn = client.listBackupsSlotNextResults
18091	req, err := client.ListBackupsSlotPreparer(ctx, resourceGroupName, name, slot)
18092	if err != nil {
18093		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", nil, "Failure preparing request")
18094		return
18095	}
18096
18097	resp, err := client.ListBackupsSlotSender(req)
18098	if err != nil {
18099		result.bic.Response = autorest.Response{Response: resp}
18100		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure sending request")
18101		return
18102	}
18103
18104	result.bic, err = client.ListBackupsSlotResponder(resp)
18105	if err != nil {
18106		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupsSlot", resp, "Failure responding to request")
18107		return
18108	}
18109	if result.bic.hasNextLink() && result.bic.IsEmpty() {
18110		err = result.NextWithContext(ctx)
18111		return
18112	}
18113
18114	return
18115}
18116
18117// ListBackupsSlotPreparer prepares the ListBackupsSlot request.
18118func (client AppsClient) ListBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18119	pathParameters := map[string]interface{}{
18120		"name":              autorest.Encode("path", name),
18121		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18122		"slot":              autorest.Encode("path", slot),
18123		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18124	}
18125
18126	const APIVersion = "2020-09-01"
18127	queryParameters := map[string]interface{}{
18128		"api-version": APIVersion,
18129	}
18130
18131	preparer := autorest.CreatePreparer(
18132		autorest.AsGet(),
18133		autorest.WithBaseURL(client.BaseURI),
18134		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups", pathParameters),
18135		autorest.WithQueryParameters(queryParameters))
18136	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18137}
18138
18139// ListBackupsSlotSender sends the ListBackupsSlot request. The method will close the
18140// http.Response Body if it receives an error.
18141func (client AppsClient) ListBackupsSlotSender(req *http.Request) (*http.Response, error) {
18142	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18143}
18144
18145// ListBackupsSlotResponder handles the response to the ListBackupsSlot request. The method always
18146// closes the http.Response Body.
18147func (client AppsClient) ListBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) {
18148	err = autorest.Respond(
18149		resp,
18150		azure.WithErrorUnlessStatusCode(http.StatusOK),
18151		autorest.ByUnmarshallingJSON(&result),
18152		autorest.ByClosing())
18153	result.Response = autorest.Response{Response: resp}
18154	return
18155}
18156
18157// listBackupsSlotNextResults retrieves the next set of results, if any.
18158func (client AppsClient) listBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
18159	req, err := lastResults.backupItemCollectionPreparer(ctx)
18160	if err != nil {
18161		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", nil, "Failure preparing next results request")
18162	}
18163	if req == nil {
18164		return
18165	}
18166	resp, err := client.ListBackupsSlotSender(req)
18167	if err != nil {
18168		result.Response = autorest.Response{Response: resp}
18169		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure sending next results request")
18170	}
18171	result, err = client.ListBackupsSlotResponder(resp)
18172	if err != nil {
18173		err = autorest.NewErrorWithError(err, "web.AppsClient", "listBackupsSlotNextResults", resp, "Failure responding to next results request")
18174	}
18175	return
18176}
18177
18178// ListBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required.
18179func (client AppsClient) ListBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) {
18180	if tracing.IsEnabled() {
18181		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupsSlot")
18182		defer func() {
18183			sc := -1
18184			if result.Response().Response.Response != nil {
18185				sc = result.page.Response().Response.Response.StatusCode
18186			}
18187			tracing.EndSpan(ctx, sc, err)
18188		}()
18189	}
18190	result.page, err = client.ListBackupsSlot(ctx, resourceGroupName, name, slot)
18191	return
18192}
18193
18194// ListBackupStatusSecrets description for Gets status of a web app backup that may be in progress, including secrets
18195// associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup
18196// if a new URL is passed in the request body.
18197// Parameters:
18198// resourceGroupName - name of the resource group to which the resource belongs.
18199// name - name of web app.
18200// backupID - ID of backup.
18201// request - information on backup request.
18202func (client AppsClient) ListBackupStatusSecrets(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) {
18203	if tracing.IsEnabled() {
18204		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecrets")
18205		defer func() {
18206			sc := -1
18207			if result.Response.Response != nil {
18208				sc = result.Response.Response.StatusCode
18209			}
18210			tracing.EndSpan(ctx, sc, err)
18211		}()
18212	}
18213	if err := validation.Validate([]validation.Validation{
18214		{TargetValue: resourceGroupName,
18215			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18216				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18217				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
18218		{TargetValue: request,
18219			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
18220				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
18221					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
18222						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
18223							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
18224							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
18225						}},
18226				}}}}}); err != nil {
18227		return result, validation.NewError("web.AppsClient", "ListBackupStatusSecrets", err.Error())
18228	}
18229
18230	req, err := client.ListBackupStatusSecretsPreparer(ctx, resourceGroupName, name, backupID, request)
18231	if err != nil {
18232		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", nil, "Failure preparing request")
18233		return
18234	}
18235
18236	resp, err := client.ListBackupStatusSecretsSender(req)
18237	if err != nil {
18238		result.Response = autorest.Response{Response: resp}
18239		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure sending request")
18240		return
18241	}
18242
18243	result, err = client.ListBackupStatusSecretsResponder(resp)
18244	if err != nil {
18245		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecrets", resp, "Failure responding to request")
18246		return
18247	}
18248
18249	return
18250}
18251
18252// ListBackupStatusSecretsPreparer prepares the ListBackupStatusSecrets request.
18253func (client AppsClient) ListBackupStatusSecretsPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest) (*http.Request, error) {
18254	pathParameters := map[string]interface{}{
18255		"backupId":          autorest.Encode("path", backupID),
18256		"name":              autorest.Encode("path", name),
18257		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18258		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18259	}
18260
18261	const APIVersion = "2020-09-01"
18262	queryParameters := map[string]interface{}{
18263		"api-version": APIVersion,
18264	}
18265
18266	preparer := autorest.CreatePreparer(
18267		autorest.AsContentType("application/json; charset=utf-8"),
18268		autorest.AsPost(),
18269		autorest.WithBaseURL(client.BaseURI),
18270		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list", pathParameters),
18271		autorest.WithJSON(request),
18272		autorest.WithQueryParameters(queryParameters))
18273	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18274}
18275
18276// ListBackupStatusSecretsSender sends the ListBackupStatusSecrets request. The method will close the
18277// http.Response Body if it receives an error.
18278func (client AppsClient) ListBackupStatusSecretsSender(req *http.Request) (*http.Response, error) {
18279	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18280}
18281
18282// ListBackupStatusSecretsResponder handles the response to the ListBackupStatusSecrets request. The method always
18283// closes the http.Response Body.
18284func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) (result BackupItem, err error) {
18285	err = autorest.Respond(
18286		resp,
18287		azure.WithErrorUnlessStatusCode(http.StatusOK),
18288		autorest.ByUnmarshallingJSON(&result),
18289		autorest.ByClosing())
18290	result.Response = autorest.Response{Response: resp}
18291	return
18292}
18293
18294// ListBackupStatusSecretsSlot description for Gets status of a web app backup that may be in progress, including
18295// secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for
18296// the backup if a new URL is passed in the request body.
18297// Parameters:
18298// resourceGroupName - name of the resource group to which the resource belongs.
18299// name - name of web app.
18300// backupID - ID of backup.
18301// request - information on backup request.
18302// slot - name of web app slot. If not specified then will default to production slot.
18303func (client AppsClient) ListBackupStatusSecretsSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) {
18304	if tracing.IsEnabled() {
18305		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListBackupStatusSecretsSlot")
18306		defer func() {
18307			sc := -1
18308			if result.Response.Response != nil {
18309				sc = result.Response.Response.StatusCode
18310			}
18311			tracing.EndSpan(ctx, sc, err)
18312		}()
18313	}
18314	if err := validation.Validate([]validation.Validation{
18315		{TargetValue: resourceGroupName,
18316			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18317				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18318				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
18319		{TargetValue: request,
18320			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
18321				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
18322					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
18323						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
18324							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
18325							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
18326						}},
18327				}}}}}); err != nil {
18328		return result, validation.NewError("web.AppsClient", "ListBackupStatusSecretsSlot", err.Error())
18329	}
18330
18331	req, err := client.ListBackupStatusSecretsSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot)
18332	if err != nil {
18333		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", nil, "Failure preparing request")
18334		return
18335	}
18336
18337	resp, err := client.ListBackupStatusSecretsSlotSender(req)
18338	if err != nil {
18339		result.Response = autorest.Response{Response: resp}
18340		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure sending request")
18341		return
18342	}
18343
18344	result, err = client.ListBackupStatusSecretsSlotResponder(resp)
18345	if err != nil {
18346		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListBackupStatusSecretsSlot", resp, "Failure responding to request")
18347		return
18348	}
18349
18350	return
18351}
18352
18353// ListBackupStatusSecretsSlotPreparer prepares the ListBackupStatusSecretsSlot request.
18354func (client AppsClient) ListBackupStatusSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (*http.Request, error) {
18355	pathParameters := map[string]interface{}{
18356		"backupId":          autorest.Encode("path", backupID),
18357		"name":              autorest.Encode("path", name),
18358		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18359		"slot":              autorest.Encode("path", slot),
18360		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18361	}
18362
18363	const APIVersion = "2020-09-01"
18364	queryParameters := map[string]interface{}{
18365		"api-version": APIVersion,
18366	}
18367
18368	preparer := autorest.CreatePreparer(
18369		autorest.AsContentType("application/json; charset=utf-8"),
18370		autorest.AsPost(),
18371		autorest.WithBaseURL(client.BaseURI),
18372		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list", pathParameters),
18373		autorest.WithJSON(request),
18374		autorest.WithQueryParameters(queryParameters))
18375	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18376}
18377
18378// ListBackupStatusSecretsSlotSender sends the ListBackupStatusSecretsSlot request. The method will close the
18379// http.Response Body if it receives an error.
18380func (client AppsClient) ListBackupStatusSecretsSlotSender(req *http.Request) (*http.Response, error) {
18381	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18382}
18383
18384// ListBackupStatusSecretsSlotResponder handles the response to the ListBackupStatusSecretsSlot request. The method always
18385// closes the http.Response Body.
18386func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Response) (result BackupItem, err error) {
18387	err = autorest.Respond(
18388		resp,
18389		azure.WithErrorUnlessStatusCode(http.StatusOK),
18390		autorest.ByUnmarshallingJSON(&result),
18391		autorest.ByClosing())
18392	result.Response = autorest.Response{Response: resp}
18393	return
18394}
18395
18396// ListByResourceGroup description for Gets all web, mobile, and API apps in the specified resource group.
18397// Parameters:
18398// resourceGroupName - name of the resource group to which the resource belongs.
18399// includeSlots - specify <strong>true</strong> to include deployment slots in results. The default is false,
18400// which only gives you the production slot of all apps.
18401func (client AppsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionPage, err error) {
18402	if tracing.IsEnabled() {
18403		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup")
18404		defer func() {
18405			sc := -1
18406			if result.ac.Response.Response != nil {
18407				sc = result.ac.Response.Response.StatusCode
18408			}
18409			tracing.EndSpan(ctx, sc, err)
18410		}()
18411	}
18412	if err := validation.Validate([]validation.Validation{
18413		{TargetValue: resourceGroupName,
18414			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18415				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18416				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18417		return result, validation.NewError("web.AppsClient", "ListByResourceGroup", err.Error())
18418	}
18419
18420	result.fn = client.listByResourceGroupNextResults
18421	req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, includeSlots)
18422	if err != nil {
18423		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", nil, "Failure preparing request")
18424		return
18425	}
18426
18427	resp, err := client.ListByResourceGroupSender(req)
18428	if err != nil {
18429		result.ac.Response = autorest.Response{Response: resp}
18430		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure sending request")
18431		return
18432	}
18433
18434	result.ac, err = client.ListByResourceGroupResponder(resp)
18435	if err != nil {
18436		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListByResourceGroup", resp, "Failure responding to request")
18437		return
18438	}
18439	if result.ac.hasNextLink() && result.ac.IsEmpty() {
18440		err = result.NextWithContext(ctx)
18441		return
18442	}
18443
18444	return
18445}
18446
18447// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
18448func (client AppsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, includeSlots *bool) (*http.Request, error) {
18449	pathParameters := map[string]interface{}{
18450		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18451		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18452	}
18453
18454	const APIVersion = "2020-09-01"
18455	queryParameters := map[string]interface{}{
18456		"api-version": APIVersion,
18457	}
18458	if includeSlots != nil {
18459		queryParameters["includeSlots"] = autorest.Encode("query", *includeSlots)
18460	}
18461
18462	preparer := autorest.CreatePreparer(
18463		autorest.AsGet(),
18464		autorest.WithBaseURL(client.BaseURI),
18465		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites", pathParameters),
18466		autorest.WithQueryParameters(queryParameters))
18467	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18468}
18469
18470// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
18471// http.Response Body if it receives an error.
18472func (client AppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
18473	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18474}
18475
18476// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
18477// closes the http.Response Body.
18478func (client AppsClient) ListByResourceGroupResponder(resp *http.Response) (result AppCollection, err error) {
18479	err = autorest.Respond(
18480		resp,
18481		azure.WithErrorUnlessStatusCode(http.StatusOK),
18482		autorest.ByUnmarshallingJSON(&result),
18483		autorest.ByClosing())
18484	result.Response = autorest.Response{Response: resp}
18485	return
18486}
18487
18488// listByResourceGroupNextResults retrieves the next set of results, if any.
18489func (client AppsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
18490	req, err := lastResults.appCollectionPreparer(ctx)
18491	if err != nil {
18492		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
18493	}
18494	if req == nil {
18495		return
18496	}
18497	resp, err := client.ListByResourceGroupSender(req)
18498	if err != nil {
18499		result.Response = autorest.Response{Response: resp}
18500		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
18501	}
18502	result, err = client.ListByResourceGroupResponder(resp)
18503	if err != nil {
18504		err = autorest.NewErrorWithError(err, "web.AppsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
18505	}
18506	return
18507}
18508
18509// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
18510func (client AppsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, includeSlots *bool) (result AppCollectionIterator, err error) {
18511	if tracing.IsEnabled() {
18512		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListByResourceGroup")
18513		defer func() {
18514			sc := -1
18515			if result.Response().Response.Response != nil {
18516				sc = result.page.Response().Response.Response.StatusCode
18517			}
18518			tracing.EndSpan(ctx, sc, err)
18519		}()
18520	}
18521	result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, includeSlots)
18522	return
18523}
18524
18525// ListConfigurations description for List the configurations of an app
18526// Parameters:
18527// resourceGroupName - name of the resource group to which the resource belongs.
18528// name - name of the app.
18529func (client AppsClient) ListConfigurations(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionPage, err error) {
18530	if tracing.IsEnabled() {
18531		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations")
18532		defer func() {
18533			sc := -1
18534			if result.scrc.Response.Response != nil {
18535				sc = result.scrc.Response.Response.StatusCode
18536			}
18537			tracing.EndSpan(ctx, sc, err)
18538		}()
18539	}
18540	if err := validation.Validate([]validation.Validation{
18541		{TargetValue: resourceGroupName,
18542			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18543				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18544				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18545		return result, validation.NewError("web.AppsClient", "ListConfigurations", err.Error())
18546	}
18547
18548	result.fn = client.listConfigurationsNextResults
18549	req, err := client.ListConfigurationsPreparer(ctx, resourceGroupName, name)
18550	if err != nil {
18551		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", nil, "Failure preparing request")
18552		return
18553	}
18554
18555	resp, err := client.ListConfigurationsSender(req)
18556	if err != nil {
18557		result.scrc.Response = autorest.Response{Response: resp}
18558		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure sending request")
18559		return
18560	}
18561
18562	result.scrc, err = client.ListConfigurationsResponder(resp)
18563	if err != nil {
18564		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurations", resp, "Failure responding to request")
18565		return
18566	}
18567	if result.scrc.hasNextLink() && result.scrc.IsEmpty() {
18568		err = result.NextWithContext(ctx)
18569		return
18570	}
18571
18572	return
18573}
18574
18575// ListConfigurationsPreparer prepares the ListConfigurations request.
18576func (client AppsClient) ListConfigurationsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18577	pathParameters := map[string]interface{}{
18578		"name":              autorest.Encode("path", name),
18579		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18580		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18581	}
18582
18583	const APIVersion = "2020-09-01"
18584	queryParameters := map[string]interface{}{
18585		"api-version": APIVersion,
18586	}
18587
18588	preparer := autorest.CreatePreparer(
18589		autorest.AsGet(),
18590		autorest.WithBaseURL(client.BaseURI),
18591		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config", pathParameters),
18592		autorest.WithQueryParameters(queryParameters))
18593	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18594}
18595
18596// ListConfigurationsSender sends the ListConfigurations request. The method will close the
18597// http.Response Body if it receives an error.
18598func (client AppsClient) ListConfigurationsSender(req *http.Request) (*http.Response, error) {
18599	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18600}
18601
18602// ListConfigurationsResponder handles the response to the ListConfigurations request. The method always
18603// closes the http.Response Body.
18604func (client AppsClient) ListConfigurationsResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) {
18605	err = autorest.Respond(
18606		resp,
18607		azure.WithErrorUnlessStatusCode(http.StatusOK),
18608		autorest.ByUnmarshallingJSON(&result),
18609		autorest.ByClosing())
18610	result.Response = autorest.Response{Response: resp}
18611	return
18612}
18613
18614// listConfigurationsNextResults retrieves the next set of results, if any.
18615func (client AppsClient) listConfigurationsNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) {
18616	req, err := lastResults.siteConfigResourceCollectionPreparer(ctx)
18617	if err != nil {
18618		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", nil, "Failure preparing next results request")
18619	}
18620	if req == nil {
18621		return
18622	}
18623	resp, err := client.ListConfigurationsSender(req)
18624	if err != nil {
18625		result.Response = autorest.Response{Response: resp}
18626		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure sending next results request")
18627	}
18628	result, err = client.ListConfigurationsResponder(resp)
18629	if err != nil {
18630		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsNextResults", resp, "Failure responding to next results request")
18631	}
18632	return
18633}
18634
18635// ListConfigurationsComplete enumerates all values, automatically crossing page boundaries as required.
18636func (client AppsClient) ListConfigurationsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigResourceCollectionIterator, err error) {
18637	if tracing.IsEnabled() {
18638		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurations")
18639		defer func() {
18640			sc := -1
18641			if result.Response().Response.Response != nil {
18642				sc = result.page.Response().Response.Response.StatusCode
18643			}
18644			tracing.EndSpan(ctx, sc, err)
18645		}()
18646	}
18647	result.page, err = client.ListConfigurations(ctx, resourceGroupName, name)
18648	return
18649}
18650
18651// ListConfigurationSnapshotInfo description for Gets a list of web app configuration snapshots identifiers. Each
18652// element of the list contains a timestamp and the ID of the snapshot.
18653// Parameters:
18654// resourceGroupName - name of the resource group to which the resource belongs.
18655// name - name of the app.
18656func (client AppsClient) ListConfigurationSnapshotInfo(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) {
18657	if tracing.IsEnabled() {
18658		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo")
18659		defer func() {
18660			sc := -1
18661			if result.scsic.Response.Response != nil {
18662				sc = result.scsic.Response.Response.StatusCode
18663			}
18664			tracing.EndSpan(ctx, sc, err)
18665		}()
18666	}
18667	if err := validation.Validate([]validation.Validation{
18668		{TargetValue: resourceGroupName,
18669			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18670				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18671				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18672		return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfo", err.Error())
18673	}
18674
18675	result.fn = client.listConfigurationSnapshotInfoNextResults
18676	req, err := client.ListConfigurationSnapshotInfoPreparer(ctx, resourceGroupName, name)
18677	if err != nil {
18678		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", nil, "Failure preparing request")
18679		return
18680	}
18681
18682	resp, err := client.ListConfigurationSnapshotInfoSender(req)
18683	if err != nil {
18684		result.scsic.Response = autorest.Response{Response: resp}
18685		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure sending request")
18686		return
18687	}
18688
18689	result.scsic, err = client.ListConfigurationSnapshotInfoResponder(resp)
18690	if err != nil {
18691		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfo", resp, "Failure responding to request")
18692		return
18693	}
18694	if result.scsic.hasNextLink() && result.scsic.IsEmpty() {
18695		err = result.NextWithContext(ctx)
18696		return
18697	}
18698
18699	return
18700}
18701
18702// ListConfigurationSnapshotInfoPreparer prepares the ListConfigurationSnapshotInfo request.
18703func (client AppsClient) ListConfigurationSnapshotInfoPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
18704	pathParameters := map[string]interface{}{
18705		"name":              autorest.Encode("path", name),
18706		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18707		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18708	}
18709
18710	const APIVersion = "2020-09-01"
18711	queryParameters := map[string]interface{}{
18712		"api-version": APIVersion,
18713	}
18714
18715	preparer := autorest.CreatePreparer(
18716		autorest.AsGet(),
18717		autorest.WithBaseURL(client.BaseURI),
18718		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots", pathParameters),
18719		autorest.WithQueryParameters(queryParameters))
18720	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18721}
18722
18723// ListConfigurationSnapshotInfoSender sends the ListConfigurationSnapshotInfo request. The method will close the
18724// http.Response Body if it receives an error.
18725func (client AppsClient) ListConfigurationSnapshotInfoSender(req *http.Request) (*http.Response, error) {
18726	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18727}
18728
18729// ListConfigurationSnapshotInfoResponder handles the response to the ListConfigurationSnapshotInfo request. The method always
18730// closes the http.Response Body.
18731func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) {
18732	err = autorest.Respond(
18733		resp,
18734		azure.WithErrorUnlessStatusCode(http.StatusOK),
18735		autorest.ByUnmarshallingJSON(&result),
18736		autorest.ByClosing())
18737	result.Response = autorest.Response{Response: resp}
18738	return
18739}
18740
18741// listConfigurationSnapshotInfoNextResults retrieves the next set of results, if any.
18742func (client AppsClient) listConfigurationSnapshotInfoNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) {
18743	req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx)
18744	if err != nil {
18745		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", nil, "Failure preparing next results request")
18746	}
18747	if req == nil {
18748		return
18749	}
18750	resp, err := client.ListConfigurationSnapshotInfoSender(req)
18751	if err != nil {
18752		result.Response = autorest.Response{Response: resp}
18753		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure sending next results request")
18754	}
18755	result, err = client.ListConfigurationSnapshotInfoResponder(resp)
18756	if err != nil {
18757		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoNextResults", resp, "Failure responding to next results request")
18758	}
18759	return
18760}
18761
18762// ListConfigurationSnapshotInfoComplete enumerates all values, automatically crossing page boundaries as required.
18763func (client AppsClient) ListConfigurationSnapshotInfoComplete(ctx context.Context, resourceGroupName string, name string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) {
18764	if tracing.IsEnabled() {
18765		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfo")
18766		defer func() {
18767			sc := -1
18768			if result.Response().Response.Response != nil {
18769				sc = result.page.Response().Response.Response.StatusCode
18770			}
18771			tracing.EndSpan(ctx, sc, err)
18772		}()
18773	}
18774	result.page, err = client.ListConfigurationSnapshotInfo(ctx, resourceGroupName, name)
18775	return
18776}
18777
18778// ListConfigurationSnapshotInfoSlot description for Gets a list of web app configuration snapshots identifiers. Each
18779// element of the list contains a timestamp and the ID of the snapshot.
18780// Parameters:
18781// resourceGroupName - name of the resource group to which the resource belongs.
18782// name - name of the app.
18783// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
18784// production slot.
18785func (client AppsClient) ListConfigurationSnapshotInfoSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionPage, err error) {
18786	if tracing.IsEnabled() {
18787		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot")
18788		defer func() {
18789			sc := -1
18790			if result.scsic.Response.Response != nil {
18791				sc = result.scsic.Response.Response.StatusCode
18792			}
18793			tracing.EndSpan(ctx, sc, err)
18794		}()
18795	}
18796	if err := validation.Validate([]validation.Validation{
18797		{TargetValue: resourceGroupName,
18798			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18799				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18800				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18801		return result, validation.NewError("web.AppsClient", "ListConfigurationSnapshotInfoSlot", err.Error())
18802	}
18803
18804	result.fn = client.listConfigurationSnapshotInfoSlotNextResults
18805	req, err := client.ListConfigurationSnapshotInfoSlotPreparer(ctx, resourceGroupName, name, slot)
18806	if err != nil {
18807		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", nil, "Failure preparing request")
18808		return
18809	}
18810
18811	resp, err := client.ListConfigurationSnapshotInfoSlotSender(req)
18812	if err != nil {
18813		result.scsic.Response = autorest.Response{Response: resp}
18814		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure sending request")
18815		return
18816	}
18817
18818	result.scsic, err = client.ListConfigurationSnapshotInfoSlotResponder(resp)
18819	if err != nil {
18820		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationSnapshotInfoSlot", resp, "Failure responding to request")
18821		return
18822	}
18823	if result.scsic.hasNextLink() && result.scsic.IsEmpty() {
18824		err = result.NextWithContext(ctx)
18825		return
18826	}
18827
18828	return
18829}
18830
18831// ListConfigurationSnapshotInfoSlotPreparer prepares the ListConfigurationSnapshotInfoSlot request.
18832func (client AppsClient) ListConfigurationSnapshotInfoSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18833	pathParameters := map[string]interface{}{
18834		"name":              autorest.Encode("path", name),
18835		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18836		"slot":              autorest.Encode("path", slot),
18837		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18838	}
18839
18840	const APIVersion = "2020-09-01"
18841	queryParameters := map[string]interface{}{
18842		"api-version": APIVersion,
18843	}
18844
18845	preparer := autorest.CreatePreparer(
18846		autorest.AsGet(),
18847		autorest.WithBaseURL(client.BaseURI),
18848		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots", pathParameters),
18849		autorest.WithQueryParameters(queryParameters))
18850	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18851}
18852
18853// ListConfigurationSnapshotInfoSlotSender sends the ListConfigurationSnapshotInfoSlot request. The method will close the
18854// http.Response Body if it receives an error.
18855func (client AppsClient) ListConfigurationSnapshotInfoSlotSender(req *http.Request) (*http.Response, error) {
18856	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18857}
18858
18859// ListConfigurationSnapshotInfoSlotResponder handles the response to the ListConfigurationSnapshotInfoSlot request. The method always
18860// closes the http.Response Body.
18861func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.Response) (result SiteConfigurationSnapshotInfoCollection, err error) {
18862	err = autorest.Respond(
18863		resp,
18864		azure.WithErrorUnlessStatusCode(http.StatusOK),
18865		autorest.ByUnmarshallingJSON(&result),
18866		autorest.ByClosing())
18867	result.Response = autorest.Response{Response: resp}
18868	return
18869}
18870
18871// listConfigurationSnapshotInfoSlotNextResults retrieves the next set of results, if any.
18872func (client AppsClient) listConfigurationSnapshotInfoSlotNextResults(ctx context.Context, lastResults SiteConfigurationSnapshotInfoCollection) (result SiteConfigurationSnapshotInfoCollection, err error) {
18873	req, err := lastResults.siteConfigurationSnapshotInfoCollectionPreparer(ctx)
18874	if err != nil {
18875		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", nil, "Failure preparing next results request")
18876	}
18877	if req == nil {
18878		return
18879	}
18880	resp, err := client.ListConfigurationSnapshotInfoSlotSender(req)
18881	if err != nil {
18882		result.Response = autorest.Response{Response: resp}
18883		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure sending next results request")
18884	}
18885	result, err = client.ListConfigurationSnapshotInfoSlotResponder(resp)
18886	if err != nil {
18887		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationSnapshotInfoSlotNextResults", resp, "Failure responding to next results request")
18888	}
18889	return
18890}
18891
18892// ListConfigurationSnapshotInfoSlotComplete enumerates all values, automatically crossing page boundaries as required.
18893func (client AppsClient) ListConfigurationSnapshotInfoSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigurationSnapshotInfoCollectionIterator, err error) {
18894	if tracing.IsEnabled() {
18895		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationSnapshotInfoSlot")
18896		defer func() {
18897			sc := -1
18898			if result.Response().Response.Response != nil {
18899				sc = result.page.Response().Response.Response.StatusCode
18900			}
18901			tracing.EndSpan(ctx, sc, err)
18902		}()
18903	}
18904	result.page, err = client.ListConfigurationSnapshotInfoSlot(ctx, resourceGroupName, name, slot)
18905	return
18906}
18907
18908// ListConfigurationsSlot description for List the configurations of an app
18909// Parameters:
18910// resourceGroupName - name of the resource group to which the resource belongs.
18911// name - name of the app.
18912// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
18913// production slot.
18914func (client AppsClient) ListConfigurationsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionPage, err error) {
18915	if tracing.IsEnabled() {
18916		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot")
18917		defer func() {
18918			sc := -1
18919			if result.scrc.Response.Response != nil {
18920				sc = result.scrc.Response.Response.StatusCode
18921			}
18922			tracing.EndSpan(ctx, sc, err)
18923		}()
18924	}
18925	if err := validation.Validate([]validation.Validation{
18926		{TargetValue: resourceGroupName,
18927			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
18928				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
18929				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
18930		return result, validation.NewError("web.AppsClient", "ListConfigurationsSlot", err.Error())
18931	}
18932
18933	result.fn = client.listConfigurationsSlotNextResults
18934	req, err := client.ListConfigurationsSlotPreparer(ctx, resourceGroupName, name, slot)
18935	if err != nil {
18936		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", nil, "Failure preparing request")
18937		return
18938	}
18939
18940	resp, err := client.ListConfigurationsSlotSender(req)
18941	if err != nil {
18942		result.scrc.Response = autorest.Response{Response: resp}
18943		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure sending request")
18944		return
18945	}
18946
18947	result.scrc, err = client.ListConfigurationsSlotResponder(resp)
18948	if err != nil {
18949		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConfigurationsSlot", resp, "Failure responding to request")
18950		return
18951	}
18952	if result.scrc.hasNextLink() && result.scrc.IsEmpty() {
18953		err = result.NextWithContext(ctx)
18954		return
18955	}
18956
18957	return
18958}
18959
18960// ListConfigurationsSlotPreparer prepares the ListConfigurationsSlot request.
18961func (client AppsClient) ListConfigurationsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
18962	pathParameters := map[string]interface{}{
18963		"name":              autorest.Encode("path", name),
18964		"resourceGroupName": autorest.Encode("path", resourceGroupName),
18965		"slot":              autorest.Encode("path", slot),
18966		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
18967	}
18968
18969	const APIVersion = "2020-09-01"
18970	queryParameters := map[string]interface{}{
18971		"api-version": APIVersion,
18972	}
18973
18974	preparer := autorest.CreatePreparer(
18975		autorest.AsGet(),
18976		autorest.WithBaseURL(client.BaseURI),
18977		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config", pathParameters),
18978		autorest.WithQueryParameters(queryParameters))
18979	return preparer.Prepare((&http.Request{}).WithContext(ctx))
18980}
18981
18982// ListConfigurationsSlotSender sends the ListConfigurationsSlot request. The method will close the
18983// http.Response Body if it receives an error.
18984func (client AppsClient) ListConfigurationsSlotSender(req *http.Request) (*http.Response, error) {
18985	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
18986}
18987
18988// ListConfigurationsSlotResponder handles the response to the ListConfigurationsSlot request. The method always
18989// closes the http.Response Body.
18990func (client AppsClient) ListConfigurationsSlotResponder(resp *http.Response) (result SiteConfigResourceCollection, err error) {
18991	err = autorest.Respond(
18992		resp,
18993		azure.WithErrorUnlessStatusCode(http.StatusOK),
18994		autorest.ByUnmarshallingJSON(&result),
18995		autorest.ByClosing())
18996	result.Response = autorest.Response{Response: resp}
18997	return
18998}
18999
19000// listConfigurationsSlotNextResults retrieves the next set of results, if any.
19001func (client AppsClient) listConfigurationsSlotNextResults(ctx context.Context, lastResults SiteConfigResourceCollection) (result SiteConfigResourceCollection, err error) {
19002	req, err := lastResults.siteConfigResourceCollectionPreparer(ctx)
19003	if err != nil {
19004		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", nil, "Failure preparing next results request")
19005	}
19006	if req == nil {
19007		return
19008	}
19009	resp, err := client.ListConfigurationsSlotSender(req)
19010	if err != nil {
19011		result.Response = autorest.Response{Response: resp}
19012		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure sending next results request")
19013	}
19014	result, err = client.ListConfigurationsSlotResponder(resp)
19015	if err != nil {
19016		err = autorest.NewErrorWithError(err, "web.AppsClient", "listConfigurationsSlotNextResults", resp, "Failure responding to next results request")
19017	}
19018	return
19019}
19020
19021// ListConfigurationsSlotComplete enumerates all values, automatically crossing page boundaries as required.
19022func (client AppsClient) ListConfigurationsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteConfigResourceCollectionIterator, err error) {
19023	if tracing.IsEnabled() {
19024		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConfigurationsSlot")
19025		defer func() {
19026			sc := -1
19027			if result.Response().Response.Response != nil {
19028				sc = result.page.Response().Response.Response.StatusCode
19029			}
19030			tracing.EndSpan(ctx, sc, err)
19031		}()
19032	}
19033	result.page, err = client.ListConfigurationsSlot(ctx, resourceGroupName, name, slot)
19034	return
19035}
19036
19037// ListConnectionStrings description for Gets the connection strings of an app.
19038// Parameters:
19039// resourceGroupName - name of the resource group to which the resource belongs.
19040// name - name of the app.
19041func (client AppsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, name string) (result ConnectionStringDictionary, err error) {
19042	if tracing.IsEnabled() {
19043		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStrings")
19044		defer func() {
19045			sc := -1
19046			if result.Response.Response != nil {
19047				sc = result.Response.Response.StatusCode
19048			}
19049			tracing.EndSpan(ctx, sc, err)
19050		}()
19051	}
19052	if err := validation.Validate([]validation.Validation{
19053		{TargetValue: resourceGroupName,
19054			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19055				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19056				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19057		return result, validation.NewError("web.AppsClient", "ListConnectionStrings", err.Error())
19058	}
19059
19060	req, err := client.ListConnectionStringsPreparer(ctx, resourceGroupName, name)
19061	if err != nil {
19062		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", nil, "Failure preparing request")
19063		return
19064	}
19065
19066	resp, err := client.ListConnectionStringsSender(req)
19067	if err != nil {
19068		result.Response = autorest.Response{Response: resp}
19069		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure sending request")
19070		return
19071	}
19072
19073	result, err = client.ListConnectionStringsResponder(resp)
19074	if err != nil {
19075		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStrings", resp, "Failure responding to request")
19076		return
19077	}
19078
19079	return
19080}
19081
19082// ListConnectionStringsPreparer prepares the ListConnectionStrings request.
19083func (client AppsClient) ListConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19084	pathParameters := map[string]interface{}{
19085		"name":              autorest.Encode("path", name),
19086		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19087		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19088	}
19089
19090	const APIVersion = "2020-09-01"
19091	queryParameters := map[string]interface{}{
19092		"api-version": APIVersion,
19093	}
19094
19095	preparer := autorest.CreatePreparer(
19096		autorest.AsPost(),
19097		autorest.WithBaseURL(client.BaseURI),
19098		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list", pathParameters),
19099		autorest.WithQueryParameters(queryParameters))
19100	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19101}
19102
19103// ListConnectionStringsSender sends the ListConnectionStrings request. The method will close the
19104// http.Response Body if it receives an error.
19105func (client AppsClient) ListConnectionStringsSender(req *http.Request) (*http.Response, error) {
19106	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19107}
19108
19109// ListConnectionStringsResponder handles the response to the ListConnectionStrings request. The method always
19110// closes the http.Response Body.
19111func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
19112	err = autorest.Respond(
19113		resp,
19114		azure.WithErrorUnlessStatusCode(http.StatusOK),
19115		autorest.ByUnmarshallingJSON(&result),
19116		autorest.ByClosing())
19117	result.Response = autorest.Response{Response: resp}
19118	return
19119}
19120
19121// ListConnectionStringsSlot description for Gets the connection strings of an app.
19122// Parameters:
19123// resourceGroupName - name of the resource group to which the resource belongs.
19124// name - name of the app.
19125// slot - name of the deployment slot. If a slot is not specified, the API will get the connection settings for
19126// the production slot.
19127func (client AppsClient) ListConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) {
19128	if tracing.IsEnabled() {
19129		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListConnectionStringsSlot")
19130		defer func() {
19131			sc := -1
19132			if result.Response.Response != nil {
19133				sc = result.Response.Response.StatusCode
19134			}
19135			tracing.EndSpan(ctx, sc, err)
19136		}()
19137	}
19138	if err := validation.Validate([]validation.Validation{
19139		{TargetValue: resourceGroupName,
19140			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19141				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19142				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19143		return result, validation.NewError("web.AppsClient", "ListConnectionStringsSlot", err.Error())
19144	}
19145
19146	req, err := client.ListConnectionStringsSlotPreparer(ctx, resourceGroupName, name, slot)
19147	if err != nil {
19148		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", nil, "Failure preparing request")
19149		return
19150	}
19151
19152	resp, err := client.ListConnectionStringsSlotSender(req)
19153	if err != nil {
19154		result.Response = autorest.Response{Response: resp}
19155		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure sending request")
19156		return
19157	}
19158
19159	result, err = client.ListConnectionStringsSlotResponder(resp)
19160	if err != nil {
19161		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListConnectionStringsSlot", resp, "Failure responding to request")
19162		return
19163	}
19164
19165	return
19166}
19167
19168// ListConnectionStringsSlotPreparer prepares the ListConnectionStringsSlot request.
19169func (client AppsClient) ListConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19170	pathParameters := map[string]interface{}{
19171		"name":              autorest.Encode("path", name),
19172		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19173		"slot":              autorest.Encode("path", slot),
19174		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19175	}
19176
19177	const APIVersion = "2020-09-01"
19178	queryParameters := map[string]interface{}{
19179		"api-version": APIVersion,
19180	}
19181
19182	preparer := autorest.CreatePreparer(
19183		autorest.AsPost(),
19184		autorest.WithBaseURL(client.BaseURI),
19185		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list", pathParameters),
19186		autorest.WithQueryParameters(queryParameters))
19187	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19188}
19189
19190// ListConnectionStringsSlotSender sends the ListConnectionStringsSlot request. The method will close the
19191// http.Response Body if it receives an error.
19192func (client AppsClient) ListConnectionStringsSlotSender(req *http.Request) (*http.Response, error) {
19193	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19194}
19195
19196// ListConnectionStringsSlotResponder handles the response to the ListConnectionStringsSlot request. The method always
19197// closes the http.Response Body.
19198func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
19199	err = autorest.Respond(
19200		resp,
19201		azure.WithErrorUnlessStatusCode(http.StatusOK),
19202		autorest.ByUnmarshallingJSON(&result),
19203		autorest.ByClosing())
19204	result.Response = autorest.Response{Response: resp}
19205	return
19206}
19207
19208// ListContinuousWebJobs description for List continuous web jobs for an app, or a deployment slot.
19209// Parameters:
19210// resourceGroupName - name of the resource group to which the resource belongs.
19211// name - site name.
19212func (client AppsClient) ListContinuousWebJobs(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionPage, err error) {
19213	if tracing.IsEnabled() {
19214		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs")
19215		defer func() {
19216			sc := -1
19217			if result.cwjc.Response.Response != nil {
19218				sc = result.cwjc.Response.Response.StatusCode
19219			}
19220			tracing.EndSpan(ctx, sc, err)
19221		}()
19222	}
19223	if err := validation.Validate([]validation.Validation{
19224		{TargetValue: resourceGroupName,
19225			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19226				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19227				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19228		return result, validation.NewError("web.AppsClient", "ListContinuousWebJobs", err.Error())
19229	}
19230
19231	result.fn = client.listContinuousWebJobsNextResults
19232	req, err := client.ListContinuousWebJobsPreparer(ctx, resourceGroupName, name)
19233	if err != nil {
19234		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request")
19235		return
19236	}
19237
19238	resp, err := client.ListContinuousWebJobsSender(req)
19239	if err != nil {
19240		result.cwjc.Response = autorest.Response{Response: resp}
19241		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request")
19242		return
19243	}
19244
19245	result.cwjc, err = client.ListContinuousWebJobsResponder(resp)
19246	if err != nil {
19247		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request")
19248		return
19249	}
19250	if result.cwjc.hasNextLink() && result.cwjc.IsEmpty() {
19251		err = result.NextWithContext(ctx)
19252		return
19253	}
19254
19255	return
19256}
19257
19258// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request.
19259func (client AppsClient) ListContinuousWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19260	pathParameters := map[string]interface{}{
19261		"name":              autorest.Encode("path", name),
19262		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19263		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19264	}
19265
19266	const APIVersion = "2020-09-01"
19267	queryParameters := map[string]interface{}{
19268		"api-version": APIVersion,
19269	}
19270
19271	preparer := autorest.CreatePreparer(
19272		autorest.AsGet(),
19273		autorest.WithBaseURL(client.BaseURI),
19274		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters),
19275		autorest.WithQueryParameters(queryParameters))
19276	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19277}
19278
19279// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the
19280// http.Response Body if it receives an error.
19281func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) {
19282	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19283}
19284
19285// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always
19286// closes the http.Response Body.
19287func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) {
19288	err = autorest.Respond(
19289		resp,
19290		azure.WithErrorUnlessStatusCode(http.StatusOK),
19291		autorest.ByUnmarshallingJSON(&result),
19292		autorest.ByClosing())
19293	result.Response = autorest.Response{Response: resp}
19294	return
19295}
19296
19297// listContinuousWebJobsNextResults retrieves the next set of results, if any.
19298func (client AppsClient) listContinuousWebJobsNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) {
19299	req, err := lastResults.continuousWebJobCollectionPreparer(ctx)
19300	if err != nil {
19301		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", nil, "Failure preparing next results request")
19302	}
19303	if req == nil {
19304		return
19305	}
19306	resp, err := client.ListContinuousWebJobsSender(req)
19307	if err != nil {
19308		result.Response = autorest.Response{Response: resp}
19309		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure sending next results request")
19310	}
19311	result, err = client.ListContinuousWebJobsResponder(resp)
19312	if err != nil {
19313		err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsNextResults", resp, "Failure responding to next results request")
19314	}
19315	return
19316}
19317
19318// ListContinuousWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
19319func (client AppsClient) ListContinuousWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result ContinuousWebJobCollectionIterator, err error) {
19320	if tracing.IsEnabled() {
19321		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobs")
19322		defer func() {
19323			sc := -1
19324			if result.Response().Response.Response != nil {
19325				sc = result.page.Response().Response.Response.StatusCode
19326			}
19327			tracing.EndSpan(ctx, sc, err)
19328		}()
19329	}
19330	result.page, err = client.ListContinuousWebJobs(ctx, resourceGroupName, name)
19331	return
19332}
19333
19334// ListContinuousWebJobsSlot description for List continuous web jobs for an app, or a deployment slot.
19335// Parameters:
19336// resourceGroupName - name of the resource group to which the resource belongs.
19337// name - site name.
19338// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
19339// production slot.
19340func (client AppsClient) ListContinuousWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionPage, err error) {
19341	if tracing.IsEnabled() {
19342		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot")
19343		defer func() {
19344			sc := -1
19345			if result.cwjc.Response.Response != nil {
19346				sc = result.cwjc.Response.Response.StatusCode
19347			}
19348			tracing.EndSpan(ctx, sc, err)
19349		}()
19350	}
19351	if err := validation.Validate([]validation.Validation{
19352		{TargetValue: resourceGroupName,
19353			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19354				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19355				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19356		return result, validation.NewError("web.AppsClient", "ListContinuousWebJobsSlot", err.Error())
19357	}
19358
19359	result.fn = client.listContinuousWebJobsSlotNextResults
19360	req, err := client.ListContinuousWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
19361	if err != nil {
19362		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request")
19363		return
19364	}
19365
19366	resp, err := client.ListContinuousWebJobsSlotSender(req)
19367	if err != nil {
19368		result.cwjc.Response = autorest.Response{Response: resp}
19369		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request")
19370		return
19371	}
19372
19373	result.cwjc, err = client.ListContinuousWebJobsSlotResponder(resp)
19374	if err != nil {
19375		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request")
19376		return
19377	}
19378	if result.cwjc.hasNextLink() && result.cwjc.IsEmpty() {
19379		err = result.NextWithContext(ctx)
19380		return
19381	}
19382
19383	return
19384}
19385
19386// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request.
19387func (client AppsClient) ListContinuousWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19388	pathParameters := map[string]interface{}{
19389		"name":              autorest.Encode("path", name),
19390		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19391		"slot":              autorest.Encode("path", slot),
19392		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19393	}
19394
19395	const APIVersion = "2020-09-01"
19396	queryParameters := map[string]interface{}{
19397		"api-version": APIVersion,
19398	}
19399
19400	preparer := autorest.CreatePreparer(
19401		autorest.AsGet(),
19402		autorest.WithBaseURL(client.BaseURI),
19403		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters),
19404		autorest.WithQueryParameters(queryParameters))
19405	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19406}
19407
19408// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the
19409// http.Response Body if it receives an error.
19410func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) {
19411	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19412}
19413
19414// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always
19415// closes the http.Response Body.
19416func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) {
19417	err = autorest.Respond(
19418		resp,
19419		azure.WithErrorUnlessStatusCode(http.StatusOK),
19420		autorest.ByUnmarshallingJSON(&result),
19421		autorest.ByClosing())
19422	result.Response = autorest.Response{Response: resp}
19423	return
19424}
19425
19426// listContinuousWebJobsSlotNextResults retrieves the next set of results, if any.
19427func (client AppsClient) listContinuousWebJobsSlotNextResults(ctx context.Context, lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) {
19428	req, err := lastResults.continuousWebJobCollectionPreparer(ctx)
19429	if err != nil {
19430		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", nil, "Failure preparing next results request")
19431	}
19432	if req == nil {
19433		return
19434	}
19435	resp, err := client.ListContinuousWebJobsSlotSender(req)
19436	if err != nil {
19437		result.Response = autorest.Response{Response: resp}
19438		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure sending next results request")
19439	}
19440	result, err = client.ListContinuousWebJobsSlotResponder(resp)
19441	if err != nil {
19442		err = autorest.NewErrorWithError(err, "web.AppsClient", "listContinuousWebJobsSlotNextResults", resp, "Failure responding to next results request")
19443	}
19444	return
19445}
19446
19447// ListContinuousWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
19448func (client AppsClient) ListContinuousWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ContinuousWebJobCollectionIterator, err error) {
19449	if tracing.IsEnabled() {
19450		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListContinuousWebJobsSlot")
19451		defer func() {
19452			sc := -1
19453			if result.Response().Response.Response != nil {
19454				sc = result.page.Response().Response.Response.StatusCode
19455			}
19456			tracing.EndSpan(ctx, sc, err)
19457		}()
19458	}
19459	result.page, err = client.ListContinuousWebJobsSlot(ctx, resourceGroupName, name, slot)
19460	return
19461}
19462
19463// ListDeploymentLog description for List deployment log for specific deployment for an app, or a deployment slot.
19464// Parameters:
19465// resourceGroupName - name of the resource group to which the resource belongs.
19466// name - name of the app.
19467// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET
19468// /api/sites/{siteName}/deployments".
19469func (client AppsClient) ListDeploymentLog(ctx context.Context, resourceGroupName string, name string, ID string) (result Deployment, err error) {
19470	if tracing.IsEnabled() {
19471		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLog")
19472		defer func() {
19473			sc := -1
19474			if result.Response.Response != nil {
19475				sc = result.Response.Response.StatusCode
19476			}
19477			tracing.EndSpan(ctx, sc, err)
19478		}()
19479	}
19480	if err := validation.Validate([]validation.Validation{
19481		{TargetValue: resourceGroupName,
19482			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19483				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19484				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19485		return result, validation.NewError("web.AppsClient", "ListDeploymentLog", err.Error())
19486	}
19487
19488	req, err := client.ListDeploymentLogPreparer(ctx, resourceGroupName, name, ID)
19489	if err != nil {
19490		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request")
19491		return
19492	}
19493
19494	resp, err := client.ListDeploymentLogSender(req)
19495	if err != nil {
19496		result.Response = autorest.Response{Response: resp}
19497		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request")
19498		return
19499	}
19500
19501	result, err = client.ListDeploymentLogResponder(resp)
19502	if err != nil {
19503		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request")
19504		return
19505	}
19506
19507	return
19508}
19509
19510// ListDeploymentLogPreparer prepares the ListDeploymentLog request.
19511func (client AppsClient) ListDeploymentLogPreparer(ctx context.Context, resourceGroupName string, name string, ID string) (*http.Request, error) {
19512	pathParameters := map[string]interface{}{
19513		"id":                autorest.Encode("path", ID),
19514		"name":              autorest.Encode("path", name),
19515		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19516		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19517	}
19518
19519	const APIVersion = "2020-09-01"
19520	queryParameters := map[string]interface{}{
19521		"api-version": APIVersion,
19522	}
19523
19524	preparer := autorest.CreatePreparer(
19525		autorest.AsGet(),
19526		autorest.WithBaseURL(client.BaseURI),
19527		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters),
19528		autorest.WithQueryParameters(queryParameters))
19529	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19530}
19531
19532// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the
19533// http.Response Body if it receives an error.
19534func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) {
19535	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19536}
19537
19538// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always
19539// closes the http.Response Body.
19540func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) {
19541	err = autorest.Respond(
19542		resp,
19543		azure.WithErrorUnlessStatusCode(http.StatusOK),
19544		autorest.ByUnmarshallingJSON(&result),
19545		autorest.ByClosing())
19546	result.Response = autorest.Response{Response: resp}
19547	return
19548}
19549
19550// ListDeploymentLogSlot description for List deployment log for specific deployment for an app, or a deployment slot.
19551// Parameters:
19552// resourceGroupName - name of the resource group to which the resource belongs.
19553// name - name of the app.
19554// ID - the ID of a specific deployment. This is the value of the name property in the JSON response from "GET
19555// /api/sites/{siteName}/deployments".
19556// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
19557// production slot.
19558func (client AppsClient) ListDeploymentLogSlot(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) {
19559	if tracing.IsEnabled() {
19560		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentLogSlot")
19561		defer func() {
19562			sc := -1
19563			if result.Response.Response != nil {
19564				sc = result.Response.Response.StatusCode
19565			}
19566			tracing.EndSpan(ctx, sc, err)
19567		}()
19568	}
19569	if err := validation.Validate([]validation.Validation{
19570		{TargetValue: resourceGroupName,
19571			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19572				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19573				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19574		return result, validation.NewError("web.AppsClient", "ListDeploymentLogSlot", err.Error())
19575	}
19576
19577	req, err := client.ListDeploymentLogSlotPreparer(ctx, resourceGroupName, name, ID, slot)
19578	if err != nil {
19579		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request")
19580		return
19581	}
19582
19583	resp, err := client.ListDeploymentLogSlotSender(req)
19584	if err != nil {
19585		result.Response = autorest.Response{Response: resp}
19586		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request")
19587		return
19588	}
19589
19590	result, err = client.ListDeploymentLogSlotResponder(resp)
19591	if err != nil {
19592		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request")
19593		return
19594	}
19595
19596	return
19597}
19598
19599// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request.
19600func (client AppsClient) ListDeploymentLogSlotPreparer(ctx context.Context, resourceGroupName string, name string, ID string, slot string) (*http.Request, error) {
19601	pathParameters := map[string]interface{}{
19602		"id":                autorest.Encode("path", ID),
19603		"name":              autorest.Encode("path", name),
19604		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19605		"slot":              autorest.Encode("path", slot),
19606		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19607	}
19608
19609	const APIVersion = "2020-09-01"
19610	queryParameters := map[string]interface{}{
19611		"api-version": APIVersion,
19612	}
19613
19614	preparer := autorest.CreatePreparer(
19615		autorest.AsGet(),
19616		autorest.WithBaseURL(client.BaseURI),
19617		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters),
19618		autorest.WithQueryParameters(queryParameters))
19619	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19620}
19621
19622// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the
19623// http.Response Body if it receives an error.
19624func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) {
19625	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19626}
19627
19628// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always
19629// closes the http.Response Body.
19630func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) {
19631	err = autorest.Respond(
19632		resp,
19633		azure.WithErrorUnlessStatusCode(http.StatusOK),
19634		autorest.ByUnmarshallingJSON(&result),
19635		autorest.ByClosing())
19636	result.Response = autorest.Response{Response: resp}
19637	return
19638}
19639
19640// ListDeployments description for List deployments for an app, or a deployment slot.
19641// Parameters:
19642// resourceGroupName - name of the resource group to which the resource belongs.
19643// name - name of the app.
19644func (client AppsClient) ListDeployments(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionPage, err error) {
19645	if tracing.IsEnabled() {
19646		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments")
19647		defer func() {
19648			sc := -1
19649			if result.dc.Response.Response != nil {
19650				sc = result.dc.Response.Response.StatusCode
19651			}
19652			tracing.EndSpan(ctx, sc, err)
19653		}()
19654	}
19655	if err := validation.Validate([]validation.Validation{
19656		{TargetValue: resourceGroupName,
19657			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19658				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19659				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19660		return result, validation.NewError("web.AppsClient", "ListDeployments", err.Error())
19661	}
19662
19663	result.fn = client.listDeploymentsNextResults
19664	req, err := client.ListDeploymentsPreparer(ctx, resourceGroupName, name)
19665	if err != nil {
19666		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", nil, "Failure preparing request")
19667		return
19668	}
19669
19670	resp, err := client.ListDeploymentsSender(req)
19671	if err != nil {
19672		result.dc.Response = autorest.Response{Response: resp}
19673		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure sending request")
19674		return
19675	}
19676
19677	result.dc, err = client.ListDeploymentsResponder(resp)
19678	if err != nil {
19679		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeployments", resp, "Failure responding to request")
19680		return
19681	}
19682	if result.dc.hasNextLink() && result.dc.IsEmpty() {
19683		err = result.NextWithContext(ctx)
19684		return
19685	}
19686
19687	return
19688}
19689
19690// ListDeploymentsPreparer prepares the ListDeployments request.
19691func (client AppsClient) ListDeploymentsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19692	pathParameters := map[string]interface{}{
19693		"name":              autorest.Encode("path", name),
19694		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19695		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19696	}
19697
19698	const APIVersion = "2020-09-01"
19699	queryParameters := map[string]interface{}{
19700		"api-version": APIVersion,
19701	}
19702
19703	preparer := autorest.CreatePreparer(
19704		autorest.AsGet(),
19705		autorest.WithBaseURL(client.BaseURI),
19706		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments", pathParameters),
19707		autorest.WithQueryParameters(queryParameters))
19708	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19709}
19710
19711// ListDeploymentsSender sends the ListDeployments request. The method will close the
19712// http.Response Body if it receives an error.
19713func (client AppsClient) ListDeploymentsSender(req *http.Request) (*http.Response, error) {
19714	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19715}
19716
19717// ListDeploymentsResponder handles the response to the ListDeployments request. The method always
19718// closes the http.Response Body.
19719func (client AppsClient) ListDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) {
19720	err = autorest.Respond(
19721		resp,
19722		azure.WithErrorUnlessStatusCode(http.StatusOK),
19723		autorest.ByUnmarshallingJSON(&result),
19724		autorest.ByClosing())
19725	result.Response = autorest.Response{Response: resp}
19726	return
19727}
19728
19729// listDeploymentsNextResults retrieves the next set of results, if any.
19730func (client AppsClient) listDeploymentsNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) {
19731	req, err := lastResults.deploymentCollectionPreparer(ctx)
19732	if err != nil {
19733		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", nil, "Failure preparing next results request")
19734	}
19735	if req == nil {
19736		return
19737	}
19738	resp, err := client.ListDeploymentsSender(req)
19739	if err != nil {
19740		result.Response = autorest.Response{Response: resp}
19741		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure sending next results request")
19742	}
19743	result, err = client.ListDeploymentsResponder(resp)
19744	if err != nil {
19745		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsNextResults", resp, "Failure responding to next results request")
19746	}
19747	return
19748}
19749
19750// ListDeploymentsComplete enumerates all values, automatically crossing page boundaries as required.
19751func (client AppsClient) ListDeploymentsComplete(ctx context.Context, resourceGroupName string, name string) (result DeploymentCollectionIterator, err error) {
19752	if tracing.IsEnabled() {
19753		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeployments")
19754		defer func() {
19755			sc := -1
19756			if result.Response().Response.Response != nil {
19757				sc = result.page.Response().Response.Response.StatusCode
19758			}
19759			tracing.EndSpan(ctx, sc, err)
19760		}()
19761	}
19762	result.page, err = client.ListDeployments(ctx, resourceGroupName, name)
19763	return
19764}
19765
19766// ListDeploymentsSlot description for List deployments for an app, or a deployment slot.
19767// Parameters:
19768// resourceGroupName - name of the resource group to which the resource belongs.
19769// name - name of the app.
19770// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
19771// production slot.
19772func (client AppsClient) ListDeploymentsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionPage, err error) {
19773	if tracing.IsEnabled() {
19774		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot")
19775		defer func() {
19776			sc := -1
19777			if result.dc.Response.Response != nil {
19778				sc = result.dc.Response.Response.StatusCode
19779			}
19780			tracing.EndSpan(ctx, sc, err)
19781		}()
19782	}
19783	if err := validation.Validate([]validation.Validation{
19784		{TargetValue: resourceGroupName,
19785			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19786				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19787				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19788		return result, validation.NewError("web.AppsClient", "ListDeploymentsSlot", err.Error())
19789	}
19790
19791	result.fn = client.listDeploymentsSlotNextResults
19792	req, err := client.ListDeploymentsSlotPreparer(ctx, resourceGroupName, name, slot)
19793	if err != nil {
19794		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", nil, "Failure preparing request")
19795		return
19796	}
19797
19798	resp, err := client.ListDeploymentsSlotSender(req)
19799	if err != nil {
19800		result.dc.Response = autorest.Response{Response: resp}
19801		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure sending request")
19802		return
19803	}
19804
19805	result.dc, err = client.ListDeploymentsSlotResponder(resp)
19806	if err != nil {
19807		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentsSlot", resp, "Failure responding to request")
19808		return
19809	}
19810	if result.dc.hasNextLink() && result.dc.IsEmpty() {
19811		err = result.NextWithContext(ctx)
19812		return
19813	}
19814
19815	return
19816}
19817
19818// ListDeploymentsSlotPreparer prepares the ListDeploymentsSlot request.
19819func (client AppsClient) ListDeploymentsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
19820	pathParameters := map[string]interface{}{
19821		"name":              autorest.Encode("path", name),
19822		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19823		"slot":              autorest.Encode("path", slot),
19824		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19825	}
19826
19827	const APIVersion = "2020-09-01"
19828	queryParameters := map[string]interface{}{
19829		"api-version": APIVersion,
19830	}
19831
19832	preparer := autorest.CreatePreparer(
19833		autorest.AsGet(),
19834		autorest.WithBaseURL(client.BaseURI),
19835		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments", pathParameters),
19836		autorest.WithQueryParameters(queryParameters))
19837	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19838}
19839
19840// ListDeploymentsSlotSender sends the ListDeploymentsSlot request. The method will close the
19841// http.Response Body if it receives an error.
19842func (client AppsClient) ListDeploymentsSlotSender(req *http.Request) (*http.Response, error) {
19843	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19844}
19845
19846// ListDeploymentsSlotResponder handles the response to the ListDeploymentsSlot request. The method always
19847// closes the http.Response Body.
19848func (client AppsClient) ListDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) {
19849	err = autorest.Respond(
19850		resp,
19851		azure.WithErrorUnlessStatusCode(http.StatusOK),
19852		autorest.ByUnmarshallingJSON(&result),
19853		autorest.ByClosing())
19854	result.Response = autorest.Response{Response: resp}
19855	return
19856}
19857
19858// listDeploymentsSlotNextResults retrieves the next set of results, if any.
19859func (client AppsClient) listDeploymentsSlotNextResults(ctx context.Context, lastResults DeploymentCollection) (result DeploymentCollection, err error) {
19860	req, err := lastResults.deploymentCollectionPreparer(ctx)
19861	if err != nil {
19862		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", nil, "Failure preparing next results request")
19863	}
19864	if req == nil {
19865		return
19866	}
19867	resp, err := client.ListDeploymentsSlotSender(req)
19868	if err != nil {
19869		result.Response = autorest.Response{Response: resp}
19870		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure sending next results request")
19871	}
19872	result, err = client.ListDeploymentsSlotResponder(resp)
19873	if err != nil {
19874		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDeploymentsSlotNextResults", resp, "Failure responding to next results request")
19875	}
19876	return
19877}
19878
19879// ListDeploymentsSlotComplete enumerates all values, automatically crossing page boundaries as required.
19880func (client AppsClient) ListDeploymentsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result DeploymentCollectionIterator, err error) {
19881	if tracing.IsEnabled() {
19882		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDeploymentsSlot")
19883		defer func() {
19884			sc := -1
19885			if result.Response().Response.Response != nil {
19886				sc = result.page.Response().Response.Response.StatusCode
19887			}
19888			tracing.EndSpan(ctx, sc, err)
19889		}()
19890	}
19891	result.page, err = client.ListDeploymentsSlot(ctx, resourceGroupName, name, slot)
19892	return
19893}
19894
19895// ListDomainOwnershipIdentifiers description for Lists ownership identifiers for domain associated with web app.
19896// Parameters:
19897// resourceGroupName - name of the resource group to which the resource belongs.
19898// name - name of the app.
19899func (client AppsClient) ListDomainOwnershipIdentifiers(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionPage, err error) {
19900	if tracing.IsEnabled() {
19901		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers")
19902		defer func() {
19903			sc := -1
19904			if result.ic.Response.Response != nil {
19905				sc = result.ic.Response.Response.StatusCode
19906			}
19907			tracing.EndSpan(ctx, sc, err)
19908		}()
19909	}
19910	if err := validation.Validate([]validation.Validation{
19911		{TargetValue: resourceGroupName,
19912			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
19913				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
19914				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
19915		return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiers", err.Error())
19916	}
19917
19918	result.fn = client.listDomainOwnershipIdentifiersNextResults
19919	req, err := client.ListDomainOwnershipIdentifiersPreparer(ctx, resourceGroupName, name)
19920	if err != nil {
19921		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", nil, "Failure preparing request")
19922		return
19923	}
19924
19925	resp, err := client.ListDomainOwnershipIdentifiersSender(req)
19926	if err != nil {
19927		result.ic.Response = autorest.Response{Response: resp}
19928		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure sending request")
19929		return
19930	}
19931
19932	result.ic, err = client.ListDomainOwnershipIdentifiersResponder(resp)
19933	if err != nil {
19934		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiers", resp, "Failure responding to request")
19935		return
19936	}
19937	if result.ic.hasNextLink() && result.ic.IsEmpty() {
19938		err = result.NextWithContext(ctx)
19939		return
19940	}
19941
19942	return
19943}
19944
19945// ListDomainOwnershipIdentifiersPreparer prepares the ListDomainOwnershipIdentifiers request.
19946func (client AppsClient) ListDomainOwnershipIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
19947	pathParameters := map[string]interface{}{
19948		"name":              autorest.Encode("path", name),
19949		"resourceGroupName": autorest.Encode("path", resourceGroupName),
19950		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
19951	}
19952
19953	const APIVersion = "2020-09-01"
19954	queryParameters := map[string]interface{}{
19955		"api-version": APIVersion,
19956	}
19957
19958	preparer := autorest.CreatePreparer(
19959		autorest.AsGet(),
19960		autorest.WithBaseURL(client.BaseURI),
19961		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers", pathParameters),
19962		autorest.WithQueryParameters(queryParameters))
19963	return preparer.Prepare((&http.Request{}).WithContext(ctx))
19964}
19965
19966// ListDomainOwnershipIdentifiersSender sends the ListDomainOwnershipIdentifiers request. The method will close the
19967// http.Response Body if it receives an error.
19968func (client AppsClient) ListDomainOwnershipIdentifiersSender(req *http.Request) (*http.Response, error) {
19969	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
19970}
19971
19972// ListDomainOwnershipIdentifiersResponder handles the response to the ListDomainOwnershipIdentifiers request. The method always
19973// closes the http.Response Body.
19974func (client AppsClient) ListDomainOwnershipIdentifiersResponder(resp *http.Response) (result IdentifierCollection, err error) {
19975	err = autorest.Respond(
19976		resp,
19977		azure.WithErrorUnlessStatusCode(http.StatusOK),
19978		autorest.ByUnmarshallingJSON(&result),
19979		autorest.ByClosing())
19980	result.Response = autorest.Response{Response: resp}
19981	return
19982}
19983
19984// listDomainOwnershipIdentifiersNextResults retrieves the next set of results, if any.
19985func (client AppsClient) listDomainOwnershipIdentifiersNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) {
19986	req, err := lastResults.identifierCollectionPreparer(ctx)
19987	if err != nil {
19988		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", nil, "Failure preparing next results request")
19989	}
19990	if req == nil {
19991		return
19992	}
19993	resp, err := client.ListDomainOwnershipIdentifiersSender(req)
19994	if err != nil {
19995		result.Response = autorest.Response{Response: resp}
19996		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure sending next results request")
19997	}
19998	result, err = client.ListDomainOwnershipIdentifiersResponder(resp)
19999	if err != nil {
20000		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersNextResults", resp, "Failure responding to next results request")
20001	}
20002	return
20003}
20004
20005// ListDomainOwnershipIdentifiersComplete enumerates all values, automatically crossing page boundaries as required.
20006func (client AppsClient) ListDomainOwnershipIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result IdentifierCollectionIterator, err error) {
20007	if tracing.IsEnabled() {
20008		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiers")
20009		defer func() {
20010			sc := -1
20011			if result.Response().Response.Response != nil {
20012				sc = result.page.Response().Response.Response.StatusCode
20013			}
20014			tracing.EndSpan(ctx, sc, err)
20015		}()
20016	}
20017	result.page, err = client.ListDomainOwnershipIdentifiers(ctx, resourceGroupName, name)
20018	return
20019}
20020
20021// ListDomainOwnershipIdentifiersSlot description for Lists ownership identifiers for domain associated with web app.
20022// Parameters:
20023// resourceGroupName - name of the resource group to which the resource belongs.
20024// name - name of the app.
20025// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
20026// production slot.
20027func (client AppsClient) ListDomainOwnershipIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionPage, err error) {
20028	if tracing.IsEnabled() {
20029		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot")
20030		defer func() {
20031			sc := -1
20032			if result.ic.Response.Response != nil {
20033				sc = result.ic.Response.Response.StatusCode
20034			}
20035			tracing.EndSpan(ctx, sc, err)
20036		}()
20037	}
20038	if err := validation.Validate([]validation.Validation{
20039		{TargetValue: resourceGroupName,
20040			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20041				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20042				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20043		return result, validation.NewError("web.AppsClient", "ListDomainOwnershipIdentifiersSlot", err.Error())
20044	}
20045
20046	result.fn = client.listDomainOwnershipIdentifiersSlotNextResults
20047	req, err := client.ListDomainOwnershipIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot)
20048	if err != nil {
20049		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", nil, "Failure preparing request")
20050		return
20051	}
20052
20053	resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req)
20054	if err != nil {
20055		result.ic.Response = autorest.Response{Response: resp}
20056		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure sending request")
20057		return
20058	}
20059
20060	result.ic, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp)
20061	if err != nil {
20062		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDomainOwnershipIdentifiersSlot", resp, "Failure responding to request")
20063		return
20064	}
20065	if result.ic.hasNextLink() && result.ic.IsEmpty() {
20066		err = result.NextWithContext(ctx)
20067		return
20068	}
20069
20070	return
20071}
20072
20073// ListDomainOwnershipIdentifiersSlotPreparer prepares the ListDomainOwnershipIdentifiersSlot request.
20074func (client AppsClient) ListDomainOwnershipIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20075	pathParameters := map[string]interface{}{
20076		"name":              autorest.Encode("path", name),
20077		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20078		"slot":              autorest.Encode("path", slot),
20079		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20080	}
20081
20082	const APIVersion = "2020-09-01"
20083	queryParameters := map[string]interface{}{
20084		"api-version": APIVersion,
20085	}
20086
20087	preparer := autorest.CreatePreparer(
20088		autorest.AsGet(),
20089		autorest.WithBaseURL(client.BaseURI),
20090		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers", pathParameters),
20091		autorest.WithQueryParameters(queryParameters))
20092	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20093}
20094
20095// ListDomainOwnershipIdentifiersSlotSender sends the ListDomainOwnershipIdentifiersSlot request. The method will close the
20096// http.Response Body if it receives an error.
20097func (client AppsClient) ListDomainOwnershipIdentifiersSlotSender(req *http.Request) (*http.Response, error) {
20098	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20099}
20100
20101// ListDomainOwnershipIdentifiersSlotResponder handles the response to the ListDomainOwnershipIdentifiersSlot request. The method always
20102// closes the http.Response Body.
20103func (client AppsClient) ListDomainOwnershipIdentifiersSlotResponder(resp *http.Response) (result IdentifierCollection, err error) {
20104	err = autorest.Respond(
20105		resp,
20106		azure.WithErrorUnlessStatusCode(http.StatusOK),
20107		autorest.ByUnmarshallingJSON(&result),
20108		autorest.ByClosing())
20109	result.Response = autorest.Response{Response: resp}
20110	return
20111}
20112
20113// listDomainOwnershipIdentifiersSlotNextResults retrieves the next set of results, if any.
20114func (client AppsClient) listDomainOwnershipIdentifiersSlotNextResults(ctx context.Context, lastResults IdentifierCollection) (result IdentifierCollection, err error) {
20115	req, err := lastResults.identifierCollectionPreparer(ctx)
20116	if err != nil {
20117		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", nil, "Failure preparing next results request")
20118	}
20119	if req == nil {
20120		return
20121	}
20122	resp, err := client.ListDomainOwnershipIdentifiersSlotSender(req)
20123	if err != nil {
20124		result.Response = autorest.Response{Response: resp}
20125		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure sending next results request")
20126	}
20127	result, err = client.ListDomainOwnershipIdentifiersSlotResponder(resp)
20128	if err != nil {
20129		err = autorest.NewErrorWithError(err, "web.AppsClient", "listDomainOwnershipIdentifiersSlotNextResults", resp, "Failure responding to next results request")
20130	}
20131	return
20132}
20133
20134// ListDomainOwnershipIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required.
20135func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result IdentifierCollectionIterator, err error) {
20136	if tracing.IsEnabled() {
20137		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListDomainOwnershipIdentifiersSlot")
20138		defer func() {
20139			sc := -1
20140			if result.Response().Response.Response != nil {
20141				sc = result.page.Response().Response.Response.StatusCode
20142			}
20143			tracing.EndSpan(ctx, sc, err)
20144		}()
20145	}
20146	result.page, err = client.ListDomainOwnershipIdentifiersSlot(ctx, resourceGroupName, name, slot)
20147	return
20148}
20149
20150// ListFunctionKeys description for Get function keys for a function in a web site, or a deployment slot.
20151// Parameters:
20152// resourceGroupName - name of the resource group to which the resource belongs.
20153// name - site name.
20154// functionName - function name.
20155func (client AppsClient) ListFunctionKeys(ctx context.Context, resourceGroupName string, name string, functionName string) (result StringDictionary, err error) {
20156	if tracing.IsEnabled() {
20157		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeys")
20158		defer func() {
20159			sc := -1
20160			if result.Response.Response != nil {
20161				sc = result.Response.Response.StatusCode
20162			}
20163			tracing.EndSpan(ctx, sc, err)
20164		}()
20165	}
20166	if err := validation.Validate([]validation.Validation{
20167		{TargetValue: resourceGroupName,
20168			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20169				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20170				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20171		return result, validation.NewError("web.AppsClient", "ListFunctionKeys", err.Error())
20172	}
20173
20174	req, err := client.ListFunctionKeysPreparer(ctx, resourceGroupName, name, functionName)
20175	if err != nil {
20176		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", nil, "Failure preparing request")
20177		return
20178	}
20179
20180	resp, err := client.ListFunctionKeysSender(req)
20181	if err != nil {
20182		result.Response = autorest.Response{Response: resp}
20183		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure sending request")
20184		return
20185	}
20186
20187	result, err = client.ListFunctionKeysResponder(resp)
20188	if err != nil {
20189		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeys", resp, "Failure responding to request")
20190		return
20191	}
20192
20193	return
20194}
20195
20196// ListFunctionKeysPreparer prepares the ListFunctionKeys request.
20197func (client AppsClient) ListFunctionKeysPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
20198	pathParameters := map[string]interface{}{
20199		"functionName":      autorest.Encode("path", functionName),
20200		"name":              autorest.Encode("path", name),
20201		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20202		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20203	}
20204
20205	const APIVersion = "2020-09-01"
20206	queryParameters := map[string]interface{}{
20207		"api-version": APIVersion,
20208	}
20209
20210	preparer := autorest.CreatePreparer(
20211		autorest.AsPost(),
20212		autorest.WithBaseURL(client.BaseURI),
20213		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys", pathParameters),
20214		autorest.WithQueryParameters(queryParameters))
20215	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20216}
20217
20218// ListFunctionKeysSender sends the ListFunctionKeys request. The method will close the
20219// http.Response Body if it receives an error.
20220func (client AppsClient) ListFunctionKeysSender(req *http.Request) (*http.Response, error) {
20221	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20222}
20223
20224// ListFunctionKeysResponder handles the response to the ListFunctionKeys request. The method always
20225// closes the http.Response Body.
20226func (client AppsClient) ListFunctionKeysResponder(resp *http.Response) (result StringDictionary, err error) {
20227	err = autorest.Respond(
20228		resp,
20229		azure.WithErrorUnlessStatusCode(http.StatusOK),
20230		autorest.ByUnmarshallingJSON(&result),
20231		autorest.ByClosing())
20232	result.Response = autorest.Response{Response: resp}
20233	return
20234}
20235
20236// ListFunctionKeysSlot description for Get function keys for a function in a web site, or a deployment slot.
20237// Parameters:
20238// resourceGroupName - name of the resource group to which the resource belongs.
20239// name - site name.
20240// functionName - function name.
20241// slot - name of the deployment slot.
20242func (client AppsClient) ListFunctionKeysSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result StringDictionary, err error) {
20243	if tracing.IsEnabled() {
20244		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionKeysSlot")
20245		defer func() {
20246			sc := -1
20247			if result.Response.Response != nil {
20248				sc = result.Response.Response.StatusCode
20249			}
20250			tracing.EndSpan(ctx, sc, err)
20251		}()
20252	}
20253	if err := validation.Validate([]validation.Validation{
20254		{TargetValue: resourceGroupName,
20255			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20256				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20257				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20258		return result, validation.NewError("web.AppsClient", "ListFunctionKeysSlot", err.Error())
20259	}
20260
20261	req, err := client.ListFunctionKeysSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
20262	if err != nil {
20263		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", nil, "Failure preparing request")
20264		return
20265	}
20266
20267	resp, err := client.ListFunctionKeysSlotSender(req)
20268	if err != nil {
20269		result.Response = autorest.Response{Response: resp}
20270		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure sending request")
20271		return
20272	}
20273
20274	result, err = client.ListFunctionKeysSlotResponder(resp)
20275	if err != nil {
20276		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionKeysSlot", resp, "Failure responding to request")
20277		return
20278	}
20279
20280	return
20281}
20282
20283// ListFunctionKeysSlotPreparer prepares the ListFunctionKeysSlot request.
20284func (client AppsClient) ListFunctionKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
20285	pathParameters := map[string]interface{}{
20286		"functionName":      autorest.Encode("path", functionName),
20287		"name":              autorest.Encode("path", name),
20288		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20289		"slot":              autorest.Encode("path", slot),
20290		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20291	}
20292
20293	const APIVersion = "2020-09-01"
20294	queryParameters := map[string]interface{}{
20295		"api-version": APIVersion,
20296	}
20297
20298	preparer := autorest.CreatePreparer(
20299		autorest.AsPost(),
20300		autorest.WithBaseURL(client.BaseURI),
20301		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys", pathParameters),
20302		autorest.WithQueryParameters(queryParameters))
20303	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20304}
20305
20306// ListFunctionKeysSlotSender sends the ListFunctionKeysSlot request. The method will close the
20307// http.Response Body if it receives an error.
20308func (client AppsClient) ListFunctionKeysSlotSender(req *http.Request) (*http.Response, error) {
20309	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20310}
20311
20312// ListFunctionKeysSlotResponder handles the response to the ListFunctionKeysSlot request. The method always
20313// closes the http.Response Body.
20314func (client AppsClient) ListFunctionKeysSlotResponder(resp *http.Response) (result StringDictionary, err error) {
20315	err = autorest.Respond(
20316		resp,
20317		azure.WithErrorUnlessStatusCode(http.StatusOK),
20318		autorest.ByUnmarshallingJSON(&result),
20319		autorest.ByClosing())
20320	result.Response = autorest.Response{Response: resp}
20321	return
20322}
20323
20324// ListFunctions description for List the functions for a web site, or a deployment slot.
20325// Parameters:
20326// resourceGroupName - name of the resource group to which the resource belongs.
20327// name - site name.
20328func (client AppsClient) ListFunctions(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionPage, err error) {
20329	if tracing.IsEnabled() {
20330		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions")
20331		defer func() {
20332			sc := -1
20333			if result.fec.Response.Response != nil {
20334				sc = result.fec.Response.Response.StatusCode
20335			}
20336			tracing.EndSpan(ctx, sc, err)
20337		}()
20338	}
20339	if err := validation.Validate([]validation.Validation{
20340		{TargetValue: resourceGroupName,
20341			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20342				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20343				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20344		return result, validation.NewError("web.AppsClient", "ListFunctions", err.Error())
20345	}
20346
20347	result.fn = client.listFunctionsNextResults
20348	req, err := client.ListFunctionsPreparer(ctx, resourceGroupName, name)
20349	if err != nil {
20350		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request")
20351		return
20352	}
20353
20354	resp, err := client.ListFunctionsSender(req)
20355	if err != nil {
20356		result.fec.Response = autorest.Response{Response: resp}
20357		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request")
20358		return
20359	}
20360
20361	result.fec, err = client.ListFunctionsResponder(resp)
20362	if err != nil {
20363		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request")
20364		return
20365	}
20366	if result.fec.hasNextLink() && result.fec.IsEmpty() {
20367		err = result.NextWithContext(ctx)
20368		return
20369	}
20370
20371	return
20372}
20373
20374// ListFunctionsPreparer prepares the ListFunctions request.
20375func (client AppsClient) ListFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20376	pathParameters := map[string]interface{}{
20377		"name":              autorest.Encode("path", name),
20378		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20379		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20380	}
20381
20382	const APIVersion = "2020-09-01"
20383	queryParameters := map[string]interface{}{
20384		"api-version": APIVersion,
20385	}
20386
20387	preparer := autorest.CreatePreparer(
20388		autorest.AsGet(),
20389		autorest.WithBaseURL(client.BaseURI),
20390		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters),
20391		autorest.WithQueryParameters(queryParameters))
20392	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20393}
20394
20395// ListFunctionsSender sends the ListFunctions request. The method will close the
20396// http.Response Body if it receives an error.
20397func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) {
20398	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20399}
20400
20401// ListFunctionsResponder handles the response to the ListFunctions request. The method always
20402// closes the http.Response Body.
20403func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) {
20404	err = autorest.Respond(
20405		resp,
20406		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
20407		autorest.ByUnmarshallingJSON(&result),
20408		autorest.ByClosing())
20409	result.Response = autorest.Response{Response: resp}
20410	return
20411}
20412
20413// listFunctionsNextResults retrieves the next set of results, if any.
20414func (client AppsClient) listFunctionsNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) {
20415	req, err := lastResults.functionEnvelopeCollectionPreparer(ctx)
20416	if err != nil {
20417		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", nil, "Failure preparing next results request")
20418	}
20419	if req == nil {
20420		return
20421	}
20422	resp, err := client.ListFunctionsSender(req)
20423	if err != nil {
20424		result.Response = autorest.Response{Response: resp}
20425		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure sending next results request")
20426	}
20427	result, err = client.ListFunctionsResponder(resp)
20428	if err != nil {
20429		err = autorest.NewErrorWithError(err, "web.AppsClient", "listFunctionsNextResults", resp, "Failure responding to next results request")
20430	}
20431	return
20432}
20433
20434// ListFunctionsComplete enumerates all values, automatically crossing page boundaries as required.
20435func (client AppsClient) ListFunctionsComplete(ctx context.Context, resourceGroupName string, name string) (result FunctionEnvelopeCollectionIterator, err error) {
20436	if tracing.IsEnabled() {
20437		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctions")
20438		defer func() {
20439			sc := -1
20440			if result.Response().Response.Response != nil {
20441				sc = result.page.Response().Response.Response.StatusCode
20442			}
20443			tracing.EndSpan(ctx, sc, err)
20444		}()
20445	}
20446	result.page, err = client.ListFunctions(ctx, resourceGroupName, name)
20447	return
20448}
20449
20450// ListFunctionSecrets description for Get function secrets for a function in a web site, or a deployment slot.
20451// Parameters:
20452// resourceGroupName - name of the resource group to which the resource belongs.
20453// name - site name.
20454// functionName - function name.
20455func (client AppsClient) ListFunctionSecrets(ctx context.Context, resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) {
20456	if tracing.IsEnabled() {
20457		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecrets")
20458		defer func() {
20459			sc := -1
20460			if result.Response.Response != nil {
20461				sc = result.Response.Response.StatusCode
20462			}
20463			tracing.EndSpan(ctx, sc, err)
20464		}()
20465	}
20466	if err := validation.Validate([]validation.Validation{
20467		{TargetValue: resourceGroupName,
20468			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20469				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20470				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20471		return result, validation.NewError("web.AppsClient", "ListFunctionSecrets", err.Error())
20472	}
20473
20474	req, err := client.ListFunctionSecretsPreparer(ctx, resourceGroupName, name, functionName)
20475	if err != nil {
20476		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request")
20477		return
20478	}
20479
20480	resp, err := client.ListFunctionSecretsSender(req)
20481	if err != nil {
20482		result.Response = autorest.Response{Response: resp}
20483		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request")
20484		return
20485	}
20486
20487	result, err = client.ListFunctionSecretsResponder(resp)
20488	if err != nil {
20489		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request")
20490		return
20491	}
20492
20493	return
20494}
20495
20496// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request.
20497func (client AppsClient) ListFunctionSecretsPreparer(ctx context.Context, resourceGroupName string, name string, functionName string) (*http.Request, error) {
20498	pathParameters := map[string]interface{}{
20499		"functionName":      autorest.Encode("path", functionName),
20500		"name":              autorest.Encode("path", name),
20501		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20502		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20503	}
20504
20505	const APIVersion = "2020-09-01"
20506	queryParameters := map[string]interface{}{
20507		"api-version": APIVersion,
20508	}
20509
20510	preparer := autorest.CreatePreparer(
20511		autorest.AsPost(),
20512		autorest.WithBaseURL(client.BaseURI),
20513		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters),
20514		autorest.WithQueryParameters(queryParameters))
20515	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20516}
20517
20518// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the
20519// http.Response Body if it receives an error.
20520func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) {
20521	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20522}
20523
20524// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always
20525// closes the http.Response Body.
20526func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) {
20527	err = autorest.Respond(
20528		resp,
20529		azure.WithErrorUnlessStatusCode(http.StatusOK),
20530		autorest.ByUnmarshallingJSON(&result),
20531		autorest.ByClosing())
20532	result.Response = autorest.Response{Response: resp}
20533	return
20534}
20535
20536// ListFunctionSecretsSlot description for Get function secrets for a function in a web site, or a deployment slot.
20537// Parameters:
20538// resourceGroupName - name of the resource group to which the resource belongs.
20539// name - site name.
20540// functionName - function name.
20541// slot - name of the deployment slot.
20542func (client AppsClient) ListFunctionSecretsSlot(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) {
20543	if tracing.IsEnabled() {
20544		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListFunctionSecretsSlot")
20545		defer func() {
20546			sc := -1
20547			if result.Response.Response != nil {
20548				sc = result.Response.Response.StatusCode
20549			}
20550			tracing.EndSpan(ctx, sc, err)
20551		}()
20552	}
20553	if err := validation.Validate([]validation.Validation{
20554		{TargetValue: resourceGroupName,
20555			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20556				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20557				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20558		return result, validation.NewError("web.AppsClient", "ListFunctionSecretsSlot", err.Error())
20559	}
20560
20561	req, err := client.ListFunctionSecretsSlotPreparer(ctx, resourceGroupName, name, functionName, slot)
20562	if err != nil {
20563		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request")
20564		return
20565	}
20566
20567	resp, err := client.ListFunctionSecretsSlotSender(req)
20568	if err != nil {
20569		result.Response = autorest.Response{Response: resp}
20570		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request")
20571		return
20572	}
20573
20574	result, err = client.ListFunctionSecretsSlotResponder(resp)
20575	if err != nil {
20576		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request")
20577		return
20578	}
20579
20580	return
20581}
20582
20583// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request.
20584func (client AppsClient) ListFunctionSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) {
20585	pathParameters := map[string]interface{}{
20586		"functionName":      autorest.Encode("path", functionName),
20587		"name":              autorest.Encode("path", name),
20588		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20589		"slot":              autorest.Encode("path", slot),
20590		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20591	}
20592
20593	const APIVersion = "2020-09-01"
20594	queryParameters := map[string]interface{}{
20595		"api-version": APIVersion,
20596	}
20597
20598	preparer := autorest.CreatePreparer(
20599		autorest.AsPost(),
20600		autorest.WithBaseURL(client.BaseURI),
20601		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters),
20602		autorest.WithQueryParameters(queryParameters))
20603	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20604}
20605
20606// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the
20607// http.Response Body if it receives an error.
20608func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) {
20609	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20610}
20611
20612// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always
20613// closes the http.Response Body.
20614func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) {
20615	err = autorest.Respond(
20616		resp,
20617		azure.WithErrorUnlessStatusCode(http.StatusOK),
20618		autorest.ByUnmarshallingJSON(&result),
20619		autorest.ByClosing())
20620	result.Response = autorest.Response{Response: resp}
20621	return
20622}
20623
20624// ListHostKeys description for Get host secrets for a function app.
20625// Parameters:
20626// resourceGroupName - name of the resource group to which the resource belongs.
20627// name - site name.
20628func (client AppsClient) ListHostKeys(ctx context.Context, resourceGroupName string, name string) (result HostKeys, err error) {
20629	if tracing.IsEnabled() {
20630		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeys")
20631		defer func() {
20632			sc := -1
20633			if result.Response.Response != nil {
20634				sc = result.Response.Response.StatusCode
20635			}
20636			tracing.EndSpan(ctx, sc, err)
20637		}()
20638	}
20639	if err := validation.Validate([]validation.Validation{
20640		{TargetValue: resourceGroupName,
20641			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20642				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20643				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20644		return result, validation.NewError("web.AppsClient", "ListHostKeys", err.Error())
20645	}
20646
20647	req, err := client.ListHostKeysPreparer(ctx, resourceGroupName, name)
20648	if err != nil {
20649		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", nil, "Failure preparing request")
20650		return
20651	}
20652
20653	resp, err := client.ListHostKeysSender(req)
20654	if err != nil {
20655		result.Response = autorest.Response{Response: resp}
20656		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure sending request")
20657		return
20658	}
20659
20660	result, err = client.ListHostKeysResponder(resp)
20661	if err != nil {
20662		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeys", resp, "Failure responding to request")
20663		return
20664	}
20665
20666	return
20667}
20668
20669// ListHostKeysPreparer prepares the ListHostKeys request.
20670func (client AppsClient) ListHostKeysPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20671	pathParameters := map[string]interface{}{
20672		"name":              autorest.Encode("path", name),
20673		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20674		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20675	}
20676
20677	const APIVersion = "2020-09-01"
20678	queryParameters := map[string]interface{}{
20679		"api-version": APIVersion,
20680	}
20681
20682	preparer := autorest.CreatePreparer(
20683		autorest.AsPost(),
20684		autorest.WithBaseURL(client.BaseURI),
20685		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys", pathParameters),
20686		autorest.WithQueryParameters(queryParameters))
20687	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20688}
20689
20690// ListHostKeysSender sends the ListHostKeys request. The method will close the
20691// http.Response Body if it receives an error.
20692func (client AppsClient) ListHostKeysSender(req *http.Request) (*http.Response, error) {
20693	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20694}
20695
20696// ListHostKeysResponder handles the response to the ListHostKeys request. The method always
20697// closes the http.Response Body.
20698func (client AppsClient) ListHostKeysResponder(resp *http.Response) (result HostKeys, err error) {
20699	err = autorest.Respond(
20700		resp,
20701		azure.WithErrorUnlessStatusCode(http.StatusOK),
20702		autorest.ByUnmarshallingJSON(&result),
20703		autorest.ByClosing())
20704	result.Response = autorest.Response{Response: resp}
20705	return
20706}
20707
20708// ListHostKeysSlot description for Get host secrets for a function app.
20709// Parameters:
20710// resourceGroupName - name of the resource group to which the resource belongs.
20711// name - site name.
20712// slot - name of the deployment slot.
20713func (client AppsClient) ListHostKeysSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostKeys, err error) {
20714	if tracing.IsEnabled() {
20715		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostKeysSlot")
20716		defer func() {
20717			sc := -1
20718			if result.Response.Response != nil {
20719				sc = result.Response.Response.StatusCode
20720			}
20721			tracing.EndSpan(ctx, sc, err)
20722		}()
20723	}
20724	if err := validation.Validate([]validation.Validation{
20725		{TargetValue: resourceGroupName,
20726			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20727				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20728				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20729		return result, validation.NewError("web.AppsClient", "ListHostKeysSlot", err.Error())
20730	}
20731
20732	req, err := client.ListHostKeysSlotPreparer(ctx, resourceGroupName, name, slot)
20733	if err != nil {
20734		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", nil, "Failure preparing request")
20735		return
20736	}
20737
20738	resp, err := client.ListHostKeysSlotSender(req)
20739	if err != nil {
20740		result.Response = autorest.Response{Response: resp}
20741		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure sending request")
20742		return
20743	}
20744
20745	result, err = client.ListHostKeysSlotResponder(resp)
20746	if err != nil {
20747		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostKeysSlot", resp, "Failure responding to request")
20748		return
20749	}
20750
20751	return
20752}
20753
20754// ListHostKeysSlotPreparer prepares the ListHostKeysSlot request.
20755func (client AppsClient) ListHostKeysSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20756	pathParameters := map[string]interface{}{
20757		"name":              autorest.Encode("path", name),
20758		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20759		"slot":              autorest.Encode("path", slot),
20760		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20761	}
20762
20763	const APIVersion = "2020-09-01"
20764	queryParameters := map[string]interface{}{
20765		"api-version": APIVersion,
20766	}
20767
20768	preparer := autorest.CreatePreparer(
20769		autorest.AsPost(),
20770		autorest.WithBaseURL(client.BaseURI),
20771		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys", pathParameters),
20772		autorest.WithQueryParameters(queryParameters))
20773	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20774}
20775
20776// ListHostKeysSlotSender sends the ListHostKeysSlot request. The method will close the
20777// http.Response Body if it receives an error.
20778func (client AppsClient) ListHostKeysSlotSender(req *http.Request) (*http.Response, error) {
20779	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20780}
20781
20782// ListHostKeysSlotResponder handles the response to the ListHostKeysSlot request. The method always
20783// closes the http.Response Body.
20784func (client AppsClient) ListHostKeysSlotResponder(resp *http.Response) (result HostKeys, err error) {
20785	err = autorest.Respond(
20786		resp,
20787		azure.WithErrorUnlessStatusCode(http.StatusOK),
20788		autorest.ByUnmarshallingJSON(&result),
20789		autorest.ByClosing())
20790	result.Response = autorest.Response{Response: resp}
20791	return
20792}
20793
20794// ListHostNameBindings description for Get hostname bindings for an app or a deployment slot.
20795// Parameters:
20796// resourceGroupName - name of the resource group to which the resource belongs.
20797// name - name of the app.
20798func (client AppsClient) ListHostNameBindings(ctx context.Context, resourceGroupName string, name string) (result HostNameBindingCollectionPage, err error) {
20799	if tracing.IsEnabled() {
20800		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindings")
20801		defer func() {
20802			sc := -1
20803			if result.hnbc.Response.Response != nil {
20804				sc = result.hnbc.Response.Response.StatusCode
20805			}
20806			tracing.EndSpan(ctx, sc, err)
20807		}()
20808	}
20809	if err := validation.Validate([]validation.Validation{
20810		{TargetValue: resourceGroupName,
20811			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20812				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20813				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20814		return result, validation.NewError("web.AppsClient", "ListHostNameBindings", err.Error())
20815	}
20816
20817	result.fn = client.listHostNameBindingsNextResults
20818	req, err := client.ListHostNameBindingsPreparer(ctx, resourceGroupName, name)
20819	if err != nil {
20820		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", nil, "Failure preparing request")
20821		return
20822	}
20823
20824	resp, err := client.ListHostNameBindingsSender(req)
20825	if err != nil {
20826		result.hnbc.Response = autorest.Response{Response: resp}
20827		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", resp, "Failure sending request")
20828		return
20829	}
20830
20831	result.hnbc, err = client.ListHostNameBindingsResponder(resp)
20832	if err != nil {
20833		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindings", resp, "Failure responding to request")
20834		return
20835	}
20836	if result.hnbc.hasNextLink() && result.hnbc.IsEmpty() {
20837		err = result.NextWithContext(ctx)
20838		return
20839	}
20840
20841	return
20842}
20843
20844// ListHostNameBindingsPreparer prepares the ListHostNameBindings request.
20845func (client AppsClient) ListHostNameBindingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
20846	pathParameters := map[string]interface{}{
20847		"name":              autorest.Encode("path", name),
20848		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20849		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20850	}
20851
20852	const APIVersion = "2020-09-01"
20853	queryParameters := map[string]interface{}{
20854		"api-version": APIVersion,
20855	}
20856
20857	preparer := autorest.CreatePreparer(
20858		autorest.AsGet(),
20859		autorest.WithBaseURL(client.BaseURI),
20860		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings", pathParameters),
20861		autorest.WithQueryParameters(queryParameters))
20862	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20863}
20864
20865// ListHostNameBindingsSender sends the ListHostNameBindings request. The method will close the
20866// http.Response Body if it receives an error.
20867func (client AppsClient) ListHostNameBindingsSender(req *http.Request) (*http.Response, error) {
20868	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20869}
20870
20871// ListHostNameBindingsResponder handles the response to the ListHostNameBindings request. The method always
20872// closes the http.Response Body.
20873func (client AppsClient) ListHostNameBindingsResponder(resp *http.Response) (result HostNameBindingCollection, err error) {
20874	err = autorest.Respond(
20875		resp,
20876		azure.WithErrorUnlessStatusCode(http.StatusOK),
20877		autorest.ByUnmarshallingJSON(&result),
20878		autorest.ByClosing())
20879	result.Response = autorest.Response{Response: resp}
20880	return
20881}
20882
20883// listHostNameBindingsNextResults retrieves the next set of results, if any.
20884func (client AppsClient) listHostNameBindingsNextResults(ctx context.Context, lastResults HostNameBindingCollection) (result HostNameBindingCollection, err error) {
20885	req, err := lastResults.hostNameBindingCollectionPreparer(ctx)
20886	if err != nil {
20887		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", nil, "Failure preparing next results request")
20888	}
20889	if req == nil {
20890		return
20891	}
20892	resp, err := client.ListHostNameBindingsSender(req)
20893	if err != nil {
20894		result.Response = autorest.Response{Response: resp}
20895		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", resp, "Failure sending next results request")
20896	}
20897	result, err = client.ListHostNameBindingsResponder(resp)
20898	if err != nil {
20899		err = autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsNextResults", resp, "Failure responding to next results request")
20900	}
20901	return
20902}
20903
20904// ListHostNameBindingsComplete enumerates all values, automatically crossing page boundaries as required.
20905func (client AppsClient) ListHostNameBindingsComplete(ctx context.Context, resourceGroupName string, name string) (result HostNameBindingCollectionIterator, err error) {
20906	if tracing.IsEnabled() {
20907		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindings")
20908		defer func() {
20909			sc := -1
20910			if result.Response().Response.Response != nil {
20911				sc = result.page.Response().Response.Response.StatusCode
20912			}
20913			tracing.EndSpan(ctx, sc, err)
20914		}()
20915	}
20916	result.page, err = client.ListHostNameBindings(ctx, resourceGroupName, name)
20917	return
20918}
20919
20920// ListHostNameBindingsSlot description for Get hostname bindings for an app or a deployment slot.
20921// Parameters:
20922// resourceGroupName - name of the resource group to which the resource belongs.
20923// name - name of the app.
20924// slot - name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the
20925// production slot.
20926func (client AppsClient) ListHostNameBindingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HostNameBindingCollectionPage, err error) {
20927	if tracing.IsEnabled() {
20928		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindingsSlot")
20929		defer func() {
20930			sc := -1
20931			if result.hnbc.Response.Response != nil {
20932				sc = result.hnbc.Response.Response.StatusCode
20933			}
20934			tracing.EndSpan(ctx, sc, err)
20935		}()
20936	}
20937	if err := validation.Validate([]validation.Validation{
20938		{TargetValue: resourceGroupName,
20939			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
20940				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
20941				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
20942		return result, validation.NewError("web.AppsClient", "ListHostNameBindingsSlot", err.Error())
20943	}
20944
20945	result.fn = client.listHostNameBindingsSlotNextResults
20946	req, err := client.ListHostNameBindingsSlotPreparer(ctx, resourceGroupName, name, slot)
20947	if err != nil {
20948		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", nil, "Failure preparing request")
20949		return
20950	}
20951
20952	resp, err := client.ListHostNameBindingsSlotSender(req)
20953	if err != nil {
20954		result.hnbc.Response = autorest.Response{Response: resp}
20955		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", resp, "Failure sending request")
20956		return
20957	}
20958
20959	result.hnbc, err = client.ListHostNameBindingsSlotResponder(resp)
20960	if err != nil {
20961		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHostNameBindingsSlot", resp, "Failure responding to request")
20962		return
20963	}
20964	if result.hnbc.hasNextLink() && result.hnbc.IsEmpty() {
20965		err = result.NextWithContext(ctx)
20966		return
20967	}
20968
20969	return
20970}
20971
20972// ListHostNameBindingsSlotPreparer prepares the ListHostNameBindingsSlot request.
20973func (client AppsClient) ListHostNameBindingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
20974	pathParameters := map[string]interface{}{
20975		"name":              autorest.Encode("path", name),
20976		"resourceGroupName": autorest.Encode("path", resourceGroupName),
20977		"slot":              autorest.Encode("path", slot),
20978		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
20979	}
20980
20981	const APIVersion = "2020-09-01"
20982	queryParameters := map[string]interface{}{
20983		"api-version": APIVersion,
20984	}
20985
20986	preparer := autorest.CreatePreparer(
20987		autorest.AsGet(),
20988		autorest.WithBaseURL(client.BaseURI),
20989		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings", pathParameters),
20990		autorest.WithQueryParameters(queryParameters))
20991	return preparer.Prepare((&http.Request{}).WithContext(ctx))
20992}
20993
20994// ListHostNameBindingsSlotSender sends the ListHostNameBindingsSlot request. The method will close the
20995// http.Response Body if it receives an error.
20996func (client AppsClient) ListHostNameBindingsSlotSender(req *http.Request) (*http.Response, error) {
20997	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
20998}
20999
21000// ListHostNameBindingsSlotResponder handles the response to the ListHostNameBindingsSlot request. The method always
21001// closes the http.Response Body.
21002func (client AppsClient) ListHostNameBindingsSlotResponder(resp *http.Response) (result HostNameBindingCollection, err error) {
21003	err = autorest.Respond(
21004		resp,
21005		azure.WithErrorUnlessStatusCode(http.StatusOK),
21006		autorest.ByUnmarshallingJSON(&result),
21007		autorest.ByClosing())
21008	result.Response = autorest.Response{Response: resp}
21009	return
21010}
21011
21012// listHostNameBindingsSlotNextResults retrieves the next set of results, if any.
21013func (client AppsClient) listHostNameBindingsSlotNextResults(ctx context.Context, lastResults HostNameBindingCollection) (result HostNameBindingCollection, err error) {
21014	req, err := lastResults.hostNameBindingCollectionPreparer(ctx)
21015	if err != nil {
21016		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", nil, "Failure preparing next results request")
21017	}
21018	if req == nil {
21019		return
21020	}
21021	resp, err := client.ListHostNameBindingsSlotSender(req)
21022	if err != nil {
21023		result.Response = autorest.Response{Response: resp}
21024		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", resp, "Failure sending next results request")
21025	}
21026	result, err = client.ListHostNameBindingsSlotResponder(resp)
21027	if err != nil {
21028		err = autorest.NewErrorWithError(err, "web.AppsClient", "listHostNameBindingsSlotNextResults", resp, "Failure responding to next results request")
21029	}
21030	return
21031}
21032
21033// ListHostNameBindingsSlotComplete enumerates all values, automatically crossing page boundaries as required.
21034func (client AppsClient) ListHostNameBindingsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result HostNameBindingCollectionIterator, err error) {
21035	if tracing.IsEnabled() {
21036		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHostNameBindingsSlot")
21037		defer func() {
21038			sc := -1
21039			if result.Response().Response.Response != nil {
21040				sc = result.page.Response().Response.Response.StatusCode
21041			}
21042			tracing.EndSpan(ctx, sc, err)
21043		}()
21044	}
21045	result.page, err = client.ListHostNameBindingsSlot(ctx, resourceGroupName, name, slot)
21046	return
21047}
21048
21049// ListHybridConnections description for Retrieves all Service Bus Hybrid Connections used by this Web App.
21050// Parameters:
21051// resourceGroupName - name of the resource group to which the resource belongs.
21052// name - the name of the web app.
21053func (client AppsClient) ListHybridConnections(ctx context.Context, resourceGroupName string, name string) (result HybridConnection, err error) {
21054	if tracing.IsEnabled() {
21055		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnections")
21056		defer func() {
21057			sc := -1
21058			if result.Response.Response != nil {
21059				sc = result.Response.Response.StatusCode
21060			}
21061			tracing.EndSpan(ctx, sc, err)
21062		}()
21063	}
21064	if err := validation.Validate([]validation.Validation{
21065		{TargetValue: resourceGroupName,
21066			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21067				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21068				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21069		return result, validation.NewError("web.AppsClient", "ListHybridConnections", err.Error())
21070	}
21071
21072	req, err := client.ListHybridConnectionsPreparer(ctx, resourceGroupName, name)
21073	if err != nil {
21074		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", nil, "Failure preparing request")
21075		return
21076	}
21077
21078	resp, err := client.ListHybridConnectionsSender(req)
21079	if err != nil {
21080		result.Response = autorest.Response{Response: resp}
21081		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", resp, "Failure sending request")
21082		return
21083	}
21084
21085	result, err = client.ListHybridConnectionsResponder(resp)
21086	if err != nil {
21087		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnections", resp, "Failure responding to request")
21088		return
21089	}
21090
21091	return
21092}
21093
21094// ListHybridConnectionsPreparer prepares the ListHybridConnections request.
21095func (client AppsClient) ListHybridConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21096	pathParameters := map[string]interface{}{
21097		"name":              autorest.Encode("path", name),
21098		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21099		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21100	}
21101
21102	const APIVersion = "2020-09-01"
21103	queryParameters := map[string]interface{}{
21104		"api-version": APIVersion,
21105	}
21106
21107	preparer := autorest.CreatePreparer(
21108		autorest.AsGet(),
21109		autorest.WithBaseURL(client.BaseURI),
21110		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays", pathParameters),
21111		autorest.WithQueryParameters(queryParameters))
21112	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21113}
21114
21115// ListHybridConnectionsSender sends the ListHybridConnections request. The method will close the
21116// http.Response Body if it receives an error.
21117func (client AppsClient) ListHybridConnectionsSender(req *http.Request) (*http.Response, error) {
21118	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21119}
21120
21121// ListHybridConnectionsResponder handles the response to the ListHybridConnections request. The method always
21122// closes the http.Response Body.
21123func (client AppsClient) ListHybridConnectionsResponder(resp *http.Response) (result HybridConnection, err error) {
21124	err = autorest.Respond(
21125		resp,
21126		azure.WithErrorUnlessStatusCode(http.StatusOK),
21127		autorest.ByUnmarshallingJSON(&result),
21128		autorest.ByClosing())
21129	result.Response = autorest.Response{Response: resp}
21130	return
21131}
21132
21133// ListHybridConnectionsSlot description for Retrieves all Service Bus Hybrid Connections used by this Web App.
21134// Parameters:
21135// resourceGroupName - name of the resource group to which the resource belongs.
21136// name - the name of the web app.
21137// slot - the name of the slot for the web app.
21138func (client AppsClient) ListHybridConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result HybridConnection, err error) {
21139	if tracing.IsEnabled() {
21140		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListHybridConnectionsSlot")
21141		defer func() {
21142			sc := -1
21143			if result.Response.Response != nil {
21144				sc = result.Response.Response.StatusCode
21145			}
21146			tracing.EndSpan(ctx, sc, err)
21147		}()
21148	}
21149	if err := validation.Validate([]validation.Validation{
21150		{TargetValue: resourceGroupName,
21151			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21152				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21153				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21154		return result, validation.NewError("web.AppsClient", "ListHybridConnectionsSlot", err.Error())
21155	}
21156
21157	req, err := client.ListHybridConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
21158	if err != nil {
21159		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", nil, "Failure preparing request")
21160		return
21161	}
21162
21163	resp, err := client.ListHybridConnectionsSlotSender(req)
21164	if err != nil {
21165		result.Response = autorest.Response{Response: resp}
21166		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", resp, "Failure sending request")
21167		return
21168	}
21169
21170	result, err = client.ListHybridConnectionsSlotResponder(resp)
21171	if err != nil {
21172		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListHybridConnectionsSlot", resp, "Failure responding to request")
21173		return
21174	}
21175
21176	return
21177}
21178
21179// ListHybridConnectionsSlotPreparer prepares the ListHybridConnectionsSlot request.
21180func (client AppsClient) ListHybridConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21181	pathParameters := map[string]interface{}{
21182		"name":              autorest.Encode("path", name),
21183		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21184		"slot":              autorest.Encode("path", slot),
21185		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21186	}
21187
21188	const APIVersion = "2020-09-01"
21189	queryParameters := map[string]interface{}{
21190		"api-version": APIVersion,
21191	}
21192
21193	preparer := autorest.CreatePreparer(
21194		autorest.AsGet(),
21195		autorest.WithBaseURL(client.BaseURI),
21196		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays", pathParameters),
21197		autorest.WithQueryParameters(queryParameters))
21198	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21199}
21200
21201// ListHybridConnectionsSlotSender sends the ListHybridConnectionsSlot request. The method will close the
21202// http.Response Body if it receives an error.
21203func (client AppsClient) ListHybridConnectionsSlotSender(req *http.Request) (*http.Response, error) {
21204	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21205}
21206
21207// ListHybridConnectionsSlotResponder handles the response to the ListHybridConnectionsSlot request. The method always
21208// closes the http.Response Body.
21209func (client AppsClient) ListHybridConnectionsSlotResponder(resp *http.Response) (result HybridConnection, err error) {
21210	err = autorest.Respond(
21211		resp,
21212		azure.WithErrorUnlessStatusCode(http.StatusOK),
21213		autorest.ByUnmarshallingJSON(&result),
21214		autorest.ByClosing())
21215	result.Response = autorest.Response{Response: resp}
21216	return
21217}
21218
21219// ListInstanceFunctionsSlot description for List the functions for a web site, or a deployment slot.
21220// Parameters:
21221// resourceGroupName - name of the resource group to which the resource belongs.
21222// name - site name.
21223// slot - name of the deployment slot.
21224func (client AppsClient) ListInstanceFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionPage, err error) {
21225	if tracing.IsEnabled() {
21226		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot")
21227		defer func() {
21228			sc := -1
21229			if result.fec.Response.Response != nil {
21230				sc = result.fec.Response.Response.StatusCode
21231			}
21232			tracing.EndSpan(ctx, sc, err)
21233		}()
21234	}
21235	if err := validation.Validate([]validation.Validation{
21236		{TargetValue: resourceGroupName,
21237			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21238				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21239				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21240		return result, validation.NewError("web.AppsClient", "ListInstanceFunctionsSlot", err.Error())
21241	}
21242
21243	result.fn = client.listInstanceFunctionsSlotNextResults
21244	req, err := client.ListInstanceFunctionsSlotPreparer(ctx, resourceGroupName, name, slot)
21245	if err != nil {
21246		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", nil, "Failure preparing request")
21247		return
21248	}
21249
21250	resp, err := client.ListInstanceFunctionsSlotSender(req)
21251	if err != nil {
21252		result.fec.Response = autorest.Response{Response: resp}
21253		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure sending request")
21254		return
21255	}
21256
21257	result.fec, err = client.ListInstanceFunctionsSlotResponder(resp)
21258	if err != nil {
21259		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure responding to request")
21260		return
21261	}
21262	if result.fec.hasNextLink() && result.fec.IsEmpty() {
21263		err = result.NextWithContext(ctx)
21264		return
21265	}
21266
21267	return
21268}
21269
21270// ListInstanceFunctionsSlotPreparer prepares the ListInstanceFunctionsSlot request.
21271func (client AppsClient) ListInstanceFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21272	pathParameters := map[string]interface{}{
21273		"name":              autorest.Encode("path", name),
21274		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21275		"slot":              autorest.Encode("path", slot),
21276		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21277	}
21278
21279	const APIVersion = "2020-09-01"
21280	queryParameters := map[string]interface{}{
21281		"api-version": APIVersion,
21282	}
21283
21284	preparer := autorest.CreatePreparer(
21285		autorest.AsGet(),
21286		autorest.WithBaseURL(client.BaseURI),
21287		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions", pathParameters),
21288		autorest.WithQueryParameters(queryParameters))
21289	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21290}
21291
21292// ListInstanceFunctionsSlotSender sends the ListInstanceFunctionsSlot request. The method will close the
21293// http.Response Body if it receives an error.
21294func (client AppsClient) ListInstanceFunctionsSlotSender(req *http.Request) (*http.Response, error) {
21295	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21296}
21297
21298// ListInstanceFunctionsSlotResponder handles the response to the ListInstanceFunctionsSlot request. The method always
21299// closes the http.Response Body.
21300func (client AppsClient) ListInstanceFunctionsSlotResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) {
21301	err = autorest.Respond(
21302		resp,
21303		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21304		autorest.ByUnmarshallingJSON(&result),
21305		autorest.ByClosing())
21306	result.Response = autorest.Response{Response: resp}
21307	return
21308}
21309
21310// listInstanceFunctionsSlotNextResults retrieves the next set of results, if any.
21311func (client AppsClient) listInstanceFunctionsSlotNextResults(ctx context.Context, lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) {
21312	req, err := lastResults.functionEnvelopeCollectionPreparer(ctx)
21313	if err != nil {
21314		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", nil, "Failure preparing next results request")
21315	}
21316	if req == nil {
21317		return
21318	}
21319	resp, err := client.ListInstanceFunctionsSlotSender(req)
21320	if err != nil {
21321		result.Response = autorest.Response{Response: resp}
21322		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", resp, "Failure sending next results request")
21323	}
21324	result, err = client.ListInstanceFunctionsSlotResponder(resp)
21325	if err != nil {
21326		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceFunctionsSlotNextResults", resp, "Failure responding to next results request")
21327	}
21328	return
21329}
21330
21331// ListInstanceFunctionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
21332func (client AppsClient) ListInstanceFunctionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollectionIterator, err error) {
21333	if tracing.IsEnabled() {
21334		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceFunctionsSlot")
21335		defer func() {
21336			sc := -1
21337			if result.Response().Response.Response != nil {
21338				sc = result.page.Response().Response.Response.StatusCode
21339			}
21340			tracing.EndSpan(ctx, sc, err)
21341		}()
21342	}
21343	result.page, err = client.ListInstanceFunctionsSlot(ctx, resourceGroupName, name, slot)
21344	return
21345}
21346
21347// ListInstanceIdentifiers description for Gets all scale-out instances of an app.
21348// Parameters:
21349// resourceGroupName - name of the resource group to which the resource belongs.
21350// name - name of the app.
21351func (client AppsClient) ListInstanceIdentifiers(ctx context.Context, resourceGroupName string, name string) (result AppInstanceStatusCollectionPage, err error) {
21352	if tracing.IsEnabled() {
21353		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiers")
21354		defer func() {
21355			sc := -1
21356			if result.aisc.Response.Response != nil {
21357				sc = result.aisc.Response.Response.StatusCode
21358			}
21359			tracing.EndSpan(ctx, sc, err)
21360		}()
21361	}
21362	if err := validation.Validate([]validation.Validation{
21363		{TargetValue: resourceGroupName,
21364			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21365				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21366				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21367		return result, validation.NewError("web.AppsClient", "ListInstanceIdentifiers", err.Error())
21368	}
21369
21370	result.fn = client.listInstanceIdentifiersNextResults
21371	req, err := client.ListInstanceIdentifiersPreparer(ctx, resourceGroupName, name)
21372	if err != nil {
21373		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", nil, "Failure preparing request")
21374		return
21375	}
21376
21377	resp, err := client.ListInstanceIdentifiersSender(req)
21378	if err != nil {
21379		result.aisc.Response = autorest.Response{Response: resp}
21380		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", resp, "Failure sending request")
21381		return
21382	}
21383
21384	result.aisc, err = client.ListInstanceIdentifiersResponder(resp)
21385	if err != nil {
21386		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiers", resp, "Failure responding to request")
21387		return
21388	}
21389	if result.aisc.hasNextLink() && result.aisc.IsEmpty() {
21390		err = result.NextWithContext(ctx)
21391		return
21392	}
21393
21394	return
21395}
21396
21397// ListInstanceIdentifiersPreparer prepares the ListInstanceIdentifiers request.
21398func (client AppsClient) ListInstanceIdentifiersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
21399	pathParameters := map[string]interface{}{
21400		"name":              autorest.Encode("path", name),
21401		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21402		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21403	}
21404
21405	const APIVersion = "2020-09-01"
21406	queryParameters := map[string]interface{}{
21407		"api-version": APIVersion,
21408	}
21409
21410	preparer := autorest.CreatePreparer(
21411		autorest.AsGet(),
21412		autorest.WithBaseURL(client.BaseURI),
21413		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances", pathParameters),
21414		autorest.WithQueryParameters(queryParameters))
21415	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21416}
21417
21418// ListInstanceIdentifiersSender sends the ListInstanceIdentifiers request. The method will close the
21419// http.Response Body if it receives an error.
21420func (client AppsClient) ListInstanceIdentifiersSender(req *http.Request) (*http.Response, error) {
21421	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21422}
21423
21424// ListInstanceIdentifiersResponder handles the response to the ListInstanceIdentifiers request. The method always
21425// closes the http.Response Body.
21426func (client AppsClient) ListInstanceIdentifiersResponder(resp *http.Response) (result AppInstanceStatusCollection, err error) {
21427	err = autorest.Respond(
21428		resp,
21429		azure.WithErrorUnlessStatusCode(http.StatusOK),
21430		autorest.ByUnmarshallingJSON(&result),
21431		autorest.ByClosing())
21432	result.Response = autorest.Response{Response: resp}
21433	return
21434}
21435
21436// listInstanceIdentifiersNextResults retrieves the next set of results, if any.
21437func (client AppsClient) listInstanceIdentifiersNextResults(ctx context.Context, lastResults AppInstanceStatusCollection) (result AppInstanceStatusCollection, err error) {
21438	req, err := lastResults.appInstanceStatusCollectionPreparer(ctx)
21439	if err != nil {
21440		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", nil, "Failure preparing next results request")
21441	}
21442	if req == nil {
21443		return
21444	}
21445	resp, err := client.ListInstanceIdentifiersSender(req)
21446	if err != nil {
21447		result.Response = autorest.Response{Response: resp}
21448		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", resp, "Failure sending next results request")
21449	}
21450	result, err = client.ListInstanceIdentifiersResponder(resp)
21451	if err != nil {
21452		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersNextResults", resp, "Failure responding to next results request")
21453	}
21454	return
21455}
21456
21457// ListInstanceIdentifiersComplete enumerates all values, automatically crossing page boundaries as required.
21458func (client AppsClient) ListInstanceIdentifiersComplete(ctx context.Context, resourceGroupName string, name string) (result AppInstanceStatusCollectionIterator, err error) {
21459	if tracing.IsEnabled() {
21460		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiers")
21461		defer func() {
21462			sc := -1
21463			if result.Response().Response.Response != nil {
21464				sc = result.page.Response().Response.Response.StatusCode
21465			}
21466			tracing.EndSpan(ctx, sc, err)
21467		}()
21468	}
21469	result.page, err = client.ListInstanceIdentifiers(ctx, resourceGroupName, name)
21470	return
21471}
21472
21473// ListInstanceIdentifiersSlot description for Gets all scale-out instances of an app.
21474// Parameters:
21475// resourceGroupName - name of the resource group to which the resource belongs.
21476// name - name of the app.
21477// slot - name of the deployment slot. If a slot is not specified, the API gets the production slot instances.
21478func (client AppsClient) ListInstanceIdentifiersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AppInstanceStatusCollectionPage, err error) {
21479	if tracing.IsEnabled() {
21480		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiersSlot")
21481		defer func() {
21482			sc := -1
21483			if result.aisc.Response.Response != nil {
21484				sc = result.aisc.Response.Response.StatusCode
21485			}
21486			tracing.EndSpan(ctx, sc, err)
21487		}()
21488	}
21489	if err := validation.Validate([]validation.Validation{
21490		{TargetValue: resourceGroupName,
21491			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21492				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21493				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21494		return result, validation.NewError("web.AppsClient", "ListInstanceIdentifiersSlot", err.Error())
21495	}
21496
21497	result.fn = client.listInstanceIdentifiersSlotNextResults
21498	req, err := client.ListInstanceIdentifiersSlotPreparer(ctx, resourceGroupName, name, slot)
21499	if err != nil {
21500		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", nil, "Failure preparing request")
21501		return
21502	}
21503
21504	resp, err := client.ListInstanceIdentifiersSlotSender(req)
21505	if err != nil {
21506		result.aisc.Response = autorest.Response{Response: resp}
21507		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", resp, "Failure sending request")
21508		return
21509	}
21510
21511	result.aisc, err = client.ListInstanceIdentifiersSlotResponder(resp)
21512	if err != nil {
21513		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceIdentifiersSlot", resp, "Failure responding to request")
21514		return
21515	}
21516	if result.aisc.hasNextLink() && result.aisc.IsEmpty() {
21517		err = result.NextWithContext(ctx)
21518		return
21519	}
21520
21521	return
21522}
21523
21524// ListInstanceIdentifiersSlotPreparer prepares the ListInstanceIdentifiersSlot request.
21525func (client AppsClient) ListInstanceIdentifiersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
21526	pathParameters := map[string]interface{}{
21527		"name":              autorest.Encode("path", name),
21528		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21529		"slot":              autorest.Encode("path", slot),
21530		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21531	}
21532
21533	const APIVersion = "2020-09-01"
21534	queryParameters := map[string]interface{}{
21535		"api-version": APIVersion,
21536	}
21537
21538	preparer := autorest.CreatePreparer(
21539		autorest.AsGet(),
21540		autorest.WithBaseURL(client.BaseURI),
21541		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances", pathParameters),
21542		autorest.WithQueryParameters(queryParameters))
21543	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21544}
21545
21546// ListInstanceIdentifiersSlotSender sends the ListInstanceIdentifiersSlot request. The method will close the
21547// http.Response Body if it receives an error.
21548func (client AppsClient) ListInstanceIdentifiersSlotSender(req *http.Request) (*http.Response, error) {
21549	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21550}
21551
21552// ListInstanceIdentifiersSlotResponder handles the response to the ListInstanceIdentifiersSlot request. The method always
21553// closes the http.Response Body.
21554func (client AppsClient) ListInstanceIdentifiersSlotResponder(resp *http.Response) (result AppInstanceStatusCollection, err error) {
21555	err = autorest.Respond(
21556		resp,
21557		azure.WithErrorUnlessStatusCode(http.StatusOK),
21558		autorest.ByUnmarshallingJSON(&result),
21559		autorest.ByClosing())
21560	result.Response = autorest.Response{Response: resp}
21561	return
21562}
21563
21564// listInstanceIdentifiersSlotNextResults retrieves the next set of results, if any.
21565func (client AppsClient) listInstanceIdentifiersSlotNextResults(ctx context.Context, lastResults AppInstanceStatusCollection) (result AppInstanceStatusCollection, err error) {
21566	req, err := lastResults.appInstanceStatusCollectionPreparer(ctx)
21567	if err != nil {
21568		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", nil, "Failure preparing next results request")
21569	}
21570	if req == nil {
21571		return
21572	}
21573	resp, err := client.ListInstanceIdentifiersSlotSender(req)
21574	if err != nil {
21575		result.Response = autorest.Response{Response: resp}
21576		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", resp, "Failure sending next results request")
21577	}
21578	result, err = client.ListInstanceIdentifiersSlotResponder(resp)
21579	if err != nil {
21580		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceIdentifiersSlotNextResults", resp, "Failure responding to next results request")
21581	}
21582	return
21583}
21584
21585// ListInstanceIdentifiersSlotComplete enumerates all values, automatically crossing page boundaries as required.
21586func (client AppsClient) ListInstanceIdentifiersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result AppInstanceStatusCollectionIterator, err error) {
21587	if tracing.IsEnabled() {
21588		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceIdentifiersSlot")
21589		defer func() {
21590			sc := -1
21591			if result.Response().Response.Response != nil {
21592				sc = result.page.Response().Response.Response.StatusCode
21593			}
21594			tracing.EndSpan(ctx, sc, err)
21595		}()
21596	}
21597	result.page, err = client.ListInstanceIdentifiersSlot(ctx, resourceGroupName, name, slot)
21598	return
21599}
21600
21601// ListInstanceProcesses description for Get list of processes for a web site, or a deployment slot, or for a specific
21602// scaled-out instance in a web site.
21603// Parameters:
21604// resourceGroupName - name of the resource group to which the resource belongs.
21605// name - site name.
21606// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
21607// response from "GET api/sites/{siteName}/instances".
21608func (client AppsClient) ListInstanceProcesses(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionPage, err error) {
21609	if tracing.IsEnabled() {
21610		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses")
21611		defer func() {
21612			sc := -1
21613			if result.pic.Response.Response != nil {
21614				sc = result.pic.Response.Response.StatusCode
21615			}
21616			tracing.EndSpan(ctx, sc, err)
21617		}()
21618	}
21619	if err := validation.Validate([]validation.Validation{
21620		{TargetValue: resourceGroupName,
21621			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21622				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21623				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21624		return result, validation.NewError("web.AppsClient", "ListInstanceProcesses", err.Error())
21625	}
21626
21627	result.fn = client.listInstanceProcessesNextResults
21628	req, err := client.ListInstanceProcessesPreparer(ctx, resourceGroupName, name, instanceID)
21629	if err != nil {
21630		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing request")
21631		return
21632	}
21633
21634	resp, err := client.ListInstanceProcessesSender(req)
21635	if err != nil {
21636		result.pic.Response = autorest.Response{Response: resp}
21637		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending request")
21638		return
21639	}
21640
21641	result.pic, err = client.ListInstanceProcessesResponder(resp)
21642	if err != nil {
21643		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to request")
21644		return
21645	}
21646	if result.pic.hasNextLink() && result.pic.IsEmpty() {
21647		err = result.NextWithContext(ctx)
21648		return
21649	}
21650
21651	return
21652}
21653
21654// ListInstanceProcessesPreparer prepares the ListInstanceProcesses request.
21655func (client AppsClient) ListInstanceProcessesPreparer(ctx context.Context, resourceGroupName string, name string, instanceID string) (*http.Request, error) {
21656	pathParameters := map[string]interface{}{
21657		"instanceId":        autorest.Encode("path", instanceID),
21658		"name":              autorest.Encode("path", name),
21659		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21660		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21661	}
21662
21663	const APIVersion = "2020-09-01"
21664	queryParameters := map[string]interface{}{
21665		"api-version": APIVersion,
21666	}
21667
21668	preparer := autorest.CreatePreparer(
21669		autorest.AsGet(),
21670		autorest.WithBaseURL(client.BaseURI),
21671		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes", pathParameters),
21672		autorest.WithQueryParameters(queryParameters))
21673	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21674}
21675
21676// ListInstanceProcessesSender sends the ListInstanceProcesses request. The method will close the
21677// http.Response Body if it receives an error.
21678func (client AppsClient) ListInstanceProcessesSender(req *http.Request) (*http.Response, error) {
21679	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21680}
21681
21682// ListInstanceProcessesResponder handles the response to the ListInstanceProcesses request. The method always
21683// closes the http.Response Body.
21684func (client AppsClient) ListInstanceProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
21685	err = autorest.Respond(
21686		resp,
21687		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21688		autorest.ByUnmarshallingJSON(&result),
21689		autorest.ByClosing())
21690	result.Response = autorest.Response{Response: resp}
21691	return
21692}
21693
21694// listInstanceProcessesNextResults retrieves the next set of results, if any.
21695func (client AppsClient) listInstanceProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
21696	req, err := lastResults.processInfoCollectionPreparer(ctx)
21697	if err != nil {
21698		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", nil, "Failure preparing next results request")
21699	}
21700	if req == nil {
21701		return
21702	}
21703	resp, err := client.ListInstanceProcessesSender(req)
21704	if err != nil {
21705		result.Response = autorest.Response{Response: resp}
21706		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure sending next results request")
21707	}
21708	result, err = client.ListInstanceProcessesResponder(resp)
21709	if err != nil {
21710		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesNextResults", resp, "Failure responding to next results request")
21711	}
21712	return
21713}
21714
21715// ListInstanceProcessesComplete enumerates all values, automatically crossing page boundaries as required.
21716func (client AppsClient) ListInstanceProcessesComplete(ctx context.Context, resourceGroupName string, name string, instanceID string) (result ProcessInfoCollectionIterator, err error) {
21717	if tracing.IsEnabled() {
21718		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcesses")
21719		defer func() {
21720			sc := -1
21721			if result.Response().Response.Response != nil {
21722				sc = result.page.Response().Response.Response.StatusCode
21723			}
21724			tracing.EndSpan(ctx, sc, err)
21725		}()
21726	}
21727	result.page, err = client.ListInstanceProcesses(ctx, resourceGroupName, name, instanceID)
21728	return
21729}
21730
21731// ListInstanceProcessesSlot description for Get list of processes for a web site, or a deployment slot, or for a
21732// specific scaled-out instance in a web site.
21733// Parameters:
21734// resourceGroupName - name of the resource group to which the resource belongs.
21735// name - site name.
21736// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
21737// production slot.
21738// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
21739// response from "GET api/sites/{siteName}/instances".
21740func (client AppsClient) ListInstanceProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionPage, err error) {
21741	if tracing.IsEnabled() {
21742		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot")
21743		defer func() {
21744			sc := -1
21745			if result.pic.Response.Response != nil {
21746				sc = result.pic.Response.Response.StatusCode
21747			}
21748			tracing.EndSpan(ctx, sc, err)
21749		}()
21750	}
21751	if err := validation.Validate([]validation.Validation{
21752		{TargetValue: resourceGroupName,
21753			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21754				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21755				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21756		return result, validation.NewError("web.AppsClient", "ListInstanceProcessesSlot", err.Error())
21757	}
21758
21759	result.fn = client.listInstanceProcessesSlotNextResults
21760	req, err := client.ListInstanceProcessesSlotPreparer(ctx, resourceGroupName, name, slot, instanceID)
21761	if err != nil {
21762		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing request")
21763		return
21764	}
21765
21766	resp, err := client.ListInstanceProcessesSlotSender(req)
21767	if err != nil {
21768		result.pic.Response = autorest.Response{Response: resp}
21769		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending request")
21770		return
21771	}
21772
21773	result.pic, err = client.ListInstanceProcessesSlotResponder(resp)
21774	if err != nil {
21775		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to request")
21776		return
21777	}
21778	if result.pic.hasNextLink() && result.pic.IsEmpty() {
21779		err = result.NextWithContext(ctx)
21780		return
21781	}
21782
21783	return
21784}
21785
21786// ListInstanceProcessesSlotPreparer prepares the ListInstanceProcessesSlot request.
21787func (client AppsClient) ListInstanceProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) {
21788	pathParameters := map[string]interface{}{
21789		"instanceId":        autorest.Encode("path", instanceID),
21790		"name":              autorest.Encode("path", name),
21791		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21792		"slot":              autorest.Encode("path", slot),
21793		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21794	}
21795
21796	const APIVersion = "2020-09-01"
21797	queryParameters := map[string]interface{}{
21798		"api-version": APIVersion,
21799	}
21800
21801	preparer := autorest.CreatePreparer(
21802		autorest.AsGet(),
21803		autorest.WithBaseURL(client.BaseURI),
21804		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes", pathParameters),
21805		autorest.WithQueryParameters(queryParameters))
21806	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21807}
21808
21809// ListInstanceProcessesSlotSender sends the ListInstanceProcessesSlot request. The method will close the
21810// http.Response Body if it receives an error.
21811func (client AppsClient) ListInstanceProcessesSlotSender(req *http.Request) (*http.Response, error) {
21812	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21813}
21814
21815// ListInstanceProcessesSlotResponder handles the response to the ListInstanceProcessesSlot request. The method always
21816// closes the http.Response Body.
21817func (client AppsClient) ListInstanceProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
21818	err = autorest.Respond(
21819		resp,
21820		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21821		autorest.ByUnmarshallingJSON(&result),
21822		autorest.ByClosing())
21823	result.Response = autorest.Response{Response: resp}
21824	return
21825}
21826
21827// listInstanceProcessesSlotNextResults retrieves the next set of results, if any.
21828func (client AppsClient) listInstanceProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
21829	req, err := lastResults.processInfoCollectionPreparer(ctx)
21830	if err != nil {
21831		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", nil, "Failure preparing next results request")
21832	}
21833	if req == nil {
21834		return
21835	}
21836	resp, err := client.ListInstanceProcessesSlotSender(req)
21837	if err != nil {
21838		result.Response = autorest.Response{Response: resp}
21839		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure sending next results request")
21840	}
21841	result, err = client.ListInstanceProcessesSlotResponder(resp)
21842	if err != nil {
21843		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessesSlotNextResults", resp, "Failure responding to next results request")
21844	}
21845	return
21846}
21847
21848// ListInstanceProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required.
21849func (client AppsClient) ListInstanceProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollectionIterator, err error) {
21850	if tracing.IsEnabled() {
21851		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessesSlot")
21852		defer func() {
21853			sc := -1
21854			if result.Response().Response.Response != nil {
21855				sc = result.page.Response().Response.Response.StatusCode
21856			}
21857			tracing.EndSpan(ctx, sc, err)
21858		}()
21859	}
21860	result.page, err = client.ListInstanceProcessesSlot(ctx, resourceGroupName, name, slot, instanceID)
21861	return
21862}
21863
21864// ListInstanceProcessModules description for List module information for a process by its ID for a specific scaled-out
21865// instance in a web site.
21866// Parameters:
21867// resourceGroupName - name of the resource group to which the resource belongs.
21868// name - site name.
21869// processID - pID.
21870// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
21871// response from "GET api/sites/{siteName}/instances".
21872func (client AppsClient) ListInstanceProcessModules(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollectionPage, err error) {
21873	if tracing.IsEnabled() {
21874		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModules")
21875		defer func() {
21876			sc := -1
21877			if result.pmic.Response.Response != nil {
21878				sc = result.pmic.Response.Response.StatusCode
21879			}
21880			tracing.EndSpan(ctx, sc, err)
21881		}()
21882	}
21883	if err := validation.Validate([]validation.Validation{
21884		{TargetValue: resourceGroupName,
21885			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
21886				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
21887				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
21888		return result, validation.NewError("web.AppsClient", "ListInstanceProcessModules", err.Error())
21889	}
21890
21891	result.fn = client.listInstanceProcessModulesNextResults
21892	req, err := client.ListInstanceProcessModulesPreparer(ctx, resourceGroupName, name, processID, instanceID)
21893	if err != nil {
21894		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", nil, "Failure preparing request")
21895		return
21896	}
21897
21898	resp, err := client.ListInstanceProcessModulesSender(req)
21899	if err != nil {
21900		result.pmic.Response = autorest.Response{Response: resp}
21901		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure sending request")
21902		return
21903	}
21904
21905	result.pmic, err = client.ListInstanceProcessModulesResponder(resp)
21906	if err != nil {
21907		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure responding to request")
21908		return
21909	}
21910	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
21911		err = result.NextWithContext(ctx)
21912		return
21913	}
21914
21915	return
21916}
21917
21918// ListInstanceProcessModulesPreparer prepares the ListInstanceProcessModules request.
21919func (client AppsClient) ListInstanceProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
21920	pathParameters := map[string]interface{}{
21921		"instanceId":        autorest.Encode("path", instanceID),
21922		"name":              autorest.Encode("path", name),
21923		"processId":         autorest.Encode("path", processID),
21924		"resourceGroupName": autorest.Encode("path", resourceGroupName),
21925		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
21926	}
21927
21928	const APIVersion = "2020-09-01"
21929	queryParameters := map[string]interface{}{
21930		"api-version": APIVersion,
21931	}
21932
21933	preparer := autorest.CreatePreparer(
21934		autorest.AsGet(),
21935		autorest.WithBaseURL(client.BaseURI),
21936		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules", pathParameters),
21937		autorest.WithQueryParameters(queryParameters))
21938	return preparer.Prepare((&http.Request{}).WithContext(ctx))
21939}
21940
21941// ListInstanceProcessModulesSender sends the ListInstanceProcessModules request. The method will close the
21942// http.Response Body if it receives an error.
21943func (client AppsClient) ListInstanceProcessModulesSender(req *http.Request) (*http.Response, error) {
21944	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
21945}
21946
21947// ListInstanceProcessModulesResponder handles the response to the ListInstanceProcessModules request. The method always
21948// closes the http.Response Body.
21949func (client AppsClient) ListInstanceProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
21950	err = autorest.Respond(
21951		resp,
21952		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
21953		autorest.ByUnmarshallingJSON(&result),
21954		autorest.ByClosing())
21955	result.Response = autorest.Response{Response: resp}
21956	return
21957}
21958
21959// listInstanceProcessModulesNextResults retrieves the next set of results, if any.
21960func (client AppsClient) listInstanceProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
21961	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
21962	if err != nil {
21963		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", nil, "Failure preparing next results request")
21964	}
21965	if req == nil {
21966		return
21967	}
21968	resp, err := client.ListInstanceProcessModulesSender(req)
21969	if err != nil {
21970		result.Response = autorest.Response{Response: resp}
21971		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", resp, "Failure sending next results request")
21972	}
21973	result, err = client.ListInstanceProcessModulesResponder(resp)
21974	if err != nil {
21975		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesNextResults", resp, "Failure responding to next results request")
21976	}
21977	return
21978}
21979
21980// ListInstanceProcessModulesComplete enumerates all values, automatically crossing page boundaries as required.
21981func (client AppsClient) ListInstanceProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollectionIterator, err error) {
21982	if tracing.IsEnabled() {
21983		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModules")
21984		defer func() {
21985			sc := -1
21986			if result.Response().Response.Response != nil {
21987				sc = result.page.Response().Response.Response.StatusCode
21988			}
21989			tracing.EndSpan(ctx, sc, err)
21990		}()
21991	}
21992	result.page, err = client.ListInstanceProcessModules(ctx, resourceGroupName, name, processID, instanceID)
21993	return
21994}
21995
21996// ListInstanceProcessModulesSlot description for List module information for a process by its ID for a specific
21997// scaled-out instance in a web site.
21998// Parameters:
21999// resourceGroupName - name of the resource group to which the resource belongs.
22000// name - site name.
22001// processID - pID.
22002// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
22003// production slot.
22004// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
22005// response from "GET api/sites/{siteName}/instances".
22006func (client AppsClient) ListInstanceProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollectionPage, err error) {
22007	if tracing.IsEnabled() {
22008		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModulesSlot")
22009		defer func() {
22010			sc := -1
22011			if result.pmic.Response.Response != nil {
22012				sc = result.pmic.Response.Response.StatusCode
22013			}
22014			tracing.EndSpan(ctx, sc, err)
22015		}()
22016	}
22017	if err := validation.Validate([]validation.Validation{
22018		{TargetValue: resourceGroupName,
22019			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22020				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22021				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22022		return result, validation.NewError("web.AppsClient", "ListInstanceProcessModulesSlot", err.Error())
22023	}
22024
22025	result.fn = client.listInstanceProcessModulesSlotNextResults
22026	req, err := client.ListInstanceProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
22027	if err != nil {
22028		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", nil, "Failure preparing request")
22029		return
22030	}
22031
22032	resp, err := client.ListInstanceProcessModulesSlotSender(req)
22033	if err != nil {
22034		result.pmic.Response = autorest.Response{Response: resp}
22035		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure sending request")
22036		return
22037	}
22038
22039	result.pmic, err = client.ListInstanceProcessModulesSlotResponder(resp)
22040	if err != nil {
22041		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure responding to request")
22042		return
22043	}
22044	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
22045		err = result.NextWithContext(ctx)
22046		return
22047	}
22048
22049	return
22050}
22051
22052// ListInstanceProcessModulesSlotPreparer prepares the ListInstanceProcessModulesSlot request.
22053func (client AppsClient) ListInstanceProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
22054	pathParameters := map[string]interface{}{
22055		"instanceId":        autorest.Encode("path", instanceID),
22056		"name":              autorest.Encode("path", name),
22057		"processId":         autorest.Encode("path", processID),
22058		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22059		"slot":              autorest.Encode("path", slot),
22060		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22061	}
22062
22063	const APIVersion = "2020-09-01"
22064	queryParameters := map[string]interface{}{
22065		"api-version": APIVersion,
22066	}
22067
22068	preparer := autorest.CreatePreparer(
22069		autorest.AsGet(),
22070		autorest.WithBaseURL(client.BaseURI),
22071		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules", pathParameters),
22072		autorest.WithQueryParameters(queryParameters))
22073	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22074}
22075
22076// ListInstanceProcessModulesSlotSender sends the ListInstanceProcessModulesSlot request. The method will close the
22077// http.Response Body if it receives an error.
22078func (client AppsClient) ListInstanceProcessModulesSlotSender(req *http.Request) (*http.Response, error) {
22079	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22080}
22081
22082// ListInstanceProcessModulesSlotResponder handles the response to the ListInstanceProcessModulesSlot request. The method always
22083// closes the http.Response Body.
22084func (client AppsClient) ListInstanceProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
22085	err = autorest.Respond(
22086		resp,
22087		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22088		autorest.ByUnmarshallingJSON(&result),
22089		autorest.ByClosing())
22090	result.Response = autorest.Response{Response: resp}
22091	return
22092}
22093
22094// listInstanceProcessModulesSlotNextResults retrieves the next set of results, if any.
22095func (client AppsClient) listInstanceProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
22096	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
22097	if err != nil {
22098		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", nil, "Failure preparing next results request")
22099	}
22100	if req == nil {
22101		return
22102	}
22103	resp, err := client.ListInstanceProcessModulesSlotSender(req)
22104	if err != nil {
22105		result.Response = autorest.Response{Response: resp}
22106		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", resp, "Failure sending next results request")
22107	}
22108	result, err = client.ListInstanceProcessModulesSlotResponder(resp)
22109	if err != nil {
22110		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessModulesSlotNextResults", resp, "Failure responding to next results request")
22111	}
22112	return
22113}
22114
22115// ListInstanceProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required.
22116func (client AppsClient) ListInstanceProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollectionIterator, err error) {
22117	if tracing.IsEnabled() {
22118		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessModulesSlot")
22119		defer func() {
22120			sc := -1
22121			if result.Response().Response.Response != nil {
22122				sc = result.page.Response().Response.Response.StatusCode
22123			}
22124			tracing.EndSpan(ctx, sc, err)
22125		}()
22126	}
22127	result.page, err = client.ListInstanceProcessModulesSlot(ctx, resourceGroupName, name, processID, slot, instanceID)
22128	return
22129}
22130
22131// ListInstanceProcessThreads description for List the threads in a process by its ID for a specific scaled-out
22132// instance in a web site.
22133// Parameters:
22134// resourceGroupName - name of the resource group to which the resource belongs.
22135// name - site name.
22136// processID - pID.
22137// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
22138// response from "GET api/sites/{siteName}/instances".
22139func (client AppsClient) ListInstanceProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollectionPage, err error) {
22140	if tracing.IsEnabled() {
22141		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreads")
22142		defer func() {
22143			sc := -1
22144			if result.ptic.Response.Response != nil {
22145				sc = result.ptic.Response.Response.StatusCode
22146			}
22147			tracing.EndSpan(ctx, sc, err)
22148		}()
22149	}
22150	if err := validation.Validate([]validation.Validation{
22151		{TargetValue: resourceGroupName,
22152			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22153				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22154				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22155		return result, validation.NewError("web.AppsClient", "ListInstanceProcessThreads", err.Error())
22156	}
22157
22158	result.fn = client.listInstanceProcessThreadsNextResults
22159	req, err := client.ListInstanceProcessThreadsPreparer(ctx, resourceGroupName, name, processID, instanceID)
22160	if err != nil {
22161		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", nil, "Failure preparing request")
22162		return
22163	}
22164
22165	resp, err := client.ListInstanceProcessThreadsSender(req)
22166	if err != nil {
22167		result.ptic.Response = autorest.Response{Response: resp}
22168		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure sending request")
22169		return
22170	}
22171
22172	result.ptic, err = client.ListInstanceProcessThreadsResponder(resp)
22173	if err != nil {
22174		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure responding to request")
22175		return
22176	}
22177	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
22178		err = result.NextWithContext(ctx)
22179		return
22180	}
22181
22182	return
22183}
22184
22185// ListInstanceProcessThreadsPreparer prepares the ListInstanceProcessThreads request.
22186func (client AppsClient) ListInstanceProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) {
22187	pathParameters := map[string]interface{}{
22188		"instanceId":        autorest.Encode("path", instanceID),
22189		"name":              autorest.Encode("path", name),
22190		"processId":         autorest.Encode("path", processID),
22191		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22192		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22193	}
22194
22195	const APIVersion = "2020-09-01"
22196	queryParameters := map[string]interface{}{
22197		"api-version": APIVersion,
22198	}
22199
22200	preparer := autorest.CreatePreparer(
22201		autorest.AsGet(),
22202		autorest.WithBaseURL(client.BaseURI),
22203		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads", pathParameters),
22204		autorest.WithQueryParameters(queryParameters))
22205	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22206}
22207
22208// ListInstanceProcessThreadsSender sends the ListInstanceProcessThreads request. The method will close the
22209// http.Response Body if it receives an error.
22210func (client AppsClient) ListInstanceProcessThreadsSender(req *http.Request) (*http.Response, error) {
22211	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22212}
22213
22214// ListInstanceProcessThreadsResponder handles the response to the ListInstanceProcessThreads request. The method always
22215// closes the http.Response Body.
22216func (client AppsClient) ListInstanceProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
22217	err = autorest.Respond(
22218		resp,
22219		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22220		autorest.ByUnmarshallingJSON(&result),
22221		autorest.ByClosing())
22222	result.Response = autorest.Response{Response: resp}
22223	return
22224}
22225
22226// listInstanceProcessThreadsNextResults retrieves the next set of results, if any.
22227func (client AppsClient) listInstanceProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
22228	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
22229	if err != nil {
22230		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", nil, "Failure preparing next results request")
22231	}
22232	if req == nil {
22233		return
22234	}
22235	resp, err := client.ListInstanceProcessThreadsSender(req)
22236	if err != nil {
22237		result.Response = autorest.Response{Response: resp}
22238		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", resp, "Failure sending next results request")
22239	}
22240	result, err = client.ListInstanceProcessThreadsResponder(resp)
22241	if err != nil {
22242		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsNextResults", resp, "Failure responding to next results request")
22243	}
22244	return
22245}
22246
22247// ListInstanceProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required.
22248func (client AppsClient) ListInstanceProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollectionIterator, err error) {
22249	if tracing.IsEnabled() {
22250		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreads")
22251		defer func() {
22252			sc := -1
22253			if result.Response().Response.Response != nil {
22254				sc = result.page.Response().Response.Response.StatusCode
22255			}
22256			tracing.EndSpan(ctx, sc, err)
22257		}()
22258	}
22259	result.page, err = client.ListInstanceProcessThreads(ctx, resourceGroupName, name, processID, instanceID)
22260	return
22261}
22262
22263// ListInstanceProcessThreadsSlot description for List the threads in a process by its ID for a specific scaled-out
22264// instance in a web site.
22265// Parameters:
22266// resourceGroupName - name of the resource group to which the resource belongs.
22267// name - site name.
22268// processID - pID.
22269// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
22270// production slot.
22271// instanceID - ID of a specific scaled-out instance. This is the value of the name property in the JSON
22272// response from "GET api/sites/{siteName}/instances".
22273func (client AppsClient) ListInstanceProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollectionPage, err error) {
22274	if tracing.IsEnabled() {
22275		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreadsSlot")
22276		defer func() {
22277			sc := -1
22278			if result.ptic.Response.Response != nil {
22279				sc = result.ptic.Response.Response.StatusCode
22280			}
22281			tracing.EndSpan(ctx, sc, err)
22282		}()
22283	}
22284	if err := validation.Validate([]validation.Validation{
22285		{TargetValue: resourceGroupName,
22286			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22287				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22288				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22289		return result, validation.NewError("web.AppsClient", "ListInstanceProcessThreadsSlot", err.Error())
22290	}
22291
22292	result.fn = client.listInstanceProcessThreadsSlotNextResults
22293	req, err := client.ListInstanceProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot, instanceID)
22294	if err != nil {
22295		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", nil, "Failure preparing request")
22296		return
22297	}
22298
22299	resp, err := client.ListInstanceProcessThreadsSlotSender(req)
22300	if err != nil {
22301		result.ptic.Response = autorest.Response{Response: resp}
22302		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure sending request")
22303		return
22304	}
22305
22306	result.ptic, err = client.ListInstanceProcessThreadsSlotResponder(resp)
22307	if err != nil {
22308		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure responding to request")
22309		return
22310	}
22311	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
22312		err = result.NextWithContext(ctx)
22313		return
22314	}
22315
22316	return
22317}
22318
22319// ListInstanceProcessThreadsSlotPreparer prepares the ListInstanceProcessThreadsSlot request.
22320func (client AppsClient) ListInstanceProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) {
22321	pathParameters := map[string]interface{}{
22322		"instanceId":        autorest.Encode("path", instanceID),
22323		"name":              autorest.Encode("path", name),
22324		"processId":         autorest.Encode("path", processID),
22325		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22326		"slot":              autorest.Encode("path", slot),
22327		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22328	}
22329
22330	const APIVersion = "2020-09-01"
22331	queryParameters := map[string]interface{}{
22332		"api-version": APIVersion,
22333	}
22334
22335	preparer := autorest.CreatePreparer(
22336		autorest.AsGet(),
22337		autorest.WithBaseURL(client.BaseURI),
22338		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads", pathParameters),
22339		autorest.WithQueryParameters(queryParameters))
22340	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22341}
22342
22343// ListInstanceProcessThreadsSlotSender sends the ListInstanceProcessThreadsSlot request. The method will close the
22344// http.Response Body if it receives an error.
22345func (client AppsClient) ListInstanceProcessThreadsSlotSender(req *http.Request) (*http.Response, error) {
22346	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22347}
22348
22349// ListInstanceProcessThreadsSlotResponder handles the response to the ListInstanceProcessThreadsSlot request. The method always
22350// closes the http.Response Body.
22351func (client AppsClient) ListInstanceProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
22352	err = autorest.Respond(
22353		resp,
22354		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22355		autorest.ByUnmarshallingJSON(&result),
22356		autorest.ByClosing())
22357	result.Response = autorest.Response{Response: resp}
22358	return
22359}
22360
22361// listInstanceProcessThreadsSlotNextResults retrieves the next set of results, if any.
22362func (client AppsClient) listInstanceProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
22363	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
22364	if err != nil {
22365		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", nil, "Failure preparing next results request")
22366	}
22367	if req == nil {
22368		return
22369	}
22370	resp, err := client.ListInstanceProcessThreadsSlotSender(req)
22371	if err != nil {
22372		result.Response = autorest.Response{Response: resp}
22373		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", resp, "Failure sending next results request")
22374	}
22375	result, err = client.ListInstanceProcessThreadsSlotResponder(resp)
22376	if err != nil {
22377		err = autorest.NewErrorWithError(err, "web.AppsClient", "listInstanceProcessThreadsSlotNextResults", resp, "Failure responding to next results request")
22378	}
22379	return
22380}
22381
22382// ListInstanceProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required.
22383func (client AppsClient) ListInstanceProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollectionIterator, err error) {
22384	if tracing.IsEnabled() {
22385		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListInstanceProcessThreadsSlot")
22386		defer func() {
22387			sc := -1
22388			if result.Response().Response.Response != nil {
22389				sc = result.page.Response().Response.Response.StatusCode
22390			}
22391			tracing.EndSpan(ctx, sc, err)
22392		}()
22393	}
22394	result.page, err = client.ListInstanceProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot, instanceID)
22395	return
22396}
22397
22398// ListMetadata description for Gets the metadata of an app.
22399// Parameters:
22400// resourceGroupName - name of the resource group to which the resource belongs.
22401// name - name of the app.
22402func (client AppsClient) ListMetadata(ctx context.Context, resourceGroupName string, name string) (result StringDictionary, err error) {
22403	if tracing.IsEnabled() {
22404		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetadata")
22405		defer func() {
22406			sc := -1
22407			if result.Response.Response != nil {
22408				sc = result.Response.Response.StatusCode
22409			}
22410			tracing.EndSpan(ctx, sc, err)
22411		}()
22412	}
22413	if err := validation.Validate([]validation.Validation{
22414		{TargetValue: resourceGroupName,
22415			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22416				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22417				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22418		return result, validation.NewError("web.AppsClient", "ListMetadata", err.Error())
22419	}
22420
22421	req, err := client.ListMetadataPreparer(ctx, resourceGroupName, name)
22422	if err != nil {
22423		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", nil, "Failure preparing request")
22424		return
22425	}
22426
22427	resp, err := client.ListMetadataSender(req)
22428	if err != nil {
22429		result.Response = autorest.Response{Response: resp}
22430		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", resp, "Failure sending request")
22431		return
22432	}
22433
22434	result, err = client.ListMetadataResponder(resp)
22435	if err != nil {
22436		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadata", resp, "Failure responding to request")
22437		return
22438	}
22439
22440	return
22441}
22442
22443// ListMetadataPreparer prepares the ListMetadata request.
22444func (client AppsClient) ListMetadataPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
22445	pathParameters := map[string]interface{}{
22446		"name":              autorest.Encode("path", name),
22447		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22448		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22449	}
22450
22451	const APIVersion = "2020-09-01"
22452	queryParameters := map[string]interface{}{
22453		"api-version": APIVersion,
22454	}
22455
22456	preparer := autorest.CreatePreparer(
22457		autorest.AsPost(),
22458		autorest.WithBaseURL(client.BaseURI),
22459		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list", pathParameters),
22460		autorest.WithQueryParameters(queryParameters))
22461	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22462}
22463
22464// ListMetadataSender sends the ListMetadata request. The method will close the
22465// http.Response Body if it receives an error.
22466func (client AppsClient) ListMetadataSender(req *http.Request) (*http.Response, error) {
22467	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22468}
22469
22470// ListMetadataResponder handles the response to the ListMetadata request. The method always
22471// closes the http.Response Body.
22472func (client AppsClient) ListMetadataResponder(resp *http.Response) (result StringDictionary, err error) {
22473	err = autorest.Respond(
22474		resp,
22475		azure.WithErrorUnlessStatusCode(http.StatusOK),
22476		autorest.ByUnmarshallingJSON(&result),
22477		autorest.ByClosing())
22478	result.Response = autorest.Response{Response: resp}
22479	return
22480}
22481
22482// ListMetadataSlot description for Gets the metadata of an app.
22483// Parameters:
22484// resourceGroupName - name of the resource group to which the resource belongs.
22485// name - name of the app.
22486// slot - name of the deployment slot. If a slot is not specified, the API will get the metadata for the
22487// production slot.
22488func (client AppsClient) ListMetadataSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result StringDictionary, err error) {
22489	if tracing.IsEnabled() {
22490		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListMetadataSlot")
22491		defer func() {
22492			sc := -1
22493			if result.Response.Response != nil {
22494				sc = result.Response.Response.StatusCode
22495			}
22496			tracing.EndSpan(ctx, sc, err)
22497		}()
22498	}
22499	if err := validation.Validate([]validation.Validation{
22500		{TargetValue: resourceGroupName,
22501			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22502				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22503				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22504		return result, validation.NewError("web.AppsClient", "ListMetadataSlot", err.Error())
22505	}
22506
22507	req, err := client.ListMetadataSlotPreparer(ctx, resourceGroupName, name, slot)
22508	if err != nil {
22509		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", nil, "Failure preparing request")
22510		return
22511	}
22512
22513	resp, err := client.ListMetadataSlotSender(req)
22514	if err != nil {
22515		result.Response = autorest.Response{Response: resp}
22516		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", resp, "Failure sending request")
22517		return
22518	}
22519
22520	result, err = client.ListMetadataSlotResponder(resp)
22521	if err != nil {
22522		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListMetadataSlot", resp, "Failure responding to request")
22523		return
22524	}
22525
22526	return
22527}
22528
22529// ListMetadataSlotPreparer prepares the ListMetadataSlot request.
22530func (client AppsClient) ListMetadataSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
22531	pathParameters := map[string]interface{}{
22532		"name":              autorest.Encode("path", name),
22533		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22534		"slot":              autorest.Encode("path", slot),
22535		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22536	}
22537
22538	const APIVersion = "2020-09-01"
22539	queryParameters := map[string]interface{}{
22540		"api-version": APIVersion,
22541	}
22542
22543	preparer := autorest.CreatePreparer(
22544		autorest.AsPost(),
22545		autorest.WithBaseURL(client.BaseURI),
22546		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list", pathParameters),
22547		autorest.WithQueryParameters(queryParameters))
22548	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22549}
22550
22551// ListMetadataSlotSender sends the ListMetadataSlot request. The method will close the
22552// http.Response Body if it receives an error.
22553func (client AppsClient) ListMetadataSlotSender(req *http.Request) (*http.Response, error) {
22554	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22555}
22556
22557// ListMetadataSlotResponder handles the response to the ListMetadataSlot request. The method always
22558// closes the http.Response Body.
22559func (client AppsClient) ListMetadataSlotResponder(resp *http.Response) (result StringDictionary, err error) {
22560	err = autorest.Respond(
22561		resp,
22562		azure.WithErrorUnlessStatusCode(http.StatusOK),
22563		autorest.ByUnmarshallingJSON(&result),
22564		autorest.ByClosing())
22565	result.Response = autorest.Response{Response: resp}
22566	return
22567}
22568
22569// ListNetworkFeatures description for Gets all network features used by the app (or deployment slot, if specified).
22570// Parameters:
22571// resourceGroupName - name of the resource group to which the resource belongs.
22572// name - name of the app.
22573// view - the type of view. This can either be "summary" or "detailed".
22574func (client AppsClient) ListNetworkFeatures(ctx context.Context, resourceGroupName string, name string, view string) (result NetworkFeatures, err error) {
22575	if tracing.IsEnabled() {
22576		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListNetworkFeatures")
22577		defer func() {
22578			sc := -1
22579			if result.Response.Response != nil {
22580				sc = result.Response.Response.StatusCode
22581			}
22582			tracing.EndSpan(ctx, sc, err)
22583		}()
22584	}
22585	if err := validation.Validate([]validation.Validation{
22586		{TargetValue: resourceGroupName,
22587			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22588				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22589				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22590		return result, validation.NewError("web.AppsClient", "ListNetworkFeatures", err.Error())
22591	}
22592
22593	req, err := client.ListNetworkFeaturesPreparer(ctx, resourceGroupName, name, view)
22594	if err != nil {
22595		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", nil, "Failure preparing request")
22596		return
22597	}
22598
22599	resp, err := client.ListNetworkFeaturesSender(req)
22600	if err != nil {
22601		result.Response = autorest.Response{Response: resp}
22602		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", resp, "Failure sending request")
22603		return
22604	}
22605
22606	result, err = client.ListNetworkFeaturesResponder(resp)
22607	if err != nil {
22608		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeatures", resp, "Failure responding to request")
22609		return
22610	}
22611
22612	return
22613}
22614
22615// ListNetworkFeaturesPreparer prepares the ListNetworkFeatures request.
22616func (client AppsClient) ListNetworkFeaturesPreparer(ctx context.Context, resourceGroupName string, name string, view string) (*http.Request, error) {
22617	pathParameters := map[string]interface{}{
22618		"name":              autorest.Encode("path", name),
22619		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22620		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22621		"view":              autorest.Encode("path", view),
22622	}
22623
22624	const APIVersion = "2020-09-01"
22625	queryParameters := map[string]interface{}{
22626		"api-version": APIVersion,
22627	}
22628
22629	preparer := autorest.CreatePreparer(
22630		autorest.AsGet(),
22631		autorest.WithBaseURL(client.BaseURI),
22632		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}", pathParameters),
22633		autorest.WithQueryParameters(queryParameters))
22634	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22635}
22636
22637// ListNetworkFeaturesSender sends the ListNetworkFeatures request. The method will close the
22638// http.Response Body if it receives an error.
22639func (client AppsClient) ListNetworkFeaturesSender(req *http.Request) (*http.Response, error) {
22640	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22641}
22642
22643// ListNetworkFeaturesResponder handles the response to the ListNetworkFeatures request. The method always
22644// closes the http.Response Body.
22645func (client AppsClient) ListNetworkFeaturesResponder(resp *http.Response) (result NetworkFeatures, err error) {
22646	err = autorest.Respond(
22647		resp,
22648		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22649		autorest.ByUnmarshallingJSON(&result),
22650		autorest.ByClosing())
22651	result.Response = autorest.Response{Response: resp}
22652	return
22653}
22654
22655// ListNetworkFeaturesSlot description for Gets all network features used by the app (or deployment slot, if
22656// specified).
22657// Parameters:
22658// resourceGroupName - name of the resource group to which the resource belongs.
22659// name - name of the app.
22660// view - the type of view. This can either be "summary" or "detailed".
22661// slot - name of the deployment slot. If a slot is not specified, the API will get network features for the
22662// production slot.
22663func (client AppsClient) ListNetworkFeaturesSlot(ctx context.Context, resourceGroupName string, name string, view string, slot string) (result NetworkFeatures, err error) {
22664	if tracing.IsEnabled() {
22665		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListNetworkFeaturesSlot")
22666		defer func() {
22667			sc := -1
22668			if result.Response.Response != nil {
22669				sc = result.Response.Response.StatusCode
22670			}
22671			tracing.EndSpan(ctx, sc, err)
22672		}()
22673	}
22674	if err := validation.Validate([]validation.Validation{
22675		{TargetValue: resourceGroupName,
22676			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22677				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22678				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22679		return result, validation.NewError("web.AppsClient", "ListNetworkFeaturesSlot", err.Error())
22680	}
22681
22682	req, err := client.ListNetworkFeaturesSlotPreparer(ctx, resourceGroupName, name, view, slot)
22683	if err != nil {
22684		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", nil, "Failure preparing request")
22685		return
22686	}
22687
22688	resp, err := client.ListNetworkFeaturesSlotSender(req)
22689	if err != nil {
22690		result.Response = autorest.Response{Response: resp}
22691		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", resp, "Failure sending request")
22692		return
22693	}
22694
22695	result, err = client.ListNetworkFeaturesSlotResponder(resp)
22696	if err != nil {
22697		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListNetworkFeaturesSlot", resp, "Failure responding to request")
22698		return
22699	}
22700
22701	return
22702}
22703
22704// ListNetworkFeaturesSlotPreparer prepares the ListNetworkFeaturesSlot request.
22705func (client AppsClient) ListNetworkFeaturesSlotPreparer(ctx context.Context, resourceGroupName string, name string, view string, slot string) (*http.Request, error) {
22706	pathParameters := map[string]interface{}{
22707		"name":              autorest.Encode("path", name),
22708		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22709		"slot":              autorest.Encode("path", slot),
22710		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22711		"view":              autorest.Encode("path", view),
22712	}
22713
22714	const APIVersion = "2020-09-01"
22715	queryParameters := map[string]interface{}{
22716		"api-version": APIVersion,
22717	}
22718
22719	preparer := autorest.CreatePreparer(
22720		autorest.AsGet(),
22721		autorest.WithBaseURL(client.BaseURI),
22722		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}", pathParameters),
22723		autorest.WithQueryParameters(queryParameters))
22724	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22725}
22726
22727// ListNetworkFeaturesSlotSender sends the ListNetworkFeaturesSlot request. The method will close the
22728// http.Response Body if it receives an error.
22729func (client AppsClient) ListNetworkFeaturesSlotSender(req *http.Request) (*http.Response, error) {
22730	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22731}
22732
22733// ListNetworkFeaturesSlotResponder handles the response to the ListNetworkFeaturesSlot request. The method always
22734// closes the http.Response Body.
22735func (client AppsClient) ListNetworkFeaturesSlotResponder(resp *http.Response) (result NetworkFeatures, err error) {
22736	err = autorest.Respond(
22737		resp,
22738		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
22739		autorest.ByUnmarshallingJSON(&result),
22740		autorest.ByClosing())
22741	result.Response = autorest.Response{Response: resp}
22742	return
22743}
22744
22745// ListPerfMonCounters description for Gets perfmon counters for web app.
22746// Parameters:
22747// resourceGroupName - name of the resource group to which the resource belongs.
22748// name - name of web app.
22749// filter - return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example:
22750// $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
22751// duration'[Hour|Minute|Day]'.
22752func (client AppsClient) ListPerfMonCounters(ctx context.Context, resourceGroupName string, name string, filter string) (result PerfMonCounterCollectionPage, err error) {
22753	if tracing.IsEnabled() {
22754		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCounters")
22755		defer func() {
22756			sc := -1
22757			if result.pmcc.Response.Response != nil {
22758				sc = result.pmcc.Response.Response.StatusCode
22759			}
22760			tracing.EndSpan(ctx, sc, err)
22761		}()
22762	}
22763	if err := validation.Validate([]validation.Validation{
22764		{TargetValue: resourceGroupName,
22765			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22766				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22767				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22768		return result, validation.NewError("web.AppsClient", "ListPerfMonCounters", err.Error())
22769	}
22770
22771	result.fn = client.listPerfMonCountersNextResults
22772	req, err := client.ListPerfMonCountersPreparer(ctx, resourceGroupName, name, filter)
22773	if err != nil {
22774		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", nil, "Failure preparing request")
22775		return
22776	}
22777
22778	resp, err := client.ListPerfMonCountersSender(req)
22779	if err != nil {
22780		result.pmcc.Response = autorest.Response{Response: resp}
22781		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", resp, "Failure sending request")
22782		return
22783	}
22784
22785	result.pmcc, err = client.ListPerfMonCountersResponder(resp)
22786	if err != nil {
22787		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCounters", resp, "Failure responding to request")
22788		return
22789	}
22790	if result.pmcc.hasNextLink() && result.pmcc.IsEmpty() {
22791		err = result.NextWithContext(ctx)
22792		return
22793	}
22794
22795	return
22796}
22797
22798// ListPerfMonCountersPreparer prepares the ListPerfMonCounters request.
22799func (client AppsClient) ListPerfMonCountersPreparer(ctx context.Context, resourceGroupName string, name string, filter string) (*http.Request, error) {
22800	pathParameters := map[string]interface{}{
22801		"name":              autorest.Encode("path", name),
22802		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22803		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22804	}
22805
22806	const APIVersion = "2020-09-01"
22807	queryParameters := map[string]interface{}{
22808		"api-version": APIVersion,
22809	}
22810	if len(filter) > 0 {
22811		queryParameters["$filter"] = filter
22812	}
22813
22814	preparer := autorest.CreatePreparer(
22815		autorest.AsGet(),
22816		autorest.WithBaseURL(client.BaseURI),
22817		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters", pathParameters),
22818		autorest.WithQueryParameters(queryParameters))
22819	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22820}
22821
22822// ListPerfMonCountersSender sends the ListPerfMonCounters request. The method will close the
22823// http.Response Body if it receives an error.
22824func (client AppsClient) ListPerfMonCountersSender(req *http.Request) (*http.Response, error) {
22825	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22826}
22827
22828// ListPerfMonCountersResponder handles the response to the ListPerfMonCounters request. The method always
22829// closes the http.Response Body.
22830func (client AppsClient) ListPerfMonCountersResponder(resp *http.Response) (result PerfMonCounterCollection, err error) {
22831	err = autorest.Respond(
22832		resp,
22833		azure.WithErrorUnlessStatusCode(http.StatusOK),
22834		autorest.ByUnmarshallingJSON(&result),
22835		autorest.ByClosing())
22836	result.Response = autorest.Response{Response: resp}
22837	return
22838}
22839
22840// listPerfMonCountersNextResults retrieves the next set of results, if any.
22841func (client AppsClient) listPerfMonCountersNextResults(ctx context.Context, lastResults PerfMonCounterCollection) (result PerfMonCounterCollection, err error) {
22842	req, err := lastResults.perfMonCounterCollectionPreparer(ctx)
22843	if err != nil {
22844		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", nil, "Failure preparing next results request")
22845	}
22846	if req == nil {
22847		return
22848	}
22849	resp, err := client.ListPerfMonCountersSender(req)
22850	if err != nil {
22851		result.Response = autorest.Response{Response: resp}
22852		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", resp, "Failure sending next results request")
22853	}
22854	result, err = client.ListPerfMonCountersResponder(resp)
22855	if err != nil {
22856		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersNextResults", resp, "Failure responding to next results request")
22857	}
22858	return
22859}
22860
22861// ListPerfMonCountersComplete enumerates all values, automatically crossing page boundaries as required.
22862func (client AppsClient) ListPerfMonCountersComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result PerfMonCounterCollectionIterator, err error) {
22863	if tracing.IsEnabled() {
22864		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCounters")
22865		defer func() {
22866			sc := -1
22867			if result.Response().Response.Response != nil {
22868				sc = result.page.Response().Response.Response.StatusCode
22869			}
22870			tracing.EndSpan(ctx, sc, err)
22871		}()
22872	}
22873	result.page, err = client.ListPerfMonCounters(ctx, resourceGroupName, name, filter)
22874	return
22875}
22876
22877// ListPerfMonCountersSlot description for Gets perfmon counters for web app.
22878// Parameters:
22879// resourceGroupName - name of the resource group to which the resource belongs.
22880// name - name of web app.
22881// slot - name of web app slot. If not specified then will default to production slot.
22882// filter - return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example:
22883// $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
22884// duration'[Hour|Minute|Day]'.
22885func (client AppsClient) ListPerfMonCountersSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollectionPage, err error) {
22886	if tracing.IsEnabled() {
22887		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCountersSlot")
22888		defer func() {
22889			sc := -1
22890			if result.pmcc.Response.Response != nil {
22891				sc = result.pmcc.Response.Response.StatusCode
22892			}
22893			tracing.EndSpan(ctx, sc, err)
22894		}()
22895	}
22896	if err := validation.Validate([]validation.Validation{
22897		{TargetValue: resourceGroupName,
22898			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
22899				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
22900				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
22901		return result, validation.NewError("web.AppsClient", "ListPerfMonCountersSlot", err.Error())
22902	}
22903
22904	result.fn = client.listPerfMonCountersSlotNextResults
22905	req, err := client.ListPerfMonCountersSlotPreparer(ctx, resourceGroupName, name, slot, filter)
22906	if err != nil {
22907		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", nil, "Failure preparing request")
22908		return
22909	}
22910
22911	resp, err := client.ListPerfMonCountersSlotSender(req)
22912	if err != nil {
22913		result.pmcc.Response = autorest.Response{Response: resp}
22914		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", resp, "Failure sending request")
22915		return
22916	}
22917
22918	result.pmcc, err = client.ListPerfMonCountersSlotResponder(resp)
22919	if err != nil {
22920		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPerfMonCountersSlot", resp, "Failure responding to request")
22921		return
22922	}
22923	if result.pmcc.hasNextLink() && result.pmcc.IsEmpty() {
22924		err = result.NextWithContext(ctx)
22925		return
22926	}
22927
22928	return
22929}
22930
22931// ListPerfMonCountersSlotPreparer prepares the ListPerfMonCountersSlot request.
22932func (client AppsClient) ListPerfMonCountersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (*http.Request, error) {
22933	pathParameters := map[string]interface{}{
22934		"name":              autorest.Encode("path", name),
22935		"resourceGroupName": autorest.Encode("path", resourceGroupName),
22936		"slot":              autorest.Encode("path", slot),
22937		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
22938	}
22939
22940	const APIVersion = "2020-09-01"
22941	queryParameters := map[string]interface{}{
22942		"api-version": APIVersion,
22943	}
22944	if len(filter) > 0 {
22945		queryParameters["$filter"] = filter
22946	}
22947
22948	preparer := autorest.CreatePreparer(
22949		autorest.AsGet(),
22950		autorest.WithBaseURL(client.BaseURI),
22951		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters", pathParameters),
22952		autorest.WithQueryParameters(queryParameters))
22953	return preparer.Prepare((&http.Request{}).WithContext(ctx))
22954}
22955
22956// ListPerfMonCountersSlotSender sends the ListPerfMonCountersSlot request. The method will close the
22957// http.Response Body if it receives an error.
22958func (client AppsClient) ListPerfMonCountersSlotSender(req *http.Request) (*http.Response, error) {
22959	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
22960}
22961
22962// ListPerfMonCountersSlotResponder handles the response to the ListPerfMonCountersSlot request. The method always
22963// closes the http.Response Body.
22964func (client AppsClient) ListPerfMonCountersSlotResponder(resp *http.Response) (result PerfMonCounterCollection, err error) {
22965	err = autorest.Respond(
22966		resp,
22967		azure.WithErrorUnlessStatusCode(http.StatusOK),
22968		autorest.ByUnmarshallingJSON(&result),
22969		autorest.ByClosing())
22970	result.Response = autorest.Response{Response: resp}
22971	return
22972}
22973
22974// listPerfMonCountersSlotNextResults retrieves the next set of results, if any.
22975func (client AppsClient) listPerfMonCountersSlotNextResults(ctx context.Context, lastResults PerfMonCounterCollection) (result PerfMonCounterCollection, err error) {
22976	req, err := lastResults.perfMonCounterCollectionPreparer(ctx)
22977	if err != nil {
22978		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", nil, "Failure preparing next results request")
22979	}
22980	if req == nil {
22981		return
22982	}
22983	resp, err := client.ListPerfMonCountersSlotSender(req)
22984	if err != nil {
22985		result.Response = autorest.Response{Response: resp}
22986		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", resp, "Failure sending next results request")
22987	}
22988	result, err = client.ListPerfMonCountersSlotResponder(resp)
22989	if err != nil {
22990		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPerfMonCountersSlotNextResults", resp, "Failure responding to next results request")
22991	}
22992	return
22993}
22994
22995// ListPerfMonCountersSlotComplete enumerates all values, automatically crossing page boundaries as required.
22996func (client AppsClient) ListPerfMonCountersSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollectionIterator, err error) {
22997	if tracing.IsEnabled() {
22998		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPerfMonCountersSlot")
22999		defer func() {
23000			sc := -1
23001			if result.Response().Response.Response != nil {
23002				sc = result.page.Response().Response.Response.StatusCode
23003			}
23004			tracing.EndSpan(ctx, sc, err)
23005		}()
23006	}
23007	result.page, err = client.ListPerfMonCountersSlot(ctx, resourceGroupName, name, slot, filter)
23008	return
23009}
23010
23011// ListPremierAddOns description for Gets the premier add-ons of an app.
23012// Parameters:
23013// resourceGroupName - name of the resource group to which the resource belongs.
23014// name - name of the app.
23015func (client AppsClient) ListPremierAddOns(ctx context.Context, resourceGroupName string, name string) (result PremierAddOn, err error) {
23016	if tracing.IsEnabled() {
23017		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPremierAddOns")
23018		defer func() {
23019			sc := -1
23020			if result.Response.Response != nil {
23021				sc = result.Response.Response.StatusCode
23022			}
23023			tracing.EndSpan(ctx, sc, err)
23024		}()
23025	}
23026	if err := validation.Validate([]validation.Validation{
23027		{TargetValue: resourceGroupName,
23028			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23029				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23030				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23031		return result, validation.NewError("web.AppsClient", "ListPremierAddOns", err.Error())
23032	}
23033
23034	req, err := client.ListPremierAddOnsPreparer(ctx, resourceGroupName, name)
23035	if err != nil {
23036		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", nil, "Failure preparing request")
23037		return
23038	}
23039
23040	resp, err := client.ListPremierAddOnsSender(req)
23041	if err != nil {
23042		result.Response = autorest.Response{Response: resp}
23043		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", resp, "Failure sending request")
23044		return
23045	}
23046
23047	result, err = client.ListPremierAddOnsResponder(resp)
23048	if err != nil {
23049		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOns", resp, "Failure responding to request")
23050		return
23051	}
23052
23053	return
23054}
23055
23056// ListPremierAddOnsPreparer prepares the ListPremierAddOns request.
23057func (client AppsClient) ListPremierAddOnsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
23058	pathParameters := map[string]interface{}{
23059		"name":              autorest.Encode("path", name),
23060		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23061		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23062	}
23063
23064	const APIVersion = "2020-09-01"
23065	queryParameters := map[string]interface{}{
23066		"api-version": APIVersion,
23067	}
23068
23069	preparer := autorest.CreatePreparer(
23070		autorest.AsGet(),
23071		autorest.WithBaseURL(client.BaseURI),
23072		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons", pathParameters),
23073		autorest.WithQueryParameters(queryParameters))
23074	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23075}
23076
23077// ListPremierAddOnsSender sends the ListPremierAddOns request. The method will close the
23078// http.Response Body if it receives an error.
23079func (client AppsClient) ListPremierAddOnsSender(req *http.Request) (*http.Response, error) {
23080	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23081}
23082
23083// ListPremierAddOnsResponder handles the response to the ListPremierAddOns request. The method always
23084// closes the http.Response Body.
23085func (client AppsClient) ListPremierAddOnsResponder(resp *http.Response) (result PremierAddOn, err error) {
23086	err = autorest.Respond(
23087		resp,
23088		azure.WithErrorUnlessStatusCode(http.StatusOK),
23089		autorest.ByUnmarshallingJSON(&result),
23090		autorest.ByClosing())
23091	result.Response = autorest.Response{Response: resp}
23092	return
23093}
23094
23095// ListPremierAddOnsSlot description for Gets the premier add-ons of an app.
23096// Parameters:
23097// resourceGroupName - name of the resource group to which the resource belongs.
23098// name - name of the app.
23099// slot - name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the
23100// production slot.
23101func (client AppsClient) ListPremierAddOnsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PremierAddOn, err error) {
23102	if tracing.IsEnabled() {
23103		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPremierAddOnsSlot")
23104		defer func() {
23105			sc := -1
23106			if result.Response.Response != nil {
23107				sc = result.Response.Response.StatusCode
23108			}
23109			tracing.EndSpan(ctx, sc, err)
23110		}()
23111	}
23112	if err := validation.Validate([]validation.Validation{
23113		{TargetValue: resourceGroupName,
23114			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23115				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23116				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23117		return result, validation.NewError("web.AppsClient", "ListPremierAddOnsSlot", err.Error())
23118	}
23119
23120	req, err := client.ListPremierAddOnsSlotPreparer(ctx, resourceGroupName, name, slot)
23121	if err != nil {
23122		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", nil, "Failure preparing request")
23123		return
23124	}
23125
23126	resp, err := client.ListPremierAddOnsSlotSender(req)
23127	if err != nil {
23128		result.Response = autorest.Response{Response: resp}
23129		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", resp, "Failure sending request")
23130		return
23131	}
23132
23133	result, err = client.ListPremierAddOnsSlotResponder(resp)
23134	if err != nil {
23135		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPremierAddOnsSlot", resp, "Failure responding to request")
23136		return
23137	}
23138
23139	return
23140}
23141
23142// ListPremierAddOnsSlotPreparer prepares the ListPremierAddOnsSlot request.
23143func (client AppsClient) ListPremierAddOnsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
23144	pathParameters := map[string]interface{}{
23145		"name":              autorest.Encode("path", name),
23146		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23147		"slot":              autorest.Encode("path", slot),
23148		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23149	}
23150
23151	const APIVersion = "2020-09-01"
23152	queryParameters := map[string]interface{}{
23153		"api-version": APIVersion,
23154	}
23155
23156	preparer := autorest.CreatePreparer(
23157		autorest.AsGet(),
23158		autorest.WithBaseURL(client.BaseURI),
23159		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons", pathParameters),
23160		autorest.WithQueryParameters(queryParameters))
23161	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23162}
23163
23164// ListPremierAddOnsSlotSender sends the ListPremierAddOnsSlot request. The method will close the
23165// http.Response Body if it receives an error.
23166func (client AppsClient) ListPremierAddOnsSlotSender(req *http.Request) (*http.Response, error) {
23167	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23168}
23169
23170// ListPremierAddOnsSlotResponder handles the response to the ListPremierAddOnsSlot request. The method always
23171// closes the http.Response Body.
23172func (client AppsClient) ListPremierAddOnsSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
23173	err = autorest.Respond(
23174		resp,
23175		azure.WithErrorUnlessStatusCode(http.StatusOK),
23176		autorest.ByUnmarshallingJSON(&result),
23177		autorest.ByClosing())
23178	result.Response = autorest.Response{Response: resp}
23179	return
23180}
23181
23182// ListProcesses description for Get list of processes for a web site, or a deployment slot, or for a specific
23183// scaled-out instance in a web site.
23184// Parameters:
23185// resourceGroupName - name of the resource group to which the resource belongs.
23186// name - site name.
23187func (client AppsClient) ListProcesses(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionPage, err error) {
23188	if tracing.IsEnabled() {
23189		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses")
23190		defer func() {
23191			sc := -1
23192			if result.pic.Response.Response != nil {
23193				sc = result.pic.Response.Response.StatusCode
23194			}
23195			tracing.EndSpan(ctx, sc, err)
23196		}()
23197	}
23198	if err := validation.Validate([]validation.Validation{
23199		{TargetValue: resourceGroupName,
23200			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23201				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23202				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23203		return result, validation.NewError("web.AppsClient", "ListProcesses", err.Error())
23204	}
23205
23206	result.fn = client.listProcessesNextResults
23207	req, err := client.ListProcessesPreparer(ctx, resourceGroupName, name)
23208	if err != nil {
23209		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing request")
23210		return
23211	}
23212
23213	resp, err := client.ListProcessesSender(req)
23214	if err != nil {
23215		result.pic.Response = autorest.Response{Response: resp}
23216		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending request")
23217		return
23218	}
23219
23220	result.pic, err = client.ListProcessesResponder(resp)
23221	if err != nil {
23222		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to request")
23223		return
23224	}
23225	if result.pic.hasNextLink() && result.pic.IsEmpty() {
23226		err = result.NextWithContext(ctx)
23227		return
23228	}
23229
23230	return
23231}
23232
23233// ListProcessesPreparer prepares the ListProcesses request.
23234func (client AppsClient) ListProcessesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
23235	pathParameters := map[string]interface{}{
23236		"name":              autorest.Encode("path", name),
23237		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23238		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23239	}
23240
23241	const APIVersion = "2020-09-01"
23242	queryParameters := map[string]interface{}{
23243		"api-version": APIVersion,
23244	}
23245
23246	preparer := autorest.CreatePreparer(
23247		autorest.AsGet(),
23248		autorest.WithBaseURL(client.BaseURI),
23249		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes", pathParameters),
23250		autorest.WithQueryParameters(queryParameters))
23251	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23252}
23253
23254// ListProcessesSender sends the ListProcesses request. The method will close the
23255// http.Response Body if it receives an error.
23256func (client AppsClient) ListProcessesSender(req *http.Request) (*http.Response, error) {
23257	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23258}
23259
23260// ListProcessesResponder handles the response to the ListProcesses request. The method always
23261// closes the http.Response Body.
23262func (client AppsClient) ListProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
23263	err = autorest.Respond(
23264		resp,
23265		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23266		autorest.ByUnmarshallingJSON(&result),
23267		autorest.ByClosing())
23268	result.Response = autorest.Response{Response: resp}
23269	return
23270}
23271
23272// listProcessesNextResults retrieves the next set of results, if any.
23273func (client AppsClient) listProcessesNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
23274	req, err := lastResults.processInfoCollectionPreparer(ctx)
23275	if err != nil {
23276		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", nil, "Failure preparing next results request")
23277	}
23278	if req == nil {
23279		return
23280	}
23281	resp, err := client.ListProcessesSender(req)
23282	if err != nil {
23283		result.Response = autorest.Response{Response: resp}
23284		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure sending next results request")
23285	}
23286	result, err = client.ListProcessesResponder(resp)
23287	if err != nil {
23288		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesNextResults", resp, "Failure responding to next results request")
23289	}
23290	return
23291}
23292
23293// ListProcessesComplete enumerates all values, automatically crossing page boundaries as required.
23294func (client AppsClient) ListProcessesComplete(ctx context.Context, resourceGroupName string, name string) (result ProcessInfoCollectionIterator, err error) {
23295	if tracing.IsEnabled() {
23296		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcesses")
23297		defer func() {
23298			sc := -1
23299			if result.Response().Response.Response != nil {
23300				sc = result.page.Response().Response.Response.StatusCode
23301			}
23302			tracing.EndSpan(ctx, sc, err)
23303		}()
23304	}
23305	result.page, err = client.ListProcesses(ctx, resourceGroupName, name)
23306	return
23307}
23308
23309// ListProcessesSlot description for Get list of processes for a web site, or a deployment slot, or for a specific
23310// scaled-out instance in a web site.
23311// Parameters:
23312// resourceGroupName - name of the resource group to which the resource belongs.
23313// name - site name.
23314// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23315// production slot.
23316func (client AppsClient) ListProcessesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionPage, err error) {
23317	if tracing.IsEnabled() {
23318		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot")
23319		defer func() {
23320			sc := -1
23321			if result.pic.Response.Response != nil {
23322				sc = result.pic.Response.Response.StatusCode
23323			}
23324			tracing.EndSpan(ctx, sc, err)
23325		}()
23326	}
23327	if err := validation.Validate([]validation.Validation{
23328		{TargetValue: resourceGroupName,
23329			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23330				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23331				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23332		return result, validation.NewError("web.AppsClient", "ListProcessesSlot", err.Error())
23333	}
23334
23335	result.fn = client.listProcessesSlotNextResults
23336	req, err := client.ListProcessesSlotPreparer(ctx, resourceGroupName, name, slot)
23337	if err != nil {
23338		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing request")
23339		return
23340	}
23341
23342	resp, err := client.ListProcessesSlotSender(req)
23343	if err != nil {
23344		result.pic.Response = autorest.Response{Response: resp}
23345		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending request")
23346		return
23347	}
23348
23349	result.pic, err = client.ListProcessesSlotResponder(resp)
23350	if err != nil {
23351		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to request")
23352		return
23353	}
23354	if result.pic.hasNextLink() && result.pic.IsEmpty() {
23355		err = result.NextWithContext(ctx)
23356		return
23357	}
23358
23359	return
23360}
23361
23362// ListProcessesSlotPreparer prepares the ListProcessesSlot request.
23363func (client AppsClient) ListProcessesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
23364	pathParameters := map[string]interface{}{
23365		"name":              autorest.Encode("path", name),
23366		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23367		"slot":              autorest.Encode("path", slot),
23368		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23369	}
23370
23371	const APIVersion = "2020-09-01"
23372	queryParameters := map[string]interface{}{
23373		"api-version": APIVersion,
23374	}
23375
23376	preparer := autorest.CreatePreparer(
23377		autorest.AsGet(),
23378		autorest.WithBaseURL(client.BaseURI),
23379		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", pathParameters),
23380		autorest.WithQueryParameters(queryParameters))
23381	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23382}
23383
23384// ListProcessesSlotSender sends the ListProcessesSlot request. The method will close the
23385// http.Response Body if it receives an error.
23386func (client AppsClient) ListProcessesSlotSender(req *http.Request) (*http.Response, error) {
23387	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23388}
23389
23390// ListProcessesSlotResponder handles the response to the ListProcessesSlot request. The method always
23391// closes the http.Response Body.
23392func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) {
23393	err = autorest.Respond(
23394		resp,
23395		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23396		autorest.ByUnmarshallingJSON(&result),
23397		autorest.ByClosing())
23398	result.Response = autorest.Response{Response: resp}
23399	return
23400}
23401
23402// listProcessesSlotNextResults retrieves the next set of results, if any.
23403func (client AppsClient) listProcessesSlotNextResults(ctx context.Context, lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) {
23404	req, err := lastResults.processInfoCollectionPreparer(ctx)
23405	if err != nil {
23406		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", nil, "Failure preparing next results request")
23407	}
23408	if req == nil {
23409		return
23410	}
23411	resp, err := client.ListProcessesSlotSender(req)
23412	if err != nil {
23413		result.Response = autorest.Response{Response: resp}
23414		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure sending next results request")
23415	}
23416	result, err = client.ListProcessesSlotResponder(resp)
23417	if err != nil {
23418		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessesSlotNextResults", resp, "Failure responding to next results request")
23419	}
23420	return
23421}
23422
23423// ListProcessesSlotComplete enumerates all values, automatically crossing page boundaries as required.
23424func (client AppsClient) ListProcessesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result ProcessInfoCollectionIterator, err error) {
23425	if tracing.IsEnabled() {
23426		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessesSlot")
23427		defer func() {
23428			sc := -1
23429			if result.Response().Response.Response != nil {
23430				sc = result.page.Response().Response.Response.StatusCode
23431			}
23432			tracing.EndSpan(ctx, sc, err)
23433		}()
23434	}
23435	result.page, err = client.ListProcessesSlot(ctx, resourceGroupName, name, slot)
23436	return
23437}
23438
23439// ListProcessModules description for List module information for a process by its ID for a specific scaled-out
23440// instance in a web site.
23441// Parameters:
23442// resourceGroupName - name of the resource group to which the resource belongs.
23443// name - site name.
23444// processID - pID.
23445func (client AppsClient) ListProcessModules(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionPage, err error) {
23446	if tracing.IsEnabled() {
23447		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules")
23448		defer func() {
23449			sc := -1
23450			if result.pmic.Response.Response != nil {
23451				sc = result.pmic.Response.Response.StatusCode
23452			}
23453			tracing.EndSpan(ctx, sc, err)
23454		}()
23455	}
23456	if err := validation.Validate([]validation.Validation{
23457		{TargetValue: resourceGroupName,
23458			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23459				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23460				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23461		return result, validation.NewError("web.AppsClient", "ListProcessModules", err.Error())
23462	}
23463
23464	result.fn = client.listProcessModulesNextResults
23465	req, err := client.ListProcessModulesPreparer(ctx, resourceGroupName, name, processID)
23466	if err != nil {
23467		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing request")
23468		return
23469	}
23470
23471	resp, err := client.ListProcessModulesSender(req)
23472	if err != nil {
23473		result.pmic.Response = autorest.Response{Response: resp}
23474		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending request")
23475		return
23476	}
23477
23478	result.pmic, err = client.ListProcessModulesResponder(resp)
23479	if err != nil {
23480		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to request")
23481		return
23482	}
23483	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
23484		err = result.NextWithContext(ctx)
23485		return
23486	}
23487
23488	return
23489}
23490
23491// ListProcessModulesPreparer prepares the ListProcessModules request.
23492func (client AppsClient) ListProcessModulesPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
23493	pathParameters := map[string]interface{}{
23494		"name":              autorest.Encode("path", name),
23495		"processId":         autorest.Encode("path", processID),
23496		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23497		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23498	}
23499
23500	const APIVersion = "2020-09-01"
23501	queryParameters := map[string]interface{}{
23502		"api-version": APIVersion,
23503	}
23504
23505	preparer := autorest.CreatePreparer(
23506		autorest.AsGet(),
23507		autorest.WithBaseURL(client.BaseURI),
23508		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules", pathParameters),
23509		autorest.WithQueryParameters(queryParameters))
23510	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23511}
23512
23513// ListProcessModulesSender sends the ListProcessModules request. The method will close the
23514// http.Response Body if it receives an error.
23515func (client AppsClient) ListProcessModulesSender(req *http.Request) (*http.Response, error) {
23516	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23517}
23518
23519// ListProcessModulesResponder handles the response to the ListProcessModules request. The method always
23520// closes the http.Response Body.
23521func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
23522	err = autorest.Respond(
23523		resp,
23524		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23525		autorest.ByUnmarshallingJSON(&result),
23526		autorest.ByClosing())
23527	result.Response = autorest.Response{Response: resp}
23528	return
23529}
23530
23531// listProcessModulesNextResults retrieves the next set of results, if any.
23532func (client AppsClient) listProcessModulesNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
23533	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
23534	if err != nil {
23535		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", nil, "Failure preparing next results request")
23536	}
23537	if req == nil {
23538		return
23539	}
23540	resp, err := client.ListProcessModulesSender(req)
23541	if err != nil {
23542		result.Response = autorest.Response{Response: resp}
23543		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure sending next results request")
23544	}
23545	result, err = client.ListProcessModulesResponder(resp)
23546	if err != nil {
23547		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesNextResults", resp, "Failure responding to next results request")
23548	}
23549	return
23550}
23551
23552// ListProcessModulesComplete enumerates all values, automatically crossing page boundaries as required.
23553func (client AppsClient) ListProcessModulesComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollectionIterator, err error) {
23554	if tracing.IsEnabled() {
23555		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModules")
23556		defer func() {
23557			sc := -1
23558			if result.Response().Response.Response != nil {
23559				sc = result.page.Response().Response.Response.StatusCode
23560			}
23561			tracing.EndSpan(ctx, sc, err)
23562		}()
23563	}
23564	result.page, err = client.ListProcessModules(ctx, resourceGroupName, name, processID)
23565	return
23566}
23567
23568// ListProcessModulesSlot description for List module information for a process by its ID for a specific scaled-out
23569// instance in a web site.
23570// Parameters:
23571// resourceGroupName - name of the resource group to which the resource belongs.
23572// name - site name.
23573// processID - pID.
23574// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23575// production slot.
23576func (client AppsClient) ListProcessModulesSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionPage, err error) {
23577	if tracing.IsEnabled() {
23578		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot")
23579		defer func() {
23580			sc := -1
23581			if result.pmic.Response.Response != nil {
23582				sc = result.pmic.Response.Response.StatusCode
23583			}
23584			tracing.EndSpan(ctx, sc, err)
23585		}()
23586	}
23587	if err := validation.Validate([]validation.Validation{
23588		{TargetValue: resourceGroupName,
23589			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23590				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23591				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23592		return result, validation.NewError("web.AppsClient", "ListProcessModulesSlot", err.Error())
23593	}
23594
23595	result.fn = client.listProcessModulesSlotNextResults
23596	req, err := client.ListProcessModulesSlotPreparer(ctx, resourceGroupName, name, processID, slot)
23597	if err != nil {
23598		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing request")
23599		return
23600	}
23601
23602	resp, err := client.ListProcessModulesSlotSender(req)
23603	if err != nil {
23604		result.pmic.Response = autorest.Response{Response: resp}
23605		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending request")
23606		return
23607	}
23608
23609	result.pmic, err = client.ListProcessModulesSlotResponder(resp)
23610	if err != nil {
23611		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to request")
23612		return
23613	}
23614	if result.pmic.hasNextLink() && result.pmic.IsEmpty() {
23615		err = result.NextWithContext(ctx)
23616		return
23617	}
23618
23619	return
23620}
23621
23622// ListProcessModulesSlotPreparer prepares the ListProcessModulesSlot request.
23623func (client AppsClient) ListProcessModulesSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
23624	pathParameters := map[string]interface{}{
23625		"name":              autorest.Encode("path", name),
23626		"processId":         autorest.Encode("path", processID),
23627		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23628		"slot":              autorest.Encode("path", slot),
23629		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23630	}
23631
23632	const APIVersion = "2020-09-01"
23633	queryParameters := map[string]interface{}{
23634		"api-version": APIVersion,
23635	}
23636
23637	preparer := autorest.CreatePreparer(
23638		autorest.AsGet(),
23639		autorest.WithBaseURL(client.BaseURI),
23640		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules", pathParameters),
23641		autorest.WithQueryParameters(queryParameters))
23642	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23643}
23644
23645// ListProcessModulesSlotSender sends the ListProcessModulesSlot request. The method will close the
23646// http.Response Body if it receives an error.
23647func (client AppsClient) ListProcessModulesSlotSender(req *http.Request) (*http.Response, error) {
23648	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23649}
23650
23651// ListProcessModulesSlotResponder handles the response to the ListProcessModulesSlot request. The method always
23652// closes the http.Response Body.
23653func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) {
23654	err = autorest.Respond(
23655		resp,
23656		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23657		autorest.ByUnmarshallingJSON(&result),
23658		autorest.ByClosing())
23659	result.Response = autorest.Response{Response: resp}
23660	return
23661}
23662
23663// listProcessModulesSlotNextResults retrieves the next set of results, if any.
23664func (client AppsClient) listProcessModulesSlotNextResults(ctx context.Context, lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) {
23665	req, err := lastResults.processModuleInfoCollectionPreparer(ctx)
23666	if err != nil {
23667		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", nil, "Failure preparing next results request")
23668	}
23669	if req == nil {
23670		return
23671	}
23672	resp, err := client.ListProcessModulesSlotSender(req)
23673	if err != nil {
23674		result.Response = autorest.Response{Response: resp}
23675		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure sending next results request")
23676	}
23677	result, err = client.ListProcessModulesSlotResponder(resp)
23678	if err != nil {
23679		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessModulesSlotNextResults", resp, "Failure responding to next results request")
23680	}
23681	return
23682}
23683
23684// ListProcessModulesSlotComplete enumerates all values, automatically crossing page boundaries as required.
23685func (client AppsClient) ListProcessModulesSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollectionIterator, err error) {
23686	if tracing.IsEnabled() {
23687		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessModulesSlot")
23688		defer func() {
23689			sc := -1
23690			if result.Response().Response.Response != nil {
23691				sc = result.page.Response().Response.Response.StatusCode
23692			}
23693			tracing.EndSpan(ctx, sc, err)
23694		}()
23695	}
23696	result.page, err = client.ListProcessModulesSlot(ctx, resourceGroupName, name, processID, slot)
23697	return
23698}
23699
23700// ListProcessThreads description for List the threads in a process by its ID for a specific scaled-out instance in a
23701// web site.
23702// Parameters:
23703// resourceGroupName - name of the resource group to which the resource belongs.
23704// name - site name.
23705// processID - pID.
23706func (client AppsClient) ListProcessThreads(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionPage, err error) {
23707	if tracing.IsEnabled() {
23708		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads")
23709		defer func() {
23710			sc := -1
23711			if result.ptic.Response.Response != nil {
23712				sc = result.ptic.Response.Response.StatusCode
23713			}
23714			tracing.EndSpan(ctx, sc, err)
23715		}()
23716	}
23717	if err := validation.Validate([]validation.Validation{
23718		{TargetValue: resourceGroupName,
23719			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23720				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23721				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23722		return result, validation.NewError("web.AppsClient", "ListProcessThreads", err.Error())
23723	}
23724
23725	result.fn = client.listProcessThreadsNextResults
23726	req, err := client.ListProcessThreadsPreparer(ctx, resourceGroupName, name, processID)
23727	if err != nil {
23728		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing request")
23729		return
23730	}
23731
23732	resp, err := client.ListProcessThreadsSender(req)
23733	if err != nil {
23734		result.ptic.Response = autorest.Response{Response: resp}
23735		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending request")
23736		return
23737	}
23738
23739	result.ptic, err = client.ListProcessThreadsResponder(resp)
23740	if err != nil {
23741		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to request")
23742		return
23743	}
23744	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
23745		err = result.NextWithContext(ctx)
23746		return
23747	}
23748
23749	return
23750}
23751
23752// ListProcessThreadsPreparer prepares the ListProcessThreads request.
23753func (client AppsClient) ListProcessThreadsPreparer(ctx context.Context, resourceGroupName string, name string, processID string) (*http.Request, error) {
23754	pathParameters := map[string]interface{}{
23755		"name":              autorest.Encode("path", name),
23756		"processId":         autorest.Encode("path", processID),
23757		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23758		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23759	}
23760
23761	const APIVersion = "2020-09-01"
23762	queryParameters := map[string]interface{}{
23763		"api-version": APIVersion,
23764	}
23765
23766	preparer := autorest.CreatePreparer(
23767		autorest.AsGet(),
23768		autorest.WithBaseURL(client.BaseURI),
23769		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads", pathParameters),
23770		autorest.WithQueryParameters(queryParameters))
23771	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23772}
23773
23774// ListProcessThreadsSender sends the ListProcessThreads request. The method will close the
23775// http.Response Body if it receives an error.
23776func (client AppsClient) ListProcessThreadsSender(req *http.Request) (*http.Response, error) {
23777	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23778}
23779
23780// ListProcessThreadsResponder handles the response to the ListProcessThreads request. The method always
23781// closes the http.Response Body.
23782func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
23783	err = autorest.Respond(
23784		resp,
23785		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23786		autorest.ByUnmarshallingJSON(&result),
23787		autorest.ByClosing())
23788	result.Response = autorest.Response{Response: resp}
23789	return
23790}
23791
23792// listProcessThreadsNextResults retrieves the next set of results, if any.
23793func (client AppsClient) listProcessThreadsNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
23794	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
23795	if err != nil {
23796		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", nil, "Failure preparing next results request")
23797	}
23798	if req == nil {
23799		return
23800	}
23801	resp, err := client.ListProcessThreadsSender(req)
23802	if err != nil {
23803		result.Response = autorest.Response{Response: resp}
23804		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure sending next results request")
23805	}
23806	result, err = client.ListProcessThreadsResponder(resp)
23807	if err != nil {
23808		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsNextResults", resp, "Failure responding to next results request")
23809	}
23810	return
23811}
23812
23813// ListProcessThreadsComplete enumerates all values, automatically crossing page boundaries as required.
23814func (client AppsClient) ListProcessThreadsComplete(ctx context.Context, resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollectionIterator, err error) {
23815	if tracing.IsEnabled() {
23816		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreads")
23817		defer func() {
23818			sc := -1
23819			if result.Response().Response.Response != nil {
23820				sc = result.page.Response().Response.Response.StatusCode
23821			}
23822			tracing.EndSpan(ctx, sc, err)
23823		}()
23824	}
23825	result.page, err = client.ListProcessThreads(ctx, resourceGroupName, name, processID)
23826	return
23827}
23828
23829// ListProcessThreadsSlot description for List the threads in a process by its ID for a specific scaled-out instance in
23830// a web site.
23831// Parameters:
23832// resourceGroupName - name of the resource group to which the resource belongs.
23833// name - site name.
23834// processID - pID.
23835// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
23836// production slot.
23837func (client AppsClient) ListProcessThreadsSlot(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionPage, err error) {
23838	if tracing.IsEnabled() {
23839		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot")
23840		defer func() {
23841			sc := -1
23842			if result.ptic.Response.Response != nil {
23843				sc = result.ptic.Response.Response.StatusCode
23844			}
23845			tracing.EndSpan(ctx, sc, err)
23846		}()
23847	}
23848	if err := validation.Validate([]validation.Validation{
23849		{TargetValue: resourceGroupName,
23850			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23851				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23852				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23853		return result, validation.NewError("web.AppsClient", "ListProcessThreadsSlot", err.Error())
23854	}
23855
23856	result.fn = client.listProcessThreadsSlotNextResults
23857	req, err := client.ListProcessThreadsSlotPreparer(ctx, resourceGroupName, name, processID, slot)
23858	if err != nil {
23859		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing request")
23860		return
23861	}
23862
23863	resp, err := client.ListProcessThreadsSlotSender(req)
23864	if err != nil {
23865		result.ptic.Response = autorest.Response{Response: resp}
23866		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending request")
23867		return
23868	}
23869
23870	result.ptic, err = client.ListProcessThreadsSlotResponder(resp)
23871	if err != nil {
23872		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to request")
23873		return
23874	}
23875	if result.ptic.hasNextLink() && result.ptic.IsEmpty() {
23876		err = result.NextWithContext(ctx)
23877		return
23878	}
23879
23880	return
23881}
23882
23883// ListProcessThreadsSlotPreparer prepares the ListProcessThreadsSlot request.
23884func (client AppsClient) ListProcessThreadsSlotPreparer(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (*http.Request, error) {
23885	pathParameters := map[string]interface{}{
23886		"name":              autorest.Encode("path", name),
23887		"processId":         autorest.Encode("path", processID),
23888		"resourceGroupName": autorest.Encode("path", resourceGroupName),
23889		"slot":              autorest.Encode("path", slot),
23890		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
23891	}
23892
23893	const APIVersion = "2020-09-01"
23894	queryParameters := map[string]interface{}{
23895		"api-version": APIVersion,
23896	}
23897
23898	preparer := autorest.CreatePreparer(
23899		autorest.AsGet(),
23900		autorest.WithBaseURL(client.BaseURI),
23901		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads", pathParameters),
23902		autorest.WithQueryParameters(queryParameters))
23903	return preparer.Prepare((&http.Request{}).WithContext(ctx))
23904}
23905
23906// ListProcessThreadsSlotSender sends the ListProcessThreadsSlot request. The method will close the
23907// http.Response Body if it receives an error.
23908func (client AppsClient) ListProcessThreadsSlotSender(req *http.Request) (*http.Response, error) {
23909	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
23910}
23911
23912// ListProcessThreadsSlotResponder handles the response to the ListProcessThreadsSlot request. The method always
23913// closes the http.Response Body.
23914func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) {
23915	err = autorest.Respond(
23916		resp,
23917		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
23918		autorest.ByUnmarshallingJSON(&result),
23919		autorest.ByClosing())
23920	result.Response = autorest.Response{Response: resp}
23921	return
23922}
23923
23924// listProcessThreadsSlotNextResults retrieves the next set of results, if any.
23925func (client AppsClient) listProcessThreadsSlotNextResults(ctx context.Context, lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) {
23926	req, err := lastResults.processThreadInfoCollectionPreparer(ctx)
23927	if err != nil {
23928		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", nil, "Failure preparing next results request")
23929	}
23930	if req == nil {
23931		return
23932	}
23933	resp, err := client.ListProcessThreadsSlotSender(req)
23934	if err != nil {
23935		result.Response = autorest.Response{Response: resp}
23936		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure sending next results request")
23937	}
23938	result, err = client.ListProcessThreadsSlotResponder(resp)
23939	if err != nil {
23940		err = autorest.NewErrorWithError(err, "web.AppsClient", "listProcessThreadsSlotNextResults", resp, "Failure responding to next results request")
23941	}
23942	return
23943}
23944
23945// ListProcessThreadsSlotComplete enumerates all values, automatically crossing page boundaries as required.
23946func (client AppsClient) ListProcessThreadsSlotComplete(ctx context.Context, resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollectionIterator, err error) {
23947	if tracing.IsEnabled() {
23948		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListProcessThreadsSlot")
23949		defer func() {
23950			sc := -1
23951			if result.Response().Response.Response != nil {
23952				sc = result.page.Response().Response.Response.StatusCode
23953			}
23954			tracing.EndSpan(ctx, sc, err)
23955		}()
23956	}
23957	result.page, err = client.ListProcessThreadsSlot(ctx, resourceGroupName, name, processID, slot)
23958	return
23959}
23960
23961// ListPublicCertificates description for Get public certificates for an app or a deployment slot.
23962// Parameters:
23963// resourceGroupName - name of the resource group to which the resource belongs.
23964// name - name of the app.
23965func (client AppsClient) ListPublicCertificates(ctx context.Context, resourceGroupName string, name string) (result PublicCertificateCollectionPage, err error) {
23966	if tracing.IsEnabled() {
23967		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificates")
23968		defer func() {
23969			sc := -1
23970			if result.pcc.Response.Response != nil {
23971				sc = result.pcc.Response.Response.StatusCode
23972			}
23973			tracing.EndSpan(ctx, sc, err)
23974		}()
23975	}
23976	if err := validation.Validate([]validation.Validation{
23977		{TargetValue: resourceGroupName,
23978			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
23979				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
23980				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
23981		return result, validation.NewError("web.AppsClient", "ListPublicCertificates", err.Error())
23982	}
23983
23984	result.fn = client.listPublicCertificatesNextResults
23985	req, err := client.ListPublicCertificatesPreparer(ctx, resourceGroupName, name)
23986	if err != nil {
23987		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", nil, "Failure preparing request")
23988		return
23989	}
23990
23991	resp, err := client.ListPublicCertificatesSender(req)
23992	if err != nil {
23993		result.pcc.Response = autorest.Response{Response: resp}
23994		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure sending request")
23995		return
23996	}
23997
23998	result.pcc, err = client.ListPublicCertificatesResponder(resp)
23999	if err != nil {
24000		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure responding to request")
24001		return
24002	}
24003	if result.pcc.hasNextLink() && result.pcc.IsEmpty() {
24004		err = result.NextWithContext(ctx)
24005		return
24006	}
24007
24008	return
24009}
24010
24011// ListPublicCertificatesPreparer prepares the ListPublicCertificates request.
24012func (client AppsClient) ListPublicCertificatesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24013	pathParameters := map[string]interface{}{
24014		"name":              autorest.Encode("path", name),
24015		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24016		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24017	}
24018
24019	const APIVersion = "2020-09-01"
24020	queryParameters := map[string]interface{}{
24021		"api-version": APIVersion,
24022	}
24023
24024	preparer := autorest.CreatePreparer(
24025		autorest.AsGet(),
24026		autorest.WithBaseURL(client.BaseURI),
24027		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates", pathParameters),
24028		autorest.WithQueryParameters(queryParameters))
24029	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24030}
24031
24032// ListPublicCertificatesSender sends the ListPublicCertificates request. The method will close the
24033// http.Response Body if it receives an error.
24034func (client AppsClient) ListPublicCertificatesSender(req *http.Request) (*http.Response, error) {
24035	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24036}
24037
24038// ListPublicCertificatesResponder handles the response to the ListPublicCertificates request. The method always
24039// closes the http.Response Body.
24040func (client AppsClient) ListPublicCertificatesResponder(resp *http.Response) (result PublicCertificateCollection, err error) {
24041	err = autorest.Respond(
24042		resp,
24043		azure.WithErrorUnlessStatusCode(http.StatusOK),
24044		autorest.ByUnmarshallingJSON(&result),
24045		autorest.ByClosing())
24046	result.Response = autorest.Response{Response: resp}
24047	return
24048}
24049
24050// listPublicCertificatesNextResults retrieves the next set of results, if any.
24051func (client AppsClient) listPublicCertificatesNextResults(ctx context.Context, lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) {
24052	req, err := lastResults.publicCertificateCollectionPreparer(ctx)
24053	if err != nil {
24054		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", nil, "Failure preparing next results request")
24055	}
24056	if req == nil {
24057		return
24058	}
24059	resp, err := client.ListPublicCertificatesSender(req)
24060	if err != nil {
24061		result.Response = autorest.Response{Response: resp}
24062		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", resp, "Failure sending next results request")
24063	}
24064	result, err = client.ListPublicCertificatesResponder(resp)
24065	if err != nil {
24066		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesNextResults", resp, "Failure responding to next results request")
24067	}
24068	return
24069}
24070
24071// ListPublicCertificatesComplete enumerates all values, automatically crossing page boundaries as required.
24072func (client AppsClient) ListPublicCertificatesComplete(ctx context.Context, resourceGroupName string, name string) (result PublicCertificateCollectionIterator, err error) {
24073	if tracing.IsEnabled() {
24074		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificates")
24075		defer func() {
24076			sc := -1
24077			if result.Response().Response.Response != nil {
24078				sc = result.page.Response().Response.Response.StatusCode
24079			}
24080			tracing.EndSpan(ctx, sc, err)
24081		}()
24082	}
24083	result.page, err = client.ListPublicCertificates(ctx, resourceGroupName, name)
24084	return
24085}
24086
24087// ListPublicCertificatesSlot description for Get public certificates for an app or a deployment slot.
24088// Parameters:
24089// resourceGroupName - name of the resource group to which the resource belongs.
24090// name - name of the app.
24091// slot - name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the
24092// production slot.
24093func (client AppsClient) ListPublicCertificatesSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PublicCertificateCollectionPage, err error) {
24094	if tracing.IsEnabled() {
24095		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificatesSlot")
24096		defer func() {
24097			sc := -1
24098			if result.pcc.Response.Response != nil {
24099				sc = result.pcc.Response.Response.StatusCode
24100			}
24101			tracing.EndSpan(ctx, sc, err)
24102		}()
24103	}
24104	if err := validation.Validate([]validation.Validation{
24105		{TargetValue: resourceGroupName,
24106			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24107				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24108				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24109		return result, validation.NewError("web.AppsClient", "ListPublicCertificatesSlot", err.Error())
24110	}
24111
24112	result.fn = client.listPublicCertificatesSlotNextResults
24113	req, err := client.ListPublicCertificatesSlotPreparer(ctx, resourceGroupName, name, slot)
24114	if err != nil {
24115		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", nil, "Failure preparing request")
24116		return
24117	}
24118
24119	resp, err := client.ListPublicCertificatesSlotSender(req)
24120	if err != nil {
24121		result.pcc.Response = autorest.Response{Response: resp}
24122		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure sending request")
24123		return
24124	}
24125
24126	result.pcc, err = client.ListPublicCertificatesSlotResponder(resp)
24127	if err != nil {
24128		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure responding to request")
24129		return
24130	}
24131	if result.pcc.hasNextLink() && result.pcc.IsEmpty() {
24132		err = result.NextWithContext(ctx)
24133		return
24134	}
24135
24136	return
24137}
24138
24139// ListPublicCertificatesSlotPreparer prepares the ListPublicCertificatesSlot request.
24140func (client AppsClient) ListPublicCertificatesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24141	pathParameters := map[string]interface{}{
24142		"name":              autorest.Encode("path", name),
24143		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24144		"slot":              autorest.Encode("path", slot),
24145		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24146	}
24147
24148	const APIVersion = "2020-09-01"
24149	queryParameters := map[string]interface{}{
24150		"api-version": APIVersion,
24151	}
24152
24153	preparer := autorest.CreatePreparer(
24154		autorest.AsGet(),
24155		autorest.WithBaseURL(client.BaseURI),
24156		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates", pathParameters),
24157		autorest.WithQueryParameters(queryParameters))
24158	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24159}
24160
24161// ListPublicCertificatesSlotSender sends the ListPublicCertificatesSlot request. The method will close the
24162// http.Response Body if it receives an error.
24163func (client AppsClient) ListPublicCertificatesSlotSender(req *http.Request) (*http.Response, error) {
24164	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24165}
24166
24167// ListPublicCertificatesSlotResponder handles the response to the ListPublicCertificatesSlot request. The method always
24168// closes the http.Response Body.
24169func (client AppsClient) ListPublicCertificatesSlotResponder(resp *http.Response) (result PublicCertificateCollection, err error) {
24170	err = autorest.Respond(
24171		resp,
24172		azure.WithErrorUnlessStatusCode(http.StatusOK),
24173		autorest.ByUnmarshallingJSON(&result),
24174		autorest.ByClosing())
24175	result.Response = autorest.Response{Response: resp}
24176	return
24177}
24178
24179// listPublicCertificatesSlotNextResults retrieves the next set of results, if any.
24180func (client AppsClient) listPublicCertificatesSlotNextResults(ctx context.Context, lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) {
24181	req, err := lastResults.publicCertificateCollectionPreparer(ctx)
24182	if err != nil {
24183		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", nil, "Failure preparing next results request")
24184	}
24185	if req == nil {
24186		return
24187	}
24188	resp, err := client.ListPublicCertificatesSlotSender(req)
24189	if err != nil {
24190		result.Response = autorest.Response{Response: resp}
24191		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", resp, "Failure sending next results request")
24192	}
24193	result, err = client.ListPublicCertificatesSlotResponder(resp)
24194	if err != nil {
24195		err = autorest.NewErrorWithError(err, "web.AppsClient", "listPublicCertificatesSlotNextResults", resp, "Failure responding to next results request")
24196	}
24197	return
24198}
24199
24200// ListPublicCertificatesSlotComplete enumerates all values, automatically crossing page boundaries as required.
24201func (client AppsClient) ListPublicCertificatesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result PublicCertificateCollectionIterator, err error) {
24202	if tracing.IsEnabled() {
24203		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublicCertificatesSlot")
24204		defer func() {
24205			sc := -1
24206			if result.Response().Response.Response != nil {
24207				sc = result.page.Response().Response.Response.StatusCode
24208			}
24209			tracing.EndSpan(ctx, sc, err)
24210		}()
24211	}
24212	result.page, err = client.ListPublicCertificatesSlot(ctx, resourceGroupName, name, slot)
24213	return
24214}
24215
24216// ListPublishingCredentials description for Gets the Git/FTP publishing credentials of an app.
24217// Parameters:
24218// resourceGroupName - name of the resource group to which the resource belongs.
24219// name - name of the app.
24220func (client AppsClient) ListPublishingCredentials(ctx context.Context, resourceGroupName string, name string) (result AppsListPublishingCredentialsFuture, err error) {
24221	if tracing.IsEnabled() {
24222		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingCredentials")
24223		defer func() {
24224			sc := -1
24225			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
24226				sc = result.FutureAPI.Response().StatusCode
24227			}
24228			tracing.EndSpan(ctx, sc, err)
24229		}()
24230	}
24231	if err := validation.Validate([]validation.Validation{
24232		{TargetValue: resourceGroupName,
24233			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24234				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24235				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24236		return result, validation.NewError("web.AppsClient", "ListPublishingCredentials", err.Error())
24237	}
24238
24239	req, err := client.ListPublishingCredentialsPreparer(ctx, resourceGroupName, name)
24240	if err != nil {
24241		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentials", nil, "Failure preparing request")
24242		return
24243	}
24244
24245	result, err = client.ListPublishingCredentialsSender(req)
24246	if err != nil {
24247		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentials", nil, "Failure sending request")
24248		return
24249	}
24250
24251	return
24252}
24253
24254// ListPublishingCredentialsPreparer prepares the ListPublishingCredentials request.
24255func (client AppsClient) ListPublishingCredentialsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24256	pathParameters := map[string]interface{}{
24257		"name":              autorest.Encode("path", name),
24258		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24259		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24260	}
24261
24262	const APIVersion = "2020-09-01"
24263	queryParameters := map[string]interface{}{
24264		"api-version": APIVersion,
24265	}
24266
24267	preparer := autorest.CreatePreparer(
24268		autorest.AsPost(),
24269		autorest.WithBaseURL(client.BaseURI),
24270		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list", pathParameters),
24271		autorest.WithQueryParameters(queryParameters))
24272	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24273}
24274
24275// ListPublishingCredentialsSender sends the ListPublishingCredentials request. The method will close the
24276// http.Response Body if it receives an error.
24277func (client AppsClient) ListPublishingCredentialsSender(req *http.Request) (future AppsListPublishingCredentialsFuture, err error) {
24278	var resp *http.Response
24279	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
24280	if err != nil {
24281		return
24282	}
24283	var azf azure.Future
24284	azf, err = azure.NewFutureFromResponse(resp)
24285	future.FutureAPI = &azf
24286	future.Result = func(client AppsClient) (u User, err error) {
24287		var done bool
24288		done, err = future.DoneWithContext(context.Background(), client)
24289		if err != nil {
24290			err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", future.Response(), "Polling failure")
24291			return
24292		}
24293		if !done {
24294			err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsFuture")
24295			return
24296		}
24297		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24298		u.Response.Response, err = future.GetResult(sender)
24299		if u.Response.Response == nil && err == nil {
24300			err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", nil, "received nil response and error")
24301		}
24302		if err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
24303			u, err = client.ListPublishingCredentialsResponder(u.Response.Response)
24304			if err != nil {
24305				err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsFuture", "Result", u.Response.Response, "Failure responding to request")
24306			}
24307		}
24308		return
24309	}
24310	return
24311}
24312
24313// ListPublishingCredentialsResponder handles the response to the ListPublishingCredentials request. The method always
24314// closes the http.Response Body.
24315func (client AppsClient) ListPublishingCredentialsResponder(resp *http.Response) (result User, err error) {
24316	err = autorest.Respond(
24317		resp,
24318		azure.WithErrorUnlessStatusCode(http.StatusOK),
24319		autorest.ByUnmarshallingJSON(&result),
24320		autorest.ByClosing())
24321	result.Response = autorest.Response{Response: resp}
24322	return
24323}
24324
24325// ListPublishingCredentialsSlot description for Gets the Git/FTP publishing credentials of an app.
24326// Parameters:
24327// resourceGroupName - name of the resource group to which the resource belongs.
24328// name - name of the app.
24329// slot - name of the deployment slot. If a slot is not specified, the API will get the publishing credentials
24330// for the production slot.
24331func (client AppsClient) ListPublishingCredentialsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AppsListPublishingCredentialsSlotFuture, err error) {
24332	if tracing.IsEnabled() {
24333		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingCredentialsSlot")
24334		defer func() {
24335			sc := -1
24336			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
24337				sc = result.FutureAPI.Response().StatusCode
24338			}
24339			tracing.EndSpan(ctx, sc, err)
24340		}()
24341	}
24342	if err := validation.Validate([]validation.Validation{
24343		{TargetValue: resourceGroupName,
24344			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24345				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24346				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24347		return result, validation.NewError("web.AppsClient", "ListPublishingCredentialsSlot", err.Error())
24348	}
24349
24350	req, err := client.ListPublishingCredentialsSlotPreparer(ctx, resourceGroupName, name, slot)
24351	if err != nil {
24352		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentialsSlot", nil, "Failure preparing request")
24353		return
24354	}
24355
24356	result, err = client.ListPublishingCredentialsSlotSender(req)
24357	if err != nil {
24358		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingCredentialsSlot", nil, "Failure sending request")
24359		return
24360	}
24361
24362	return
24363}
24364
24365// ListPublishingCredentialsSlotPreparer prepares the ListPublishingCredentialsSlot request.
24366func (client AppsClient) ListPublishingCredentialsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24367	pathParameters := map[string]interface{}{
24368		"name":              autorest.Encode("path", name),
24369		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24370		"slot":              autorest.Encode("path", slot),
24371		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24372	}
24373
24374	const APIVersion = "2020-09-01"
24375	queryParameters := map[string]interface{}{
24376		"api-version": APIVersion,
24377	}
24378
24379	preparer := autorest.CreatePreparer(
24380		autorest.AsPost(),
24381		autorest.WithBaseURL(client.BaseURI),
24382		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list", pathParameters),
24383		autorest.WithQueryParameters(queryParameters))
24384	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24385}
24386
24387// ListPublishingCredentialsSlotSender sends the ListPublishingCredentialsSlot request. The method will close the
24388// http.Response Body if it receives an error.
24389func (client AppsClient) ListPublishingCredentialsSlotSender(req *http.Request) (future AppsListPublishingCredentialsSlotFuture, err error) {
24390	var resp *http.Response
24391	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
24392	if err != nil {
24393		return
24394	}
24395	var azf azure.Future
24396	azf, err = azure.NewFutureFromResponse(resp)
24397	future.FutureAPI = &azf
24398	future.Result = func(client AppsClient) (u User, err error) {
24399		var done bool
24400		done, err = future.DoneWithContext(context.Background(), client)
24401		if err != nil {
24402			err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", future.Response(), "Polling failure")
24403			return
24404		}
24405		if !done {
24406			err = azure.NewAsyncOpIncompleteError("web.AppsListPublishingCredentialsSlotFuture")
24407			return
24408		}
24409		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
24410		u.Response.Response, err = future.GetResult(sender)
24411		if u.Response.Response == nil && err == nil {
24412			err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", nil, "received nil response and error")
24413		}
24414		if err == nil && u.Response.Response.StatusCode != http.StatusNoContent {
24415			u, err = client.ListPublishingCredentialsSlotResponder(u.Response.Response)
24416			if err != nil {
24417				err = autorest.NewErrorWithError(err, "web.AppsListPublishingCredentialsSlotFuture", "Result", u.Response.Response, "Failure responding to request")
24418			}
24419		}
24420		return
24421	}
24422	return
24423}
24424
24425// ListPublishingCredentialsSlotResponder handles the response to the ListPublishingCredentialsSlot request. The method always
24426// closes the http.Response Body.
24427func (client AppsClient) ListPublishingCredentialsSlotResponder(resp *http.Response) (result User, err error) {
24428	err = autorest.Respond(
24429		resp,
24430		azure.WithErrorUnlessStatusCode(http.StatusOK),
24431		autorest.ByUnmarshallingJSON(&result),
24432		autorest.ByClosing())
24433	result.Response = autorest.Response{Response: resp}
24434	return
24435}
24436
24437// ListPublishingProfileXMLWithSecrets description for Gets the publishing profile for an app (or deployment slot, if
24438// specified).
24439// Parameters:
24440// resourceGroupName - name of the resource group to which the resource belongs.
24441// name - name of the app.
24442// publishingProfileOptions - specifies publishingProfileOptions for publishing profile. For example, use
24443// {"format": "FileZilla3"} to get a FileZilla publishing profile.
24444func (client AppsClient) ListPublishingProfileXMLWithSecrets(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (result ReadCloser, err error) {
24445	if tracing.IsEnabled() {
24446		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingProfileXMLWithSecrets")
24447		defer func() {
24448			sc := -1
24449			if result.Response.Response != nil {
24450				sc = result.Response.Response.StatusCode
24451			}
24452			tracing.EndSpan(ctx, sc, err)
24453		}()
24454	}
24455	if err := validation.Validate([]validation.Validation{
24456		{TargetValue: resourceGroupName,
24457			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24458				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24459				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24460		return result, validation.NewError("web.AppsClient", "ListPublishingProfileXMLWithSecrets", err.Error())
24461	}
24462
24463	req, err := client.ListPublishingProfileXMLWithSecretsPreparer(ctx, resourceGroupName, name, publishingProfileOptions)
24464	if err != nil {
24465		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", nil, "Failure preparing request")
24466		return
24467	}
24468
24469	resp, err := client.ListPublishingProfileXMLWithSecretsSender(req)
24470	if err != nil {
24471		result.Response = autorest.Response{Response: resp}
24472		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", resp, "Failure sending request")
24473		return
24474	}
24475
24476	result, err = client.ListPublishingProfileXMLWithSecretsResponder(resp)
24477	if err != nil {
24478		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecrets", resp, "Failure responding to request")
24479		return
24480	}
24481
24482	return
24483}
24484
24485// ListPublishingProfileXMLWithSecretsPreparer prepares the ListPublishingProfileXMLWithSecrets request.
24486func (client AppsClient) ListPublishingProfileXMLWithSecretsPreparer(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (*http.Request, error) {
24487	pathParameters := map[string]interface{}{
24488		"name":              autorest.Encode("path", name),
24489		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24490		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24491	}
24492
24493	const APIVersion = "2020-09-01"
24494	queryParameters := map[string]interface{}{
24495		"api-version": APIVersion,
24496	}
24497
24498	preparer := autorest.CreatePreparer(
24499		autorest.AsContentType("application/json; charset=utf-8"),
24500		autorest.AsPost(),
24501		autorest.WithBaseURL(client.BaseURI),
24502		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml", pathParameters),
24503		autorest.WithJSON(publishingProfileOptions),
24504		autorest.WithQueryParameters(queryParameters))
24505	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24506}
24507
24508// ListPublishingProfileXMLWithSecretsSender sends the ListPublishingProfileXMLWithSecrets request. The method will close the
24509// http.Response Body if it receives an error.
24510func (client AppsClient) ListPublishingProfileXMLWithSecretsSender(req *http.Request) (*http.Response, error) {
24511	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24512}
24513
24514// ListPublishingProfileXMLWithSecretsResponder handles the response to the ListPublishingProfileXMLWithSecrets request. The method always
24515// closes the http.Response Body.
24516func (client AppsClient) ListPublishingProfileXMLWithSecretsResponder(resp *http.Response) (result ReadCloser, err error) {
24517	result.Value = &resp.Body
24518	err = autorest.Respond(
24519		resp,
24520		azure.WithErrorUnlessStatusCode(http.StatusOK))
24521	result.Response = autorest.Response{Response: resp}
24522	return
24523}
24524
24525// ListPublishingProfileXMLWithSecretsSlot description for Gets the publishing profile for an app (or deployment slot,
24526// if specified).
24527// Parameters:
24528// resourceGroupName - name of the resource group to which the resource belongs.
24529// name - name of the app.
24530// publishingProfileOptions - specifies publishingProfileOptions for publishing profile. For example, use
24531// {"format": "FileZilla3"} to get a FileZilla publishing profile.
24532// slot - name of the deployment slot. If a slot is not specified, the API will get the publishing profile for
24533// the production slot.
24534func (client AppsClient) ListPublishingProfileXMLWithSecretsSlot(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (result ReadCloser, err error) {
24535	if tracing.IsEnabled() {
24536		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListPublishingProfileXMLWithSecretsSlot")
24537		defer func() {
24538			sc := -1
24539			if result.Response.Response != nil {
24540				sc = result.Response.Response.StatusCode
24541			}
24542			tracing.EndSpan(ctx, sc, err)
24543		}()
24544	}
24545	if err := validation.Validate([]validation.Validation{
24546		{TargetValue: resourceGroupName,
24547			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24548				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24549				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24550		return result, validation.NewError("web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", err.Error())
24551	}
24552
24553	req, err := client.ListPublishingProfileXMLWithSecretsSlotPreparer(ctx, resourceGroupName, name, publishingProfileOptions, slot)
24554	if err != nil {
24555		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", nil, "Failure preparing request")
24556		return
24557	}
24558
24559	resp, err := client.ListPublishingProfileXMLWithSecretsSlotSender(req)
24560	if err != nil {
24561		result.Response = autorest.Response{Response: resp}
24562		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", resp, "Failure sending request")
24563		return
24564	}
24565
24566	result, err = client.ListPublishingProfileXMLWithSecretsSlotResponder(resp)
24567	if err != nil {
24568		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublishingProfileXMLWithSecretsSlot", resp, "Failure responding to request")
24569		return
24570	}
24571
24572	return
24573}
24574
24575// ListPublishingProfileXMLWithSecretsSlotPreparer prepares the ListPublishingProfileXMLWithSecretsSlot request.
24576func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotPreparer(ctx context.Context, resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (*http.Request, error) {
24577	pathParameters := map[string]interface{}{
24578		"name":              autorest.Encode("path", name),
24579		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24580		"slot":              autorest.Encode("path", slot),
24581		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24582	}
24583
24584	const APIVersion = "2020-09-01"
24585	queryParameters := map[string]interface{}{
24586		"api-version": APIVersion,
24587	}
24588
24589	preparer := autorest.CreatePreparer(
24590		autorest.AsContentType("application/json; charset=utf-8"),
24591		autorest.AsPost(),
24592		autorest.WithBaseURL(client.BaseURI),
24593		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml", pathParameters),
24594		autorest.WithJSON(publishingProfileOptions),
24595		autorest.WithQueryParameters(queryParameters))
24596	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24597}
24598
24599// ListPublishingProfileXMLWithSecretsSlotSender sends the ListPublishingProfileXMLWithSecretsSlot request. The method will close the
24600// http.Response Body if it receives an error.
24601func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotSender(req *http.Request) (*http.Response, error) {
24602	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24603}
24604
24605// ListPublishingProfileXMLWithSecretsSlotResponder handles the response to the ListPublishingProfileXMLWithSecretsSlot request. The method always
24606// closes the http.Response Body.
24607func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotResponder(resp *http.Response) (result ReadCloser, err error) {
24608	result.Value = &resp.Body
24609	err = autorest.Respond(
24610		resp,
24611		azure.WithErrorUnlessStatusCode(http.StatusOK))
24612	result.Response = autorest.Response{Response: resp}
24613	return
24614}
24615
24616// ListRelayServiceConnections description for Gets hybrid connections configured for an app (or deployment slot, if
24617// specified).
24618// Parameters:
24619// resourceGroupName - name of the resource group to which the resource belongs.
24620// name - name of the app.
24621func (client AppsClient) ListRelayServiceConnections(ctx context.Context, resourceGroupName string, name string) (result RelayServiceConnectionEntity, err error) {
24622	if tracing.IsEnabled() {
24623		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListRelayServiceConnections")
24624		defer func() {
24625			sc := -1
24626			if result.Response.Response != nil {
24627				sc = result.Response.Response.StatusCode
24628			}
24629			tracing.EndSpan(ctx, sc, err)
24630		}()
24631	}
24632	if err := validation.Validate([]validation.Validation{
24633		{TargetValue: resourceGroupName,
24634			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24635				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24636				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24637		return result, validation.NewError("web.AppsClient", "ListRelayServiceConnections", err.Error())
24638	}
24639
24640	req, err := client.ListRelayServiceConnectionsPreparer(ctx, resourceGroupName, name)
24641	if err != nil {
24642		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", nil, "Failure preparing request")
24643		return
24644	}
24645
24646	resp, err := client.ListRelayServiceConnectionsSender(req)
24647	if err != nil {
24648		result.Response = autorest.Response{Response: resp}
24649		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", resp, "Failure sending request")
24650		return
24651	}
24652
24653	result, err = client.ListRelayServiceConnectionsResponder(resp)
24654	if err != nil {
24655		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnections", resp, "Failure responding to request")
24656		return
24657	}
24658
24659	return
24660}
24661
24662// ListRelayServiceConnectionsPreparer prepares the ListRelayServiceConnections request.
24663func (client AppsClient) ListRelayServiceConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24664	pathParameters := map[string]interface{}{
24665		"name":              autorest.Encode("path", name),
24666		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24667		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24668	}
24669
24670	const APIVersion = "2020-09-01"
24671	queryParameters := map[string]interface{}{
24672		"api-version": APIVersion,
24673	}
24674
24675	preparer := autorest.CreatePreparer(
24676		autorest.AsGet(),
24677		autorest.WithBaseURL(client.BaseURI),
24678		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection", pathParameters),
24679		autorest.WithQueryParameters(queryParameters))
24680	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24681}
24682
24683// ListRelayServiceConnectionsSender sends the ListRelayServiceConnections request. The method will close the
24684// http.Response Body if it receives an error.
24685func (client AppsClient) ListRelayServiceConnectionsSender(req *http.Request) (*http.Response, error) {
24686	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24687}
24688
24689// ListRelayServiceConnectionsResponder handles the response to the ListRelayServiceConnections request. The method always
24690// closes the http.Response Body.
24691func (client AppsClient) ListRelayServiceConnectionsResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
24692	err = autorest.Respond(
24693		resp,
24694		azure.WithErrorUnlessStatusCode(http.StatusOK),
24695		autorest.ByUnmarshallingJSON(&result),
24696		autorest.ByClosing())
24697	result.Response = autorest.Response{Response: resp}
24698	return
24699}
24700
24701// ListRelayServiceConnectionsSlot description for Gets hybrid connections configured for an app (or deployment slot,
24702// if specified).
24703// Parameters:
24704// resourceGroupName - name of the resource group to which the resource belongs.
24705// name - name of the app.
24706// slot - name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the
24707// production slot.
24708func (client AppsClient) ListRelayServiceConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result RelayServiceConnectionEntity, err error) {
24709	if tracing.IsEnabled() {
24710		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListRelayServiceConnectionsSlot")
24711		defer func() {
24712			sc := -1
24713			if result.Response.Response != nil {
24714				sc = result.Response.Response.StatusCode
24715			}
24716			tracing.EndSpan(ctx, sc, err)
24717		}()
24718	}
24719	if err := validation.Validate([]validation.Validation{
24720		{TargetValue: resourceGroupName,
24721			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24722				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24723				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24724		return result, validation.NewError("web.AppsClient", "ListRelayServiceConnectionsSlot", err.Error())
24725	}
24726
24727	req, err := client.ListRelayServiceConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
24728	if err != nil {
24729		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", nil, "Failure preparing request")
24730		return
24731	}
24732
24733	resp, err := client.ListRelayServiceConnectionsSlotSender(req)
24734	if err != nil {
24735		result.Response = autorest.Response{Response: resp}
24736		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", resp, "Failure sending request")
24737		return
24738	}
24739
24740	result, err = client.ListRelayServiceConnectionsSlotResponder(resp)
24741	if err != nil {
24742		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListRelayServiceConnectionsSlot", resp, "Failure responding to request")
24743		return
24744	}
24745
24746	return
24747}
24748
24749// ListRelayServiceConnectionsSlotPreparer prepares the ListRelayServiceConnectionsSlot request.
24750func (client AppsClient) ListRelayServiceConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24751	pathParameters := map[string]interface{}{
24752		"name":              autorest.Encode("path", name),
24753		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24754		"slot":              autorest.Encode("path", slot),
24755		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24756	}
24757
24758	const APIVersion = "2020-09-01"
24759	queryParameters := map[string]interface{}{
24760		"api-version": APIVersion,
24761	}
24762
24763	preparer := autorest.CreatePreparer(
24764		autorest.AsGet(),
24765		autorest.WithBaseURL(client.BaseURI),
24766		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection", pathParameters),
24767		autorest.WithQueryParameters(queryParameters))
24768	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24769}
24770
24771// ListRelayServiceConnectionsSlotSender sends the ListRelayServiceConnectionsSlot request. The method will close the
24772// http.Response Body if it receives an error.
24773func (client AppsClient) ListRelayServiceConnectionsSlotSender(req *http.Request) (*http.Response, error) {
24774	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24775}
24776
24777// ListRelayServiceConnectionsSlotResponder handles the response to the ListRelayServiceConnectionsSlot request. The method always
24778// closes the http.Response Body.
24779func (client AppsClient) ListRelayServiceConnectionsSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
24780	err = autorest.Respond(
24781		resp,
24782		azure.WithErrorUnlessStatusCode(http.StatusOK),
24783		autorest.ByUnmarshallingJSON(&result),
24784		autorest.ByClosing())
24785	result.Response = autorest.Response{Response: resp}
24786	return
24787}
24788
24789// ListSiteBackups description for Gets existing backups of an app.
24790// Parameters:
24791// resourceGroupName - name of the resource group to which the resource belongs.
24792// name - name of the app.
24793func (client AppsClient) ListSiteBackups(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionPage, err error) {
24794	if tracing.IsEnabled() {
24795		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackups")
24796		defer func() {
24797			sc := -1
24798			if result.bic.Response.Response != nil {
24799				sc = result.bic.Response.Response.StatusCode
24800			}
24801			tracing.EndSpan(ctx, sc, err)
24802		}()
24803	}
24804	if err := validation.Validate([]validation.Validation{
24805		{TargetValue: resourceGroupName,
24806			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24807				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24808				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24809		return result, validation.NewError("web.AppsClient", "ListSiteBackups", err.Error())
24810	}
24811
24812	result.fn = client.listSiteBackupsNextResults
24813	req, err := client.ListSiteBackupsPreparer(ctx, resourceGroupName, name)
24814	if err != nil {
24815		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackups", nil, "Failure preparing request")
24816		return
24817	}
24818
24819	resp, err := client.ListSiteBackupsSender(req)
24820	if err != nil {
24821		result.bic.Response = autorest.Response{Response: resp}
24822		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackups", resp, "Failure sending request")
24823		return
24824	}
24825
24826	result.bic, err = client.ListSiteBackupsResponder(resp)
24827	if err != nil {
24828		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackups", resp, "Failure responding to request")
24829		return
24830	}
24831	if result.bic.hasNextLink() && result.bic.IsEmpty() {
24832		err = result.NextWithContext(ctx)
24833		return
24834	}
24835
24836	return
24837}
24838
24839// ListSiteBackupsPreparer prepares the ListSiteBackups request.
24840func (client AppsClient) ListSiteBackupsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
24841	pathParameters := map[string]interface{}{
24842		"name":              autorest.Encode("path", name),
24843		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24844		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24845	}
24846
24847	const APIVersion = "2020-09-01"
24848	queryParameters := map[string]interface{}{
24849		"api-version": APIVersion,
24850	}
24851
24852	preparer := autorest.CreatePreparer(
24853		autorest.AsPost(),
24854		autorest.WithBaseURL(client.BaseURI),
24855		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups", pathParameters),
24856		autorest.WithQueryParameters(queryParameters))
24857	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24858}
24859
24860// ListSiteBackupsSender sends the ListSiteBackups request. The method will close the
24861// http.Response Body if it receives an error.
24862func (client AppsClient) ListSiteBackupsSender(req *http.Request) (*http.Response, error) {
24863	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24864}
24865
24866// ListSiteBackupsResponder handles the response to the ListSiteBackups request. The method always
24867// closes the http.Response Body.
24868func (client AppsClient) ListSiteBackupsResponder(resp *http.Response) (result BackupItemCollection, err error) {
24869	err = autorest.Respond(
24870		resp,
24871		azure.WithErrorUnlessStatusCode(http.StatusOK),
24872		autorest.ByUnmarshallingJSON(&result),
24873		autorest.ByClosing())
24874	result.Response = autorest.Response{Response: resp}
24875	return
24876}
24877
24878// listSiteBackupsNextResults retrieves the next set of results, if any.
24879func (client AppsClient) listSiteBackupsNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
24880	req, err := lastResults.backupItemCollectionPreparer(ctx)
24881	if err != nil {
24882		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsNextResults", nil, "Failure preparing next results request")
24883	}
24884	if req == nil {
24885		return
24886	}
24887	resp, err := client.ListSiteBackupsSender(req)
24888	if err != nil {
24889		result.Response = autorest.Response{Response: resp}
24890		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsNextResults", resp, "Failure sending next results request")
24891	}
24892	result, err = client.ListSiteBackupsResponder(resp)
24893	if err != nil {
24894		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsNextResults", resp, "Failure responding to next results request")
24895	}
24896	return
24897}
24898
24899// ListSiteBackupsComplete enumerates all values, automatically crossing page boundaries as required.
24900func (client AppsClient) ListSiteBackupsComplete(ctx context.Context, resourceGroupName string, name string) (result BackupItemCollectionIterator, err error) {
24901	if tracing.IsEnabled() {
24902		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackups")
24903		defer func() {
24904			sc := -1
24905			if result.Response().Response.Response != nil {
24906				sc = result.page.Response().Response.Response.StatusCode
24907			}
24908			tracing.EndSpan(ctx, sc, err)
24909		}()
24910	}
24911	result.page, err = client.ListSiteBackups(ctx, resourceGroupName, name)
24912	return
24913}
24914
24915// ListSiteBackupsSlot description for Gets existing backups of an app.
24916// Parameters:
24917// resourceGroupName - name of the resource group to which the resource belongs.
24918// name - name of the app.
24919// slot - name of the deployment slot. If a slot is not specified, the API will get backups of the production
24920// slot.
24921func (client AppsClient) ListSiteBackupsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionPage, err error) {
24922	if tracing.IsEnabled() {
24923		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackupsSlot")
24924		defer func() {
24925			sc := -1
24926			if result.bic.Response.Response != nil {
24927				sc = result.bic.Response.Response.StatusCode
24928			}
24929			tracing.EndSpan(ctx, sc, err)
24930		}()
24931	}
24932	if err := validation.Validate([]validation.Validation{
24933		{TargetValue: resourceGroupName,
24934			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
24935				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
24936				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
24937		return result, validation.NewError("web.AppsClient", "ListSiteBackupsSlot", err.Error())
24938	}
24939
24940	result.fn = client.listSiteBackupsSlotNextResults
24941	req, err := client.ListSiteBackupsSlotPreparer(ctx, resourceGroupName, name, slot)
24942	if err != nil {
24943		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackupsSlot", nil, "Failure preparing request")
24944		return
24945	}
24946
24947	resp, err := client.ListSiteBackupsSlotSender(req)
24948	if err != nil {
24949		result.bic.Response = autorest.Response{Response: resp}
24950		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackupsSlot", resp, "Failure sending request")
24951		return
24952	}
24953
24954	result.bic, err = client.ListSiteBackupsSlotResponder(resp)
24955	if err != nil {
24956		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteBackupsSlot", resp, "Failure responding to request")
24957		return
24958	}
24959	if result.bic.hasNextLink() && result.bic.IsEmpty() {
24960		err = result.NextWithContext(ctx)
24961		return
24962	}
24963
24964	return
24965}
24966
24967// ListSiteBackupsSlotPreparer prepares the ListSiteBackupsSlot request.
24968func (client AppsClient) ListSiteBackupsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
24969	pathParameters := map[string]interface{}{
24970		"name":              autorest.Encode("path", name),
24971		"resourceGroupName": autorest.Encode("path", resourceGroupName),
24972		"slot":              autorest.Encode("path", slot),
24973		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
24974	}
24975
24976	const APIVersion = "2020-09-01"
24977	queryParameters := map[string]interface{}{
24978		"api-version": APIVersion,
24979	}
24980
24981	preparer := autorest.CreatePreparer(
24982		autorest.AsPost(),
24983		autorest.WithBaseURL(client.BaseURI),
24984		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups", pathParameters),
24985		autorest.WithQueryParameters(queryParameters))
24986	return preparer.Prepare((&http.Request{}).WithContext(ctx))
24987}
24988
24989// ListSiteBackupsSlotSender sends the ListSiteBackupsSlot request. The method will close the
24990// http.Response Body if it receives an error.
24991func (client AppsClient) ListSiteBackupsSlotSender(req *http.Request) (*http.Response, error) {
24992	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
24993}
24994
24995// ListSiteBackupsSlotResponder handles the response to the ListSiteBackupsSlot request. The method always
24996// closes the http.Response Body.
24997func (client AppsClient) ListSiteBackupsSlotResponder(resp *http.Response) (result BackupItemCollection, err error) {
24998	err = autorest.Respond(
24999		resp,
25000		azure.WithErrorUnlessStatusCode(http.StatusOK),
25001		autorest.ByUnmarshallingJSON(&result),
25002		autorest.ByClosing())
25003	result.Response = autorest.Response{Response: resp}
25004	return
25005}
25006
25007// listSiteBackupsSlotNextResults retrieves the next set of results, if any.
25008func (client AppsClient) listSiteBackupsSlotNextResults(ctx context.Context, lastResults BackupItemCollection) (result BackupItemCollection, err error) {
25009	req, err := lastResults.backupItemCollectionPreparer(ctx)
25010	if err != nil {
25011		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsSlotNextResults", nil, "Failure preparing next results request")
25012	}
25013	if req == nil {
25014		return
25015	}
25016	resp, err := client.ListSiteBackupsSlotSender(req)
25017	if err != nil {
25018		result.Response = autorest.Response{Response: resp}
25019		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsSlotNextResults", resp, "Failure sending next results request")
25020	}
25021	result, err = client.ListSiteBackupsSlotResponder(resp)
25022	if err != nil {
25023		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteBackupsSlotNextResults", resp, "Failure responding to next results request")
25024	}
25025	return
25026}
25027
25028// ListSiteBackupsSlotComplete enumerates all values, automatically crossing page boundaries as required.
25029func (client AppsClient) ListSiteBackupsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result BackupItemCollectionIterator, err error) {
25030	if tracing.IsEnabled() {
25031		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteBackupsSlot")
25032		defer func() {
25033			sc := -1
25034			if result.Response().Response.Response != nil {
25035				sc = result.page.Response().Response.Response.StatusCode
25036			}
25037			tracing.EndSpan(ctx, sc, err)
25038		}()
25039	}
25040	result.page, err = client.ListSiteBackupsSlot(ctx, resourceGroupName, name, slot)
25041	return
25042}
25043
25044// ListSiteExtensions description for Get list of siteextensions for a web site, or a deployment slot.
25045// Parameters:
25046// resourceGroupName - name of the resource group to which the resource belongs.
25047// name - site name.
25048func (client AppsClient) ListSiteExtensions(ctx context.Context, resourceGroupName string, name string) (result SiteExtensionInfoCollectionPage, err error) {
25049	if tracing.IsEnabled() {
25050		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensions")
25051		defer func() {
25052			sc := -1
25053			if result.seic.Response.Response != nil {
25054				sc = result.seic.Response.Response.StatusCode
25055			}
25056			tracing.EndSpan(ctx, sc, err)
25057		}()
25058	}
25059	if err := validation.Validate([]validation.Validation{
25060		{TargetValue: resourceGroupName,
25061			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25062				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25063				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25064		return result, validation.NewError("web.AppsClient", "ListSiteExtensions", err.Error())
25065	}
25066
25067	result.fn = client.listSiteExtensionsNextResults
25068	req, err := client.ListSiteExtensionsPreparer(ctx, resourceGroupName, name)
25069	if err != nil {
25070		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", nil, "Failure preparing request")
25071		return
25072	}
25073
25074	resp, err := client.ListSiteExtensionsSender(req)
25075	if err != nil {
25076		result.seic.Response = autorest.Response{Response: resp}
25077		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure sending request")
25078		return
25079	}
25080
25081	result.seic, err = client.ListSiteExtensionsResponder(resp)
25082	if err != nil {
25083		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure responding to request")
25084		return
25085	}
25086	if result.seic.hasNextLink() && result.seic.IsEmpty() {
25087		err = result.NextWithContext(ctx)
25088		return
25089	}
25090
25091	return
25092}
25093
25094// ListSiteExtensionsPreparer prepares the ListSiteExtensions request.
25095func (client AppsClient) ListSiteExtensionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25096	pathParameters := map[string]interface{}{
25097		"name":              autorest.Encode("path", name),
25098		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25099		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25100	}
25101
25102	const APIVersion = "2020-09-01"
25103	queryParameters := map[string]interface{}{
25104		"api-version": APIVersion,
25105	}
25106
25107	preparer := autorest.CreatePreparer(
25108		autorest.AsGet(),
25109		autorest.WithBaseURL(client.BaseURI),
25110		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions", pathParameters),
25111		autorest.WithQueryParameters(queryParameters))
25112	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25113}
25114
25115// ListSiteExtensionsSender sends the ListSiteExtensions request. The method will close the
25116// http.Response Body if it receives an error.
25117func (client AppsClient) ListSiteExtensionsSender(req *http.Request) (*http.Response, error) {
25118	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25119}
25120
25121// ListSiteExtensionsResponder handles the response to the ListSiteExtensions request. The method always
25122// closes the http.Response Body.
25123func (client AppsClient) ListSiteExtensionsResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) {
25124	err = autorest.Respond(
25125		resp,
25126		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
25127		autorest.ByUnmarshallingJSON(&result),
25128		autorest.ByClosing())
25129	result.Response = autorest.Response{Response: resp}
25130	return
25131}
25132
25133// listSiteExtensionsNextResults retrieves the next set of results, if any.
25134func (client AppsClient) listSiteExtensionsNextResults(ctx context.Context, lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) {
25135	req, err := lastResults.siteExtensionInfoCollectionPreparer(ctx)
25136	if err != nil {
25137		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", nil, "Failure preparing next results request")
25138	}
25139	if req == nil {
25140		return
25141	}
25142	resp, err := client.ListSiteExtensionsSender(req)
25143	if err != nil {
25144		result.Response = autorest.Response{Response: resp}
25145		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", resp, "Failure sending next results request")
25146	}
25147	result, err = client.ListSiteExtensionsResponder(resp)
25148	if err != nil {
25149		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsNextResults", resp, "Failure responding to next results request")
25150	}
25151	return
25152}
25153
25154// ListSiteExtensionsComplete enumerates all values, automatically crossing page boundaries as required.
25155func (client AppsClient) ListSiteExtensionsComplete(ctx context.Context, resourceGroupName string, name string) (result SiteExtensionInfoCollectionIterator, err error) {
25156	if tracing.IsEnabled() {
25157		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensions")
25158		defer func() {
25159			sc := -1
25160			if result.Response().Response.Response != nil {
25161				sc = result.page.Response().Response.Response.StatusCode
25162			}
25163			tracing.EndSpan(ctx, sc, err)
25164		}()
25165	}
25166	result.page, err = client.ListSiteExtensions(ctx, resourceGroupName, name)
25167	return
25168}
25169
25170// ListSiteExtensionsSlot description for Get list of siteextensions for a web site, or a deployment slot.
25171// Parameters:
25172// resourceGroupName - name of the resource group to which the resource belongs.
25173// name - site name.
25174// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
25175func (client AppsClient) ListSiteExtensionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollectionPage, err error) {
25176	if tracing.IsEnabled() {
25177		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensionsSlot")
25178		defer func() {
25179			sc := -1
25180			if result.seic.Response.Response != nil {
25181				sc = result.seic.Response.Response.StatusCode
25182			}
25183			tracing.EndSpan(ctx, sc, err)
25184		}()
25185	}
25186	if err := validation.Validate([]validation.Validation{
25187		{TargetValue: resourceGroupName,
25188			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25189				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25190				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25191		return result, validation.NewError("web.AppsClient", "ListSiteExtensionsSlot", err.Error())
25192	}
25193
25194	result.fn = client.listSiteExtensionsSlotNextResults
25195	req, err := client.ListSiteExtensionsSlotPreparer(ctx, resourceGroupName, name, slot)
25196	if err != nil {
25197		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", nil, "Failure preparing request")
25198		return
25199	}
25200
25201	resp, err := client.ListSiteExtensionsSlotSender(req)
25202	if err != nil {
25203		result.seic.Response = autorest.Response{Response: resp}
25204		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure sending request")
25205		return
25206	}
25207
25208	result.seic, err = client.ListSiteExtensionsSlotResponder(resp)
25209	if err != nil {
25210		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure responding to request")
25211		return
25212	}
25213	if result.seic.hasNextLink() && result.seic.IsEmpty() {
25214		err = result.NextWithContext(ctx)
25215		return
25216	}
25217
25218	return
25219}
25220
25221// ListSiteExtensionsSlotPreparer prepares the ListSiteExtensionsSlot request.
25222func (client AppsClient) ListSiteExtensionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25223	pathParameters := map[string]interface{}{
25224		"name":              autorest.Encode("path", name),
25225		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25226		"slot":              autorest.Encode("path", slot),
25227		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25228	}
25229
25230	const APIVersion = "2020-09-01"
25231	queryParameters := map[string]interface{}{
25232		"api-version": APIVersion,
25233	}
25234
25235	preparer := autorest.CreatePreparer(
25236		autorest.AsGet(),
25237		autorest.WithBaseURL(client.BaseURI),
25238		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions", pathParameters),
25239		autorest.WithQueryParameters(queryParameters))
25240	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25241}
25242
25243// ListSiteExtensionsSlotSender sends the ListSiteExtensionsSlot request. The method will close the
25244// http.Response Body if it receives an error.
25245func (client AppsClient) ListSiteExtensionsSlotSender(req *http.Request) (*http.Response, error) {
25246	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25247}
25248
25249// ListSiteExtensionsSlotResponder handles the response to the ListSiteExtensionsSlot request. The method always
25250// closes the http.Response Body.
25251func (client AppsClient) ListSiteExtensionsSlotResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) {
25252	err = autorest.Respond(
25253		resp,
25254		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
25255		autorest.ByUnmarshallingJSON(&result),
25256		autorest.ByClosing())
25257	result.Response = autorest.Response{Response: resp}
25258	return
25259}
25260
25261// listSiteExtensionsSlotNextResults retrieves the next set of results, if any.
25262func (client AppsClient) listSiteExtensionsSlotNextResults(ctx context.Context, lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) {
25263	req, err := lastResults.siteExtensionInfoCollectionPreparer(ctx)
25264	if err != nil {
25265		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", nil, "Failure preparing next results request")
25266	}
25267	if req == nil {
25268		return
25269	}
25270	resp, err := client.ListSiteExtensionsSlotSender(req)
25271	if err != nil {
25272		result.Response = autorest.Response{Response: resp}
25273		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", resp, "Failure sending next results request")
25274	}
25275	result, err = client.ListSiteExtensionsSlotResponder(resp)
25276	if err != nil {
25277		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSiteExtensionsSlotNextResults", resp, "Failure responding to next results request")
25278	}
25279	return
25280}
25281
25282// ListSiteExtensionsSlotComplete enumerates all values, automatically crossing page boundaries as required.
25283func (client AppsClient) ListSiteExtensionsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollectionIterator, err error) {
25284	if tracing.IsEnabled() {
25285		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSiteExtensionsSlot")
25286		defer func() {
25287			sc := -1
25288			if result.Response().Response.Response != nil {
25289				sc = result.page.Response().Response.Response.StatusCode
25290			}
25291			tracing.EndSpan(ctx, sc, err)
25292		}()
25293	}
25294	result.page, err = client.ListSiteExtensionsSlot(ctx, resourceGroupName, name, slot)
25295	return
25296}
25297
25298// ListSitePushSettings description for Gets the Push settings associated with web app.
25299// Parameters:
25300// resourceGroupName - name of the resource group to which the resource belongs.
25301// name - name of web app.
25302func (client AppsClient) ListSitePushSettings(ctx context.Context, resourceGroupName string, name string) (result PushSettings, err error) {
25303	if tracing.IsEnabled() {
25304		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSitePushSettings")
25305		defer func() {
25306			sc := -1
25307			if result.Response.Response != nil {
25308				sc = result.Response.Response.StatusCode
25309			}
25310			tracing.EndSpan(ctx, sc, err)
25311		}()
25312	}
25313	if err := validation.Validate([]validation.Validation{
25314		{TargetValue: resourceGroupName,
25315			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25316				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25317				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25318		return result, validation.NewError("web.AppsClient", "ListSitePushSettings", err.Error())
25319	}
25320
25321	req, err := client.ListSitePushSettingsPreparer(ctx, resourceGroupName, name)
25322	if err != nil {
25323		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", nil, "Failure preparing request")
25324		return
25325	}
25326
25327	resp, err := client.ListSitePushSettingsSender(req)
25328	if err != nil {
25329		result.Response = autorest.Response{Response: resp}
25330		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", resp, "Failure sending request")
25331		return
25332	}
25333
25334	result, err = client.ListSitePushSettingsResponder(resp)
25335	if err != nil {
25336		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettings", resp, "Failure responding to request")
25337		return
25338	}
25339
25340	return
25341}
25342
25343// ListSitePushSettingsPreparer prepares the ListSitePushSettings request.
25344func (client AppsClient) ListSitePushSettingsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25345	pathParameters := map[string]interface{}{
25346		"name":              autorest.Encode("path", name),
25347		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25348		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25349	}
25350
25351	const APIVersion = "2020-09-01"
25352	queryParameters := map[string]interface{}{
25353		"api-version": APIVersion,
25354	}
25355
25356	preparer := autorest.CreatePreparer(
25357		autorest.AsPost(),
25358		autorest.WithBaseURL(client.BaseURI),
25359		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list", pathParameters),
25360		autorest.WithQueryParameters(queryParameters))
25361	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25362}
25363
25364// ListSitePushSettingsSender sends the ListSitePushSettings request. The method will close the
25365// http.Response Body if it receives an error.
25366func (client AppsClient) ListSitePushSettingsSender(req *http.Request) (*http.Response, error) {
25367	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25368}
25369
25370// ListSitePushSettingsResponder handles the response to the ListSitePushSettings request. The method always
25371// closes the http.Response Body.
25372func (client AppsClient) ListSitePushSettingsResponder(resp *http.Response) (result PushSettings, err error) {
25373	err = autorest.Respond(
25374		resp,
25375		azure.WithErrorUnlessStatusCode(http.StatusOK),
25376		autorest.ByUnmarshallingJSON(&result),
25377		autorest.ByClosing())
25378	result.Response = autorest.Response{Response: resp}
25379	return
25380}
25381
25382// ListSitePushSettingsSlot description for Gets the Push settings associated with web app.
25383// Parameters:
25384// resourceGroupName - name of the resource group to which the resource belongs.
25385// name - name of web app.
25386// slot - name of web app slot. If not specified then will default to production slot.
25387func (client AppsClient) ListSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result PushSettings, err error) {
25388	if tracing.IsEnabled() {
25389		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSitePushSettingsSlot")
25390		defer func() {
25391			sc := -1
25392			if result.Response.Response != nil {
25393				sc = result.Response.Response.StatusCode
25394			}
25395			tracing.EndSpan(ctx, sc, err)
25396		}()
25397	}
25398	if err := validation.Validate([]validation.Validation{
25399		{TargetValue: resourceGroupName,
25400			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25401				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25402				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25403		return result, validation.NewError("web.AppsClient", "ListSitePushSettingsSlot", err.Error())
25404	}
25405
25406	req, err := client.ListSitePushSettingsSlotPreparer(ctx, resourceGroupName, name, slot)
25407	if err != nil {
25408		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", nil, "Failure preparing request")
25409		return
25410	}
25411
25412	resp, err := client.ListSitePushSettingsSlotSender(req)
25413	if err != nil {
25414		result.Response = autorest.Response{Response: resp}
25415		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", resp, "Failure sending request")
25416		return
25417	}
25418
25419	result, err = client.ListSitePushSettingsSlotResponder(resp)
25420	if err != nil {
25421		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSitePushSettingsSlot", resp, "Failure responding to request")
25422		return
25423	}
25424
25425	return
25426}
25427
25428// ListSitePushSettingsSlotPreparer prepares the ListSitePushSettingsSlot request.
25429func (client AppsClient) ListSitePushSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
25430	pathParameters := map[string]interface{}{
25431		"name":              autorest.Encode("path", name),
25432		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25433		"slot":              autorest.Encode("path", slot),
25434		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25435	}
25436
25437	const APIVersion = "2020-09-01"
25438	queryParameters := map[string]interface{}{
25439		"api-version": APIVersion,
25440	}
25441
25442	preparer := autorest.CreatePreparer(
25443		autorest.AsPost(),
25444		autorest.WithBaseURL(client.BaseURI),
25445		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list", pathParameters),
25446		autorest.WithQueryParameters(queryParameters))
25447	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25448}
25449
25450// ListSitePushSettingsSlotSender sends the ListSitePushSettingsSlot request. The method will close the
25451// http.Response Body if it receives an error.
25452func (client AppsClient) ListSitePushSettingsSlotSender(req *http.Request) (*http.Response, error) {
25453	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25454}
25455
25456// ListSitePushSettingsSlotResponder handles the response to the ListSitePushSettingsSlot request. The method always
25457// closes the http.Response Body.
25458func (client AppsClient) ListSitePushSettingsSlotResponder(resp *http.Response) (result PushSettings, err error) {
25459	err = autorest.Respond(
25460		resp,
25461		azure.WithErrorUnlessStatusCode(http.StatusOK),
25462		autorest.ByUnmarshallingJSON(&result),
25463		autorest.ByClosing())
25464	result.Response = autorest.Response{Response: resp}
25465	return
25466}
25467
25468// ListSlotConfigurationNames description for Gets the names of app settings and connection strings that stick to the
25469// slot (not swapped).
25470// Parameters:
25471// resourceGroupName - name of the resource group to which the resource belongs.
25472// name - name of the app.
25473func (client AppsClient) ListSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string) (result SlotConfigNamesResource, err error) {
25474	if tracing.IsEnabled() {
25475		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotConfigurationNames")
25476		defer func() {
25477			sc := -1
25478			if result.Response.Response != nil {
25479				sc = result.Response.Response.StatusCode
25480			}
25481			tracing.EndSpan(ctx, sc, err)
25482		}()
25483	}
25484	if err := validation.Validate([]validation.Validation{
25485		{TargetValue: resourceGroupName,
25486			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25487				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25488				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25489		return result, validation.NewError("web.AppsClient", "ListSlotConfigurationNames", err.Error())
25490	}
25491
25492	req, err := client.ListSlotConfigurationNamesPreparer(ctx, resourceGroupName, name)
25493	if err != nil {
25494		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", nil, "Failure preparing request")
25495		return
25496	}
25497
25498	resp, err := client.ListSlotConfigurationNamesSender(req)
25499	if err != nil {
25500		result.Response = autorest.Response{Response: resp}
25501		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", resp, "Failure sending request")
25502		return
25503	}
25504
25505	result, err = client.ListSlotConfigurationNamesResponder(resp)
25506	if err != nil {
25507		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotConfigurationNames", resp, "Failure responding to request")
25508		return
25509	}
25510
25511	return
25512}
25513
25514// ListSlotConfigurationNamesPreparer prepares the ListSlotConfigurationNames request.
25515func (client AppsClient) ListSlotConfigurationNamesPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25516	pathParameters := map[string]interface{}{
25517		"name":              autorest.Encode("path", name),
25518		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25519		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25520	}
25521
25522	const APIVersion = "2020-09-01"
25523	queryParameters := map[string]interface{}{
25524		"api-version": APIVersion,
25525	}
25526
25527	preparer := autorest.CreatePreparer(
25528		autorest.AsGet(),
25529		autorest.WithBaseURL(client.BaseURI),
25530		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames", pathParameters),
25531		autorest.WithQueryParameters(queryParameters))
25532	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25533}
25534
25535// ListSlotConfigurationNamesSender sends the ListSlotConfigurationNames request. The method will close the
25536// http.Response Body if it receives an error.
25537func (client AppsClient) ListSlotConfigurationNamesSender(req *http.Request) (*http.Response, error) {
25538	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25539}
25540
25541// ListSlotConfigurationNamesResponder handles the response to the ListSlotConfigurationNames request. The method always
25542// closes the http.Response Body.
25543func (client AppsClient) ListSlotConfigurationNamesResponder(resp *http.Response) (result SlotConfigNamesResource, err error) {
25544	err = autorest.Respond(
25545		resp,
25546		azure.WithErrorUnlessStatusCode(http.StatusOK),
25547		autorest.ByUnmarshallingJSON(&result),
25548		autorest.ByClosing())
25549	result.Response = autorest.Response{Response: resp}
25550	return
25551}
25552
25553// ListSlotDifferencesFromProduction description for Get the difference in configuration settings between two web app
25554// slots.
25555// Parameters:
25556// resourceGroupName - name of the resource group to which the resource belongs.
25557// name - name of the app.
25558// slotSwapEntity - JSON object that contains the target slot name. See example.
25559func (client AppsClient) ListSlotDifferencesFromProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollectionPage, err error) {
25560	if tracing.IsEnabled() {
25561		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesFromProduction")
25562		defer func() {
25563			sc := -1
25564			if result.sdc.Response.Response != nil {
25565				sc = result.sdc.Response.Response.StatusCode
25566			}
25567			tracing.EndSpan(ctx, sc, err)
25568		}()
25569	}
25570	if err := validation.Validate([]validation.Validation{
25571		{TargetValue: resourceGroupName,
25572			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25573				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25574				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
25575		{TargetValue: slotSwapEntity,
25576			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
25577				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
25578		return result, validation.NewError("web.AppsClient", "ListSlotDifferencesFromProduction", err.Error())
25579	}
25580
25581	result.fn = client.listSlotDifferencesFromProductionNextResults
25582	req, err := client.ListSlotDifferencesFromProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
25583	if err != nil {
25584		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", nil, "Failure preparing request")
25585		return
25586	}
25587
25588	resp, err := client.ListSlotDifferencesFromProductionSender(req)
25589	if err != nil {
25590		result.sdc.Response = autorest.Response{Response: resp}
25591		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", resp, "Failure sending request")
25592		return
25593	}
25594
25595	result.sdc, err = client.ListSlotDifferencesFromProductionResponder(resp)
25596	if err != nil {
25597		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesFromProduction", resp, "Failure responding to request")
25598		return
25599	}
25600	if result.sdc.hasNextLink() && result.sdc.IsEmpty() {
25601		err = result.NextWithContext(ctx)
25602		return
25603	}
25604
25605	return
25606}
25607
25608// ListSlotDifferencesFromProductionPreparer prepares the ListSlotDifferencesFromProduction request.
25609func (client AppsClient) ListSlotDifferencesFromProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
25610	pathParameters := map[string]interface{}{
25611		"name":              autorest.Encode("path", name),
25612		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25613		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25614	}
25615
25616	const APIVersion = "2020-09-01"
25617	queryParameters := map[string]interface{}{
25618		"api-version": APIVersion,
25619	}
25620
25621	preparer := autorest.CreatePreparer(
25622		autorest.AsContentType("application/json; charset=utf-8"),
25623		autorest.AsPost(),
25624		autorest.WithBaseURL(client.BaseURI),
25625		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs", pathParameters),
25626		autorest.WithJSON(slotSwapEntity),
25627		autorest.WithQueryParameters(queryParameters))
25628	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25629}
25630
25631// ListSlotDifferencesFromProductionSender sends the ListSlotDifferencesFromProduction request. The method will close the
25632// http.Response Body if it receives an error.
25633func (client AppsClient) ListSlotDifferencesFromProductionSender(req *http.Request) (*http.Response, error) {
25634	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25635}
25636
25637// ListSlotDifferencesFromProductionResponder handles the response to the ListSlotDifferencesFromProduction request. The method always
25638// closes the http.Response Body.
25639func (client AppsClient) ListSlotDifferencesFromProductionResponder(resp *http.Response) (result SlotDifferenceCollection, err error) {
25640	err = autorest.Respond(
25641		resp,
25642		azure.WithErrorUnlessStatusCode(http.StatusOK),
25643		autorest.ByUnmarshallingJSON(&result),
25644		autorest.ByClosing())
25645	result.Response = autorest.Response{Response: resp}
25646	return
25647}
25648
25649// listSlotDifferencesFromProductionNextResults retrieves the next set of results, if any.
25650func (client AppsClient) listSlotDifferencesFromProductionNextResults(ctx context.Context, lastResults SlotDifferenceCollection) (result SlotDifferenceCollection, err error) {
25651	req, err := lastResults.slotDifferenceCollectionPreparer(ctx)
25652	if err != nil {
25653		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", nil, "Failure preparing next results request")
25654	}
25655	if req == nil {
25656		return
25657	}
25658	resp, err := client.ListSlotDifferencesFromProductionSender(req)
25659	if err != nil {
25660		result.Response = autorest.Response{Response: resp}
25661		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", resp, "Failure sending next results request")
25662	}
25663	result, err = client.ListSlotDifferencesFromProductionResponder(resp)
25664	if err != nil {
25665		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesFromProductionNextResults", resp, "Failure responding to next results request")
25666	}
25667	return
25668}
25669
25670// ListSlotDifferencesFromProductionComplete enumerates all values, automatically crossing page boundaries as required.
25671func (client AppsClient) ListSlotDifferencesFromProductionComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollectionIterator, err error) {
25672	if tracing.IsEnabled() {
25673		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesFromProduction")
25674		defer func() {
25675			sc := -1
25676			if result.Response().Response.Response != nil {
25677				sc = result.page.Response().Response.Response.StatusCode
25678			}
25679			tracing.EndSpan(ctx, sc, err)
25680		}()
25681	}
25682	result.page, err = client.ListSlotDifferencesFromProduction(ctx, resourceGroupName, name, slotSwapEntity)
25683	return
25684}
25685
25686// ListSlotDifferencesSlot description for Get the difference in configuration settings between two web app slots.
25687// Parameters:
25688// resourceGroupName - name of the resource group to which the resource belongs.
25689// name - name of the app.
25690// slotSwapEntity - JSON object that contains the target slot name. See example.
25691// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
25692func (client AppsClient) ListSlotDifferencesSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollectionPage, err error) {
25693	if tracing.IsEnabled() {
25694		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesSlot")
25695		defer func() {
25696			sc := -1
25697			if result.sdc.Response.Response != nil {
25698				sc = result.sdc.Response.Response.StatusCode
25699			}
25700			tracing.EndSpan(ctx, sc, err)
25701		}()
25702	}
25703	if err := validation.Validate([]validation.Validation{
25704		{TargetValue: resourceGroupName,
25705			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25706				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25707				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
25708		{TargetValue: slotSwapEntity,
25709			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
25710				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
25711		return result, validation.NewError("web.AppsClient", "ListSlotDifferencesSlot", err.Error())
25712	}
25713
25714	result.fn = client.listSlotDifferencesSlotNextResults
25715	req, err := client.ListSlotDifferencesSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
25716	if err != nil {
25717		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", nil, "Failure preparing request")
25718		return
25719	}
25720
25721	resp, err := client.ListSlotDifferencesSlotSender(req)
25722	if err != nil {
25723		result.sdc.Response = autorest.Response{Response: resp}
25724		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", resp, "Failure sending request")
25725		return
25726	}
25727
25728	result.sdc, err = client.ListSlotDifferencesSlotResponder(resp)
25729	if err != nil {
25730		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlotDifferencesSlot", resp, "Failure responding to request")
25731		return
25732	}
25733	if result.sdc.hasNextLink() && result.sdc.IsEmpty() {
25734		err = result.NextWithContext(ctx)
25735		return
25736	}
25737
25738	return
25739}
25740
25741// ListSlotDifferencesSlotPreparer prepares the ListSlotDifferencesSlot request.
25742func (client AppsClient) ListSlotDifferencesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
25743	pathParameters := map[string]interface{}{
25744		"name":              autorest.Encode("path", name),
25745		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25746		"slot":              autorest.Encode("path", slot),
25747		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25748	}
25749
25750	const APIVersion = "2020-09-01"
25751	queryParameters := map[string]interface{}{
25752		"api-version": APIVersion,
25753	}
25754
25755	preparer := autorest.CreatePreparer(
25756		autorest.AsContentType("application/json; charset=utf-8"),
25757		autorest.AsPost(),
25758		autorest.WithBaseURL(client.BaseURI),
25759		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs", pathParameters),
25760		autorest.WithJSON(slotSwapEntity),
25761		autorest.WithQueryParameters(queryParameters))
25762	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25763}
25764
25765// ListSlotDifferencesSlotSender sends the ListSlotDifferencesSlot request. The method will close the
25766// http.Response Body if it receives an error.
25767func (client AppsClient) ListSlotDifferencesSlotSender(req *http.Request) (*http.Response, error) {
25768	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25769}
25770
25771// ListSlotDifferencesSlotResponder handles the response to the ListSlotDifferencesSlot request. The method always
25772// closes the http.Response Body.
25773func (client AppsClient) ListSlotDifferencesSlotResponder(resp *http.Response) (result SlotDifferenceCollection, err error) {
25774	err = autorest.Respond(
25775		resp,
25776		azure.WithErrorUnlessStatusCode(http.StatusOK),
25777		autorest.ByUnmarshallingJSON(&result),
25778		autorest.ByClosing())
25779	result.Response = autorest.Response{Response: resp}
25780	return
25781}
25782
25783// listSlotDifferencesSlotNextResults retrieves the next set of results, if any.
25784func (client AppsClient) listSlotDifferencesSlotNextResults(ctx context.Context, lastResults SlotDifferenceCollection) (result SlotDifferenceCollection, err error) {
25785	req, err := lastResults.slotDifferenceCollectionPreparer(ctx)
25786	if err != nil {
25787		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", nil, "Failure preparing next results request")
25788	}
25789	if req == nil {
25790		return
25791	}
25792	resp, err := client.ListSlotDifferencesSlotSender(req)
25793	if err != nil {
25794		result.Response = autorest.Response{Response: resp}
25795		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", resp, "Failure sending next results request")
25796	}
25797	result, err = client.ListSlotDifferencesSlotResponder(resp)
25798	if err != nil {
25799		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotDifferencesSlotNextResults", resp, "Failure responding to next results request")
25800	}
25801	return
25802}
25803
25804// ListSlotDifferencesSlotComplete enumerates all values, automatically crossing page boundaries as required.
25805func (client AppsClient) ListSlotDifferencesSlotComplete(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollectionIterator, err error) {
25806	if tracing.IsEnabled() {
25807		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlotDifferencesSlot")
25808		defer func() {
25809			sc := -1
25810			if result.Response().Response.Response != nil {
25811				sc = result.page.Response().Response.Response.StatusCode
25812			}
25813			tracing.EndSpan(ctx, sc, err)
25814		}()
25815	}
25816	result.page, err = client.ListSlotDifferencesSlot(ctx, resourceGroupName, name, slotSwapEntity, slot)
25817	return
25818}
25819
25820// ListSlots description for Gets an app's deployment slots.
25821// Parameters:
25822// resourceGroupName - name of the resource group to which the resource belongs.
25823// name - name of the app.
25824func (client AppsClient) ListSlots(ctx context.Context, resourceGroupName string, name string) (result AppCollectionPage, err error) {
25825	if tracing.IsEnabled() {
25826		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlots")
25827		defer func() {
25828			sc := -1
25829			if result.ac.Response.Response != nil {
25830				sc = result.ac.Response.Response.StatusCode
25831			}
25832			tracing.EndSpan(ctx, sc, err)
25833		}()
25834	}
25835	if err := validation.Validate([]validation.Validation{
25836		{TargetValue: resourceGroupName,
25837			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25838				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25839				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25840		return result, validation.NewError("web.AppsClient", "ListSlots", err.Error())
25841	}
25842
25843	result.fn = client.listSlotsNextResults
25844	req, err := client.ListSlotsPreparer(ctx, resourceGroupName, name)
25845	if err != nil {
25846		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", nil, "Failure preparing request")
25847		return
25848	}
25849
25850	resp, err := client.ListSlotsSender(req)
25851	if err != nil {
25852		result.ac.Response = autorest.Response{Response: resp}
25853		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", resp, "Failure sending request")
25854		return
25855	}
25856
25857	result.ac, err = client.ListSlotsResponder(resp)
25858	if err != nil {
25859		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSlots", resp, "Failure responding to request")
25860		return
25861	}
25862	if result.ac.hasNextLink() && result.ac.IsEmpty() {
25863		err = result.NextWithContext(ctx)
25864		return
25865	}
25866
25867	return
25868}
25869
25870// ListSlotsPreparer prepares the ListSlots request.
25871func (client AppsClient) ListSlotsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25872	pathParameters := map[string]interface{}{
25873		"name":              autorest.Encode("path", name),
25874		"resourceGroupName": autorest.Encode("path", resourceGroupName),
25875		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
25876	}
25877
25878	const APIVersion = "2020-09-01"
25879	queryParameters := map[string]interface{}{
25880		"api-version": APIVersion,
25881	}
25882
25883	preparer := autorest.CreatePreparer(
25884		autorest.AsGet(),
25885		autorest.WithBaseURL(client.BaseURI),
25886		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots", pathParameters),
25887		autorest.WithQueryParameters(queryParameters))
25888	return preparer.Prepare((&http.Request{}).WithContext(ctx))
25889}
25890
25891// ListSlotsSender sends the ListSlots request. The method will close the
25892// http.Response Body if it receives an error.
25893func (client AppsClient) ListSlotsSender(req *http.Request) (*http.Response, error) {
25894	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
25895}
25896
25897// ListSlotsResponder handles the response to the ListSlots request. The method always
25898// closes the http.Response Body.
25899func (client AppsClient) ListSlotsResponder(resp *http.Response) (result AppCollection, err error) {
25900	err = autorest.Respond(
25901		resp,
25902		azure.WithErrorUnlessStatusCode(http.StatusOK),
25903		autorest.ByUnmarshallingJSON(&result),
25904		autorest.ByClosing())
25905	result.Response = autorest.Response{Response: resp}
25906	return
25907}
25908
25909// listSlotsNextResults retrieves the next set of results, if any.
25910func (client AppsClient) listSlotsNextResults(ctx context.Context, lastResults AppCollection) (result AppCollection, err error) {
25911	req, err := lastResults.appCollectionPreparer(ctx)
25912	if err != nil {
25913		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", nil, "Failure preparing next results request")
25914	}
25915	if req == nil {
25916		return
25917	}
25918	resp, err := client.ListSlotsSender(req)
25919	if err != nil {
25920		result.Response = autorest.Response{Response: resp}
25921		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", resp, "Failure sending next results request")
25922	}
25923	result, err = client.ListSlotsResponder(resp)
25924	if err != nil {
25925		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSlotsNextResults", resp, "Failure responding to next results request")
25926	}
25927	return
25928}
25929
25930// ListSlotsComplete enumerates all values, automatically crossing page boundaries as required.
25931func (client AppsClient) ListSlotsComplete(ctx context.Context, resourceGroupName string, name string) (result AppCollectionIterator, err error) {
25932	if tracing.IsEnabled() {
25933		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSlots")
25934		defer func() {
25935			sc := -1
25936			if result.Response().Response.Response != nil {
25937				sc = result.page.Response().Response.Response.StatusCode
25938			}
25939			tracing.EndSpan(ctx, sc, err)
25940		}()
25941	}
25942	result.page, err = client.ListSlots(ctx, resourceGroupName, name)
25943	return
25944}
25945
25946// ListSnapshots description for Returns all Snapshots to the user.
25947// Parameters:
25948// resourceGroupName - name of the resource group to which the resource belongs.
25949// name - website Name.
25950func (client AppsClient) ListSnapshots(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionPage, err error) {
25951	if tracing.IsEnabled() {
25952		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshots")
25953		defer func() {
25954			sc := -1
25955			if result.sc.Response.Response != nil {
25956				sc = result.sc.Response.Response.StatusCode
25957			}
25958			tracing.EndSpan(ctx, sc, err)
25959		}()
25960	}
25961	if err := validation.Validate([]validation.Validation{
25962		{TargetValue: resourceGroupName,
25963			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
25964				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
25965				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
25966		return result, validation.NewError("web.AppsClient", "ListSnapshots", err.Error())
25967	}
25968
25969	result.fn = client.listSnapshotsNextResults
25970	req, err := client.ListSnapshotsPreparer(ctx, resourceGroupName, name)
25971	if err != nil {
25972		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", nil, "Failure preparing request")
25973		return
25974	}
25975
25976	resp, err := client.ListSnapshotsSender(req)
25977	if err != nil {
25978		result.sc.Response = autorest.Response{Response: resp}
25979		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", resp, "Failure sending request")
25980		return
25981	}
25982
25983	result.sc, err = client.ListSnapshotsResponder(resp)
25984	if err != nil {
25985		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshots", resp, "Failure responding to request")
25986		return
25987	}
25988	if result.sc.hasNextLink() && result.sc.IsEmpty() {
25989		err = result.NextWithContext(ctx)
25990		return
25991	}
25992
25993	return
25994}
25995
25996// ListSnapshotsPreparer prepares the ListSnapshots request.
25997func (client AppsClient) ListSnapshotsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
25998	pathParameters := map[string]interface{}{
25999		"name":              autorest.Encode("path", name),
26000		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26001		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26002	}
26003
26004	const APIVersion = "2020-09-01"
26005	queryParameters := map[string]interface{}{
26006		"api-version": APIVersion,
26007	}
26008
26009	preparer := autorest.CreatePreparer(
26010		autorest.AsGet(),
26011		autorest.WithBaseURL(client.BaseURI),
26012		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots", pathParameters),
26013		autorest.WithQueryParameters(queryParameters))
26014	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26015}
26016
26017// ListSnapshotsSender sends the ListSnapshots request. The method will close the
26018// http.Response Body if it receives an error.
26019func (client AppsClient) ListSnapshotsSender(req *http.Request) (*http.Response, error) {
26020	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26021}
26022
26023// ListSnapshotsResponder handles the response to the ListSnapshots request. The method always
26024// closes the http.Response Body.
26025func (client AppsClient) ListSnapshotsResponder(resp *http.Response) (result SnapshotCollection, err error) {
26026	err = autorest.Respond(
26027		resp,
26028		azure.WithErrorUnlessStatusCode(http.StatusOK),
26029		autorest.ByUnmarshallingJSON(&result),
26030		autorest.ByClosing())
26031	result.Response = autorest.Response{Response: resp}
26032	return
26033}
26034
26035// listSnapshotsNextResults retrieves the next set of results, if any.
26036func (client AppsClient) listSnapshotsNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
26037	req, err := lastResults.snapshotCollectionPreparer(ctx)
26038	if err != nil {
26039		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", nil, "Failure preparing next results request")
26040	}
26041	if req == nil {
26042		return
26043	}
26044	resp, err := client.ListSnapshotsSender(req)
26045	if err != nil {
26046		result.Response = autorest.Response{Response: resp}
26047		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", resp, "Failure sending next results request")
26048	}
26049	result, err = client.ListSnapshotsResponder(resp)
26050	if err != nil {
26051		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsNextResults", resp, "Failure responding to next results request")
26052	}
26053	return
26054}
26055
26056// ListSnapshotsComplete enumerates all values, automatically crossing page boundaries as required.
26057func (client AppsClient) ListSnapshotsComplete(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionIterator, err error) {
26058	if tracing.IsEnabled() {
26059		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshots")
26060		defer func() {
26061			sc := -1
26062			if result.Response().Response.Response != nil {
26063				sc = result.page.Response().Response.Response.StatusCode
26064			}
26065			tracing.EndSpan(ctx, sc, err)
26066		}()
26067	}
26068	result.page, err = client.ListSnapshots(ctx, resourceGroupName, name)
26069	return
26070}
26071
26072// ListSnapshotsFromDRSecondary description for Returns all Snapshots to the user from DRSecondary endpoint.
26073// Parameters:
26074// resourceGroupName - name of the resource group to which the resource belongs.
26075// name - website Name.
26076func (client AppsClient) ListSnapshotsFromDRSecondary(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionPage, err error) {
26077	if tracing.IsEnabled() {
26078		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondary")
26079		defer func() {
26080			sc := -1
26081			if result.sc.Response.Response != nil {
26082				sc = result.sc.Response.Response.StatusCode
26083			}
26084			tracing.EndSpan(ctx, sc, err)
26085		}()
26086	}
26087	if err := validation.Validate([]validation.Validation{
26088		{TargetValue: resourceGroupName,
26089			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26090				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26091				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26092		return result, validation.NewError("web.AppsClient", "ListSnapshotsFromDRSecondary", err.Error())
26093	}
26094
26095	result.fn = client.listSnapshotsFromDRSecondaryNextResults
26096	req, err := client.ListSnapshotsFromDRSecondaryPreparer(ctx, resourceGroupName, name)
26097	if err != nil {
26098		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", nil, "Failure preparing request")
26099		return
26100	}
26101
26102	resp, err := client.ListSnapshotsFromDRSecondarySender(req)
26103	if err != nil {
26104		result.sc.Response = autorest.Response{Response: resp}
26105		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", resp, "Failure sending request")
26106		return
26107	}
26108
26109	result.sc, err = client.ListSnapshotsFromDRSecondaryResponder(resp)
26110	if err != nil {
26111		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondary", resp, "Failure responding to request")
26112		return
26113	}
26114	if result.sc.hasNextLink() && result.sc.IsEmpty() {
26115		err = result.NextWithContext(ctx)
26116		return
26117	}
26118
26119	return
26120}
26121
26122// ListSnapshotsFromDRSecondaryPreparer prepares the ListSnapshotsFromDRSecondary request.
26123func (client AppsClient) ListSnapshotsFromDRSecondaryPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26124	pathParameters := map[string]interface{}{
26125		"name":              autorest.Encode("path", name),
26126		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26127		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26128	}
26129
26130	const APIVersion = "2020-09-01"
26131	queryParameters := map[string]interface{}{
26132		"api-version": APIVersion,
26133	}
26134
26135	preparer := autorest.CreatePreparer(
26136		autorest.AsGet(),
26137		autorest.WithBaseURL(client.BaseURI),
26138		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr", pathParameters),
26139		autorest.WithQueryParameters(queryParameters))
26140	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26141}
26142
26143// ListSnapshotsFromDRSecondarySender sends the ListSnapshotsFromDRSecondary request. The method will close the
26144// http.Response Body if it receives an error.
26145func (client AppsClient) ListSnapshotsFromDRSecondarySender(req *http.Request) (*http.Response, error) {
26146	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26147}
26148
26149// ListSnapshotsFromDRSecondaryResponder handles the response to the ListSnapshotsFromDRSecondary request. The method always
26150// closes the http.Response Body.
26151func (client AppsClient) ListSnapshotsFromDRSecondaryResponder(resp *http.Response) (result SnapshotCollection, err error) {
26152	err = autorest.Respond(
26153		resp,
26154		azure.WithErrorUnlessStatusCode(http.StatusOK),
26155		autorest.ByUnmarshallingJSON(&result),
26156		autorest.ByClosing())
26157	result.Response = autorest.Response{Response: resp}
26158	return
26159}
26160
26161// listSnapshotsFromDRSecondaryNextResults retrieves the next set of results, if any.
26162func (client AppsClient) listSnapshotsFromDRSecondaryNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
26163	req, err := lastResults.snapshotCollectionPreparer(ctx)
26164	if err != nil {
26165		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", nil, "Failure preparing next results request")
26166	}
26167	if req == nil {
26168		return
26169	}
26170	resp, err := client.ListSnapshotsFromDRSecondarySender(req)
26171	if err != nil {
26172		result.Response = autorest.Response{Response: resp}
26173		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", resp, "Failure sending next results request")
26174	}
26175	result, err = client.ListSnapshotsFromDRSecondaryResponder(resp)
26176	if err != nil {
26177		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondaryNextResults", resp, "Failure responding to next results request")
26178	}
26179	return
26180}
26181
26182// ListSnapshotsFromDRSecondaryComplete enumerates all values, automatically crossing page boundaries as required.
26183func (client AppsClient) ListSnapshotsFromDRSecondaryComplete(ctx context.Context, resourceGroupName string, name string) (result SnapshotCollectionIterator, err error) {
26184	if tracing.IsEnabled() {
26185		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondary")
26186		defer func() {
26187			sc := -1
26188			if result.Response().Response.Response != nil {
26189				sc = result.page.Response().Response.Response.StatusCode
26190			}
26191			tracing.EndSpan(ctx, sc, err)
26192		}()
26193	}
26194	result.page, err = client.ListSnapshotsFromDRSecondary(ctx, resourceGroupName, name)
26195	return
26196}
26197
26198// ListSnapshotsFromDRSecondarySlot description for Returns all Snapshots to the user from DRSecondary endpoint.
26199// Parameters:
26200// resourceGroupName - name of the resource group to which the resource belongs.
26201// name - website Name.
26202// slot - website Slot.
26203func (client AppsClient) ListSnapshotsFromDRSecondarySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionPage, err error) {
26204	if tracing.IsEnabled() {
26205		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondarySlot")
26206		defer func() {
26207			sc := -1
26208			if result.sc.Response.Response != nil {
26209				sc = result.sc.Response.Response.StatusCode
26210			}
26211			tracing.EndSpan(ctx, sc, err)
26212		}()
26213	}
26214	if err := validation.Validate([]validation.Validation{
26215		{TargetValue: resourceGroupName,
26216			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26217				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26218				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26219		return result, validation.NewError("web.AppsClient", "ListSnapshotsFromDRSecondarySlot", err.Error())
26220	}
26221
26222	result.fn = client.listSnapshotsFromDRSecondarySlotNextResults
26223	req, err := client.ListSnapshotsFromDRSecondarySlotPreparer(ctx, resourceGroupName, name, slot)
26224	if err != nil {
26225		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", nil, "Failure preparing request")
26226		return
26227	}
26228
26229	resp, err := client.ListSnapshotsFromDRSecondarySlotSender(req)
26230	if err != nil {
26231		result.sc.Response = autorest.Response{Response: resp}
26232		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", resp, "Failure sending request")
26233		return
26234	}
26235
26236	result.sc, err = client.ListSnapshotsFromDRSecondarySlotResponder(resp)
26237	if err != nil {
26238		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsFromDRSecondarySlot", resp, "Failure responding to request")
26239		return
26240	}
26241	if result.sc.hasNextLink() && result.sc.IsEmpty() {
26242		err = result.NextWithContext(ctx)
26243		return
26244	}
26245
26246	return
26247}
26248
26249// ListSnapshotsFromDRSecondarySlotPreparer prepares the ListSnapshotsFromDRSecondarySlot request.
26250func (client AppsClient) ListSnapshotsFromDRSecondarySlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26251	pathParameters := map[string]interface{}{
26252		"name":              autorest.Encode("path", name),
26253		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26254		"slot":              autorest.Encode("path", slot),
26255		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26256	}
26257
26258	const APIVersion = "2020-09-01"
26259	queryParameters := map[string]interface{}{
26260		"api-version": APIVersion,
26261	}
26262
26263	preparer := autorest.CreatePreparer(
26264		autorest.AsGet(),
26265		autorest.WithBaseURL(client.BaseURI),
26266		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr", pathParameters),
26267		autorest.WithQueryParameters(queryParameters))
26268	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26269}
26270
26271// ListSnapshotsFromDRSecondarySlotSender sends the ListSnapshotsFromDRSecondarySlot request. The method will close the
26272// http.Response Body if it receives an error.
26273func (client AppsClient) ListSnapshotsFromDRSecondarySlotSender(req *http.Request) (*http.Response, error) {
26274	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26275}
26276
26277// ListSnapshotsFromDRSecondarySlotResponder handles the response to the ListSnapshotsFromDRSecondarySlot request. The method always
26278// closes the http.Response Body.
26279func (client AppsClient) ListSnapshotsFromDRSecondarySlotResponder(resp *http.Response) (result SnapshotCollection, err error) {
26280	err = autorest.Respond(
26281		resp,
26282		azure.WithErrorUnlessStatusCode(http.StatusOK),
26283		autorest.ByUnmarshallingJSON(&result),
26284		autorest.ByClosing())
26285	result.Response = autorest.Response{Response: resp}
26286	return
26287}
26288
26289// listSnapshotsFromDRSecondarySlotNextResults retrieves the next set of results, if any.
26290func (client AppsClient) listSnapshotsFromDRSecondarySlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
26291	req, err := lastResults.snapshotCollectionPreparer(ctx)
26292	if err != nil {
26293		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", nil, "Failure preparing next results request")
26294	}
26295	if req == nil {
26296		return
26297	}
26298	resp, err := client.ListSnapshotsFromDRSecondarySlotSender(req)
26299	if err != nil {
26300		result.Response = autorest.Response{Response: resp}
26301		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", resp, "Failure sending next results request")
26302	}
26303	result, err = client.ListSnapshotsFromDRSecondarySlotResponder(resp)
26304	if err != nil {
26305		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsFromDRSecondarySlotNextResults", resp, "Failure responding to next results request")
26306	}
26307	return
26308}
26309
26310// ListSnapshotsFromDRSecondarySlotComplete enumerates all values, automatically crossing page boundaries as required.
26311func (client AppsClient) ListSnapshotsFromDRSecondarySlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) {
26312	if tracing.IsEnabled() {
26313		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsFromDRSecondarySlot")
26314		defer func() {
26315			sc := -1
26316			if result.Response().Response.Response != nil {
26317				sc = result.page.Response().Response.Response.StatusCode
26318			}
26319			tracing.EndSpan(ctx, sc, err)
26320		}()
26321	}
26322	result.page, err = client.ListSnapshotsFromDRSecondarySlot(ctx, resourceGroupName, name, slot)
26323	return
26324}
26325
26326// ListSnapshotsSlot description for Returns all Snapshots to the user.
26327// Parameters:
26328// resourceGroupName - name of the resource group to which the resource belongs.
26329// name - website Name.
26330// slot - website Slot.
26331func (client AppsClient) ListSnapshotsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionPage, err error) {
26332	if tracing.IsEnabled() {
26333		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot")
26334		defer func() {
26335			sc := -1
26336			if result.sc.Response.Response != nil {
26337				sc = result.sc.Response.Response.StatusCode
26338			}
26339			tracing.EndSpan(ctx, sc, err)
26340		}()
26341	}
26342	if err := validation.Validate([]validation.Validation{
26343		{TargetValue: resourceGroupName,
26344			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26345				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26346				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26347		return result, validation.NewError("web.AppsClient", "ListSnapshotsSlot", err.Error())
26348	}
26349
26350	result.fn = client.listSnapshotsSlotNextResults
26351	req, err := client.ListSnapshotsSlotPreparer(ctx, resourceGroupName, name, slot)
26352	if err != nil {
26353		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", nil, "Failure preparing request")
26354		return
26355	}
26356
26357	resp, err := client.ListSnapshotsSlotSender(req)
26358	if err != nil {
26359		result.sc.Response = autorest.Response{Response: resp}
26360		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure sending request")
26361		return
26362	}
26363
26364	result.sc, err = client.ListSnapshotsSlotResponder(resp)
26365	if err != nil {
26366		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSnapshotsSlot", resp, "Failure responding to request")
26367		return
26368	}
26369	if result.sc.hasNextLink() && result.sc.IsEmpty() {
26370		err = result.NextWithContext(ctx)
26371		return
26372	}
26373
26374	return
26375}
26376
26377// ListSnapshotsSlotPreparer prepares the ListSnapshotsSlot request.
26378func (client AppsClient) ListSnapshotsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26379	pathParameters := map[string]interface{}{
26380		"name":              autorest.Encode("path", name),
26381		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26382		"slot":              autorest.Encode("path", slot),
26383		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26384	}
26385
26386	const APIVersion = "2020-09-01"
26387	queryParameters := map[string]interface{}{
26388		"api-version": APIVersion,
26389	}
26390
26391	preparer := autorest.CreatePreparer(
26392		autorest.AsGet(),
26393		autorest.WithBaseURL(client.BaseURI),
26394		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots", pathParameters),
26395		autorest.WithQueryParameters(queryParameters))
26396	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26397}
26398
26399// ListSnapshotsSlotSender sends the ListSnapshotsSlot request. The method will close the
26400// http.Response Body if it receives an error.
26401func (client AppsClient) ListSnapshotsSlotSender(req *http.Request) (*http.Response, error) {
26402	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26403}
26404
26405// ListSnapshotsSlotResponder handles the response to the ListSnapshotsSlot request. The method always
26406// closes the http.Response Body.
26407func (client AppsClient) ListSnapshotsSlotResponder(resp *http.Response) (result SnapshotCollection, err error) {
26408	err = autorest.Respond(
26409		resp,
26410		azure.WithErrorUnlessStatusCode(http.StatusOK),
26411		autorest.ByUnmarshallingJSON(&result),
26412		autorest.ByClosing())
26413	result.Response = autorest.Response{Response: resp}
26414	return
26415}
26416
26417// listSnapshotsSlotNextResults retrieves the next set of results, if any.
26418func (client AppsClient) listSnapshotsSlotNextResults(ctx context.Context, lastResults SnapshotCollection) (result SnapshotCollection, err error) {
26419	req, err := lastResults.snapshotCollectionPreparer(ctx)
26420	if err != nil {
26421		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", nil, "Failure preparing next results request")
26422	}
26423	if req == nil {
26424		return
26425	}
26426	resp, err := client.ListSnapshotsSlotSender(req)
26427	if err != nil {
26428		result.Response = autorest.Response{Response: resp}
26429		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure sending next results request")
26430	}
26431	result, err = client.ListSnapshotsSlotResponder(resp)
26432	if err != nil {
26433		err = autorest.NewErrorWithError(err, "web.AppsClient", "listSnapshotsSlotNextResults", resp, "Failure responding to next results request")
26434	}
26435	return
26436}
26437
26438// ListSnapshotsSlotComplete enumerates all values, automatically crossing page boundaries as required.
26439func (client AppsClient) ListSnapshotsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result SnapshotCollectionIterator, err error) {
26440	if tracing.IsEnabled() {
26441		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSnapshotsSlot")
26442		defer func() {
26443			sc := -1
26444			if result.Response().Response.Response != nil {
26445				sc = result.page.Response().Response.Response.StatusCode
26446			}
26447			tracing.EndSpan(ctx, sc, err)
26448		}()
26449	}
26450	result.page, err = client.ListSnapshotsSlot(ctx, resourceGroupName, name, slot)
26451	return
26452}
26453
26454// ListSyncFunctionTriggers description for This is to allow calling via powershell and ARM template.
26455// Parameters:
26456// resourceGroupName - name of the resource group to which the resource belongs.
26457// name - name of the app.
26458func (client AppsClient) ListSyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result FunctionSecrets, err error) {
26459	if tracing.IsEnabled() {
26460		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggers")
26461		defer func() {
26462			sc := -1
26463			if result.Response.Response != nil {
26464				sc = result.Response.Response.StatusCode
26465			}
26466			tracing.EndSpan(ctx, sc, err)
26467		}()
26468	}
26469	if err := validation.Validate([]validation.Validation{
26470		{TargetValue: resourceGroupName,
26471			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26472				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26473				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26474		return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggers", err.Error())
26475	}
26476
26477	req, err := client.ListSyncFunctionTriggersPreparer(ctx, resourceGroupName, name)
26478	if err != nil {
26479		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request")
26480		return
26481	}
26482
26483	resp, err := client.ListSyncFunctionTriggersSender(req)
26484	if err != nil {
26485		result.Response = autorest.Response{Response: resp}
26486		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request")
26487		return
26488	}
26489
26490	result, err = client.ListSyncFunctionTriggersResponder(resp)
26491	if err != nil {
26492		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request")
26493		return
26494	}
26495
26496	return
26497}
26498
26499// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request.
26500func (client AppsClient) ListSyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26501	pathParameters := map[string]interface{}{
26502		"name":              autorest.Encode("path", name),
26503		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26504		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26505	}
26506
26507	const APIVersion = "2020-09-01"
26508	queryParameters := map[string]interface{}{
26509		"api-version": APIVersion,
26510	}
26511
26512	preparer := autorest.CreatePreparer(
26513		autorest.AsPost(),
26514		autorest.WithBaseURL(client.BaseURI),
26515		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters),
26516		autorest.WithQueryParameters(queryParameters))
26517	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26518}
26519
26520// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the
26521// http.Response Body if it receives an error.
26522func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) {
26523	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26524}
26525
26526// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always
26527// closes the http.Response Body.
26528func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) {
26529	err = autorest.Respond(
26530		resp,
26531		azure.WithErrorUnlessStatusCode(http.StatusOK),
26532		autorest.ByUnmarshallingJSON(&result),
26533		autorest.ByClosing())
26534	result.Response = autorest.Response{Response: resp}
26535	return
26536}
26537
26538// ListSyncFunctionTriggersSlot description for This is to allow calling via powershell and ARM template.
26539// Parameters:
26540// resourceGroupName - name of the resource group to which the resource belongs.
26541// name - name of the app.
26542// slot - name of the deployment slot.
26543func (client AppsClient) ListSyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) {
26544	if tracing.IsEnabled() {
26545		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncFunctionTriggersSlot")
26546		defer func() {
26547			sc := -1
26548			if result.Response.Response != nil {
26549				sc = result.Response.Response.StatusCode
26550			}
26551			tracing.EndSpan(ctx, sc, err)
26552		}()
26553	}
26554	if err := validation.Validate([]validation.Validation{
26555		{TargetValue: resourceGroupName,
26556			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26557				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26558				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26559		return result, validation.NewError("web.AppsClient", "ListSyncFunctionTriggersSlot", err.Error())
26560	}
26561
26562	req, err := client.ListSyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot)
26563	if err != nil {
26564		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request")
26565		return
26566	}
26567
26568	resp, err := client.ListSyncFunctionTriggersSlotSender(req)
26569	if err != nil {
26570		result.Response = autorest.Response{Response: resp}
26571		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request")
26572		return
26573	}
26574
26575	result, err = client.ListSyncFunctionTriggersSlotResponder(resp)
26576	if err != nil {
26577		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request")
26578		return
26579	}
26580
26581	return
26582}
26583
26584// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request.
26585func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26586	pathParameters := map[string]interface{}{
26587		"name":              autorest.Encode("path", name),
26588		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26589		"slot":              autorest.Encode("path", slot),
26590		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26591	}
26592
26593	const APIVersion = "2020-09-01"
26594	queryParameters := map[string]interface{}{
26595		"api-version": APIVersion,
26596	}
26597
26598	preparer := autorest.CreatePreparer(
26599		autorest.AsPost(),
26600		autorest.WithBaseURL(client.BaseURI),
26601		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters),
26602		autorest.WithQueryParameters(queryParameters))
26603	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26604}
26605
26606// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the
26607// http.Response Body if it receives an error.
26608func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) {
26609	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26610}
26611
26612// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always
26613// closes the http.Response Body.
26614func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) {
26615	err = autorest.Respond(
26616		resp,
26617		azure.WithErrorUnlessStatusCode(http.StatusOK),
26618		autorest.ByUnmarshallingJSON(&result),
26619		autorest.ByClosing())
26620	result.Response = autorest.Response{Response: resp}
26621	return
26622}
26623
26624// ListSyncStatus description for This is to allow calling via powershell and ARM template.
26625// Parameters:
26626// resourceGroupName - name of the resource group to which the resource belongs.
26627// name - name of the app.
26628func (client AppsClient) ListSyncStatus(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
26629	if tracing.IsEnabled() {
26630		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatus")
26631		defer func() {
26632			sc := -1
26633			if result.Response != nil {
26634				sc = result.Response.StatusCode
26635			}
26636			tracing.EndSpan(ctx, sc, err)
26637		}()
26638	}
26639	if err := validation.Validate([]validation.Validation{
26640		{TargetValue: resourceGroupName,
26641			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26642				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26643				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26644		return result, validation.NewError("web.AppsClient", "ListSyncStatus", err.Error())
26645	}
26646
26647	req, err := client.ListSyncStatusPreparer(ctx, resourceGroupName, name)
26648	if err != nil {
26649		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", nil, "Failure preparing request")
26650		return
26651	}
26652
26653	resp, err := client.ListSyncStatusSender(req)
26654	if err != nil {
26655		result.Response = resp
26656		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure sending request")
26657		return
26658	}
26659
26660	result, err = client.ListSyncStatusResponder(resp)
26661	if err != nil {
26662		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatus", resp, "Failure responding to request")
26663		return
26664	}
26665
26666	return
26667}
26668
26669// ListSyncStatusPreparer prepares the ListSyncStatus request.
26670func (client AppsClient) ListSyncStatusPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
26671	pathParameters := map[string]interface{}{
26672		"name":              autorest.Encode("path", name),
26673		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26674		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26675	}
26676
26677	const APIVersion = "2020-09-01"
26678	queryParameters := map[string]interface{}{
26679		"api-version": APIVersion,
26680	}
26681
26682	preparer := autorest.CreatePreparer(
26683		autorest.AsPost(),
26684		autorest.WithBaseURL(client.BaseURI),
26685		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus", pathParameters),
26686		autorest.WithQueryParameters(queryParameters))
26687	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26688}
26689
26690// ListSyncStatusSender sends the ListSyncStatus request. The method will close the
26691// http.Response Body if it receives an error.
26692func (client AppsClient) ListSyncStatusSender(req *http.Request) (*http.Response, error) {
26693	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26694}
26695
26696// ListSyncStatusResponder handles the response to the ListSyncStatus request. The method always
26697// closes the http.Response Body.
26698func (client AppsClient) ListSyncStatusResponder(resp *http.Response) (result autorest.Response, err error) {
26699	err = autorest.Respond(
26700		resp,
26701		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
26702		autorest.ByClosing())
26703	result.Response = resp
26704	return
26705}
26706
26707// ListSyncStatusSlot description for This is to allow calling via powershell and ARM template.
26708// Parameters:
26709// resourceGroupName - name of the resource group to which the resource belongs.
26710// name - name of the app.
26711// slot - name of the deployment slot.
26712func (client AppsClient) ListSyncStatusSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
26713	if tracing.IsEnabled() {
26714		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListSyncStatusSlot")
26715		defer func() {
26716			sc := -1
26717			if result.Response != nil {
26718				sc = result.Response.StatusCode
26719			}
26720			tracing.EndSpan(ctx, sc, err)
26721		}()
26722	}
26723	if err := validation.Validate([]validation.Validation{
26724		{TargetValue: resourceGroupName,
26725			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26726				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26727				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26728		return result, validation.NewError("web.AppsClient", "ListSyncStatusSlot", err.Error())
26729	}
26730
26731	req, err := client.ListSyncStatusSlotPreparer(ctx, resourceGroupName, name, slot)
26732	if err != nil {
26733		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", nil, "Failure preparing request")
26734		return
26735	}
26736
26737	resp, err := client.ListSyncStatusSlotSender(req)
26738	if err != nil {
26739		result.Response = resp
26740		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure sending request")
26741		return
26742	}
26743
26744	result, err = client.ListSyncStatusSlotResponder(resp)
26745	if err != nil {
26746		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncStatusSlot", resp, "Failure responding to request")
26747		return
26748	}
26749
26750	return
26751}
26752
26753// ListSyncStatusSlotPreparer prepares the ListSyncStatusSlot request.
26754func (client AppsClient) ListSyncStatusSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
26755	pathParameters := map[string]interface{}{
26756		"name":              autorest.Encode("path", name),
26757		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26758		"slot":              autorest.Encode("path", slot),
26759		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26760	}
26761
26762	const APIVersion = "2020-09-01"
26763	queryParameters := map[string]interface{}{
26764		"api-version": APIVersion,
26765	}
26766
26767	preparer := autorest.CreatePreparer(
26768		autorest.AsPost(),
26769		autorest.WithBaseURL(client.BaseURI),
26770		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus", pathParameters),
26771		autorest.WithQueryParameters(queryParameters))
26772	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26773}
26774
26775// ListSyncStatusSlotSender sends the ListSyncStatusSlot request. The method will close the
26776// http.Response Body if it receives an error.
26777func (client AppsClient) ListSyncStatusSlotSender(req *http.Request) (*http.Response, error) {
26778	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26779}
26780
26781// ListSyncStatusSlotResponder handles the response to the ListSyncStatusSlot request. The method always
26782// closes the http.Response Body.
26783func (client AppsClient) ListSyncStatusSlotResponder(resp *http.Response) (result autorest.Response, err error) {
26784	err = autorest.Respond(
26785		resp,
26786		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
26787		autorest.ByClosing())
26788	result.Response = resp
26789	return
26790}
26791
26792// ListTriggeredWebJobHistory description for List a triggered web job's history for an app, or a deployment slot.
26793// Parameters:
26794// resourceGroupName - name of the resource group to which the resource belongs.
26795// name - site name.
26796// webJobName - name of Web Job.
26797func (client AppsClient) ListTriggeredWebJobHistory(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredJobHistoryCollectionPage, err error) {
26798	if tracing.IsEnabled() {
26799		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistory")
26800		defer func() {
26801			sc := -1
26802			if result.tjhc.Response.Response != nil {
26803				sc = result.tjhc.Response.Response.StatusCode
26804			}
26805			tracing.EndSpan(ctx, sc, err)
26806		}()
26807	}
26808	if err := validation.Validate([]validation.Validation{
26809		{TargetValue: resourceGroupName,
26810			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26811				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26812				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26813		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobHistory", err.Error())
26814	}
26815
26816	result.fn = client.listTriggeredWebJobHistoryNextResults
26817	req, err := client.ListTriggeredWebJobHistoryPreparer(ctx, resourceGroupName, name, webJobName)
26818	if err != nil {
26819		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", nil, "Failure preparing request")
26820		return
26821	}
26822
26823	resp, err := client.ListTriggeredWebJobHistorySender(req)
26824	if err != nil {
26825		result.tjhc.Response = autorest.Response{Response: resp}
26826		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure sending request")
26827		return
26828	}
26829
26830	result.tjhc, err = client.ListTriggeredWebJobHistoryResponder(resp)
26831	if err != nil {
26832		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure responding to request")
26833		return
26834	}
26835	if result.tjhc.hasNextLink() && result.tjhc.IsEmpty() {
26836		err = result.NextWithContext(ctx)
26837		return
26838	}
26839
26840	return
26841}
26842
26843// ListTriggeredWebJobHistoryPreparer prepares the ListTriggeredWebJobHistory request.
26844func (client AppsClient) ListTriggeredWebJobHistoryPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
26845	pathParameters := map[string]interface{}{
26846		"name":              autorest.Encode("path", name),
26847		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26848		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26849		"webJobName":        autorest.Encode("path", webJobName),
26850	}
26851
26852	const APIVersion = "2020-09-01"
26853	queryParameters := map[string]interface{}{
26854		"api-version": APIVersion,
26855	}
26856
26857	preparer := autorest.CreatePreparer(
26858		autorest.AsGet(),
26859		autorest.WithBaseURL(client.BaseURI),
26860		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history", pathParameters),
26861		autorest.WithQueryParameters(queryParameters))
26862	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26863}
26864
26865// ListTriggeredWebJobHistorySender sends the ListTriggeredWebJobHistory request. The method will close the
26866// http.Response Body if it receives an error.
26867func (client AppsClient) ListTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) {
26868	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26869}
26870
26871// ListTriggeredWebJobHistoryResponder handles the response to the ListTriggeredWebJobHistory request. The method always
26872// closes the http.Response Body.
26873func (client AppsClient) ListTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) {
26874	err = autorest.Respond(
26875		resp,
26876		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
26877		autorest.ByUnmarshallingJSON(&result),
26878		autorest.ByClosing())
26879	result.Response = autorest.Response{Response: resp}
26880	return
26881}
26882
26883// listTriggeredWebJobHistoryNextResults retrieves the next set of results, if any.
26884func (client AppsClient) listTriggeredWebJobHistoryNextResults(ctx context.Context, lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) {
26885	req, err := lastResults.triggeredJobHistoryCollectionPreparer(ctx)
26886	if err != nil {
26887		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", nil, "Failure preparing next results request")
26888	}
26889	if req == nil {
26890		return
26891	}
26892	resp, err := client.ListTriggeredWebJobHistorySender(req)
26893	if err != nil {
26894		result.Response = autorest.Response{Response: resp}
26895		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", resp, "Failure sending next results request")
26896	}
26897	result, err = client.ListTriggeredWebJobHistoryResponder(resp)
26898	if err != nil {
26899		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistoryNextResults", resp, "Failure responding to next results request")
26900	}
26901	return
26902}
26903
26904// ListTriggeredWebJobHistoryComplete enumerates all values, automatically crossing page boundaries as required.
26905func (client AppsClient) ListTriggeredWebJobHistoryComplete(ctx context.Context, resourceGroupName string, name string, webJobName string) (result TriggeredJobHistoryCollectionIterator, err error) {
26906	if tracing.IsEnabled() {
26907		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistory")
26908		defer func() {
26909			sc := -1
26910			if result.Response().Response.Response != nil {
26911				sc = result.page.Response().Response.Response.StatusCode
26912			}
26913			tracing.EndSpan(ctx, sc, err)
26914		}()
26915	}
26916	result.page, err = client.ListTriggeredWebJobHistory(ctx, resourceGroupName, name, webJobName)
26917	return
26918}
26919
26920// ListTriggeredWebJobHistorySlot description for List a triggered web job's history for an app, or a deployment slot.
26921// Parameters:
26922// resourceGroupName - name of the resource group to which the resource belongs.
26923// name - site name.
26924// webJobName - name of Web Job.
26925// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
26926func (client AppsClient) ListTriggeredWebJobHistorySlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredJobHistoryCollectionPage, err error) {
26927	if tracing.IsEnabled() {
26928		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistorySlot")
26929		defer func() {
26930			sc := -1
26931			if result.tjhc.Response.Response != nil {
26932				sc = result.tjhc.Response.Response.StatusCode
26933			}
26934			tracing.EndSpan(ctx, sc, err)
26935		}()
26936	}
26937	if err := validation.Validate([]validation.Validation{
26938		{TargetValue: resourceGroupName,
26939			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
26940				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
26941				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
26942		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobHistorySlot", err.Error())
26943	}
26944
26945	result.fn = client.listTriggeredWebJobHistorySlotNextResults
26946	req, err := client.ListTriggeredWebJobHistorySlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
26947	if err != nil {
26948		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", nil, "Failure preparing request")
26949		return
26950	}
26951
26952	resp, err := client.ListTriggeredWebJobHistorySlotSender(req)
26953	if err != nil {
26954		result.tjhc.Response = autorest.Response{Response: resp}
26955		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure sending request")
26956		return
26957	}
26958
26959	result.tjhc, err = client.ListTriggeredWebJobHistorySlotResponder(resp)
26960	if err != nil {
26961		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure responding to request")
26962		return
26963	}
26964	if result.tjhc.hasNextLink() && result.tjhc.IsEmpty() {
26965		err = result.NextWithContext(ctx)
26966		return
26967	}
26968
26969	return
26970}
26971
26972// ListTriggeredWebJobHistorySlotPreparer prepares the ListTriggeredWebJobHistorySlot request.
26973func (client AppsClient) ListTriggeredWebJobHistorySlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
26974	pathParameters := map[string]interface{}{
26975		"name":              autorest.Encode("path", name),
26976		"resourceGroupName": autorest.Encode("path", resourceGroupName),
26977		"slot":              autorest.Encode("path", slot),
26978		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
26979		"webJobName":        autorest.Encode("path", webJobName),
26980	}
26981
26982	const APIVersion = "2020-09-01"
26983	queryParameters := map[string]interface{}{
26984		"api-version": APIVersion,
26985	}
26986
26987	preparer := autorest.CreatePreparer(
26988		autorest.AsGet(),
26989		autorest.WithBaseURL(client.BaseURI),
26990		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history", pathParameters),
26991		autorest.WithQueryParameters(queryParameters))
26992	return preparer.Prepare((&http.Request{}).WithContext(ctx))
26993}
26994
26995// ListTriggeredWebJobHistorySlotSender sends the ListTriggeredWebJobHistorySlot request. The method will close the
26996// http.Response Body if it receives an error.
26997func (client AppsClient) ListTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) {
26998	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
26999}
27000
27001// ListTriggeredWebJobHistorySlotResponder handles the response to the ListTriggeredWebJobHistorySlot request. The method always
27002// closes the http.Response Body.
27003func (client AppsClient) ListTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) {
27004	err = autorest.Respond(
27005		resp,
27006		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
27007		autorest.ByUnmarshallingJSON(&result),
27008		autorest.ByClosing())
27009	result.Response = autorest.Response{Response: resp}
27010	return
27011}
27012
27013// listTriggeredWebJobHistorySlotNextResults retrieves the next set of results, if any.
27014func (client AppsClient) listTriggeredWebJobHistorySlotNextResults(ctx context.Context, lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) {
27015	req, err := lastResults.triggeredJobHistoryCollectionPreparer(ctx)
27016	if err != nil {
27017		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", nil, "Failure preparing next results request")
27018	}
27019	if req == nil {
27020		return
27021	}
27022	resp, err := client.ListTriggeredWebJobHistorySlotSender(req)
27023	if err != nil {
27024		result.Response = autorest.Response{Response: resp}
27025		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", resp, "Failure sending next results request")
27026	}
27027	result, err = client.ListTriggeredWebJobHistorySlotResponder(resp)
27028	if err != nil {
27029		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobHistorySlotNextResults", resp, "Failure responding to next results request")
27030	}
27031	return
27032}
27033
27034// ListTriggeredWebJobHistorySlotComplete enumerates all values, automatically crossing page boundaries as required.
27035func (client AppsClient) ListTriggeredWebJobHistorySlotComplete(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result TriggeredJobHistoryCollectionIterator, err error) {
27036	if tracing.IsEnabled() {
27037		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobHistorySlot")
27038		defer func() {
27039			sc := -1
27040			if result.Response().Response.Response != nil {
27041				sc = result.page.Response().Response.Response.StatusCode
27042			}
27043			tracing.EndSpan(ctx, sc, err)
27044		}()
27045	}
27046	result.page, err = client.ListTriggeredWebJobHistorySlot(ctx, resourceGroupName, name, webJobName, slot)
27047	return
27048}
27049
27050// ListTriggeredWebJobs description for List triggered web jobs for an app, or a deployment slot.
27051// Parameters:
27052// resourceGroupName - name of the resource group to which the resource belongs.
27053// name - site name.
27054func (client AppsClient) ListTriggeredWebJobs(ctx context.Context, resourceGroupName string, name string) (result TriggeredWebJobCollectionPage, err error) {
27055	if tracing.IsEnabled() {
27056		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobs")
27057		defer func() {
27058			sc := -1
27059			if result.twjc.Response.Response != nil {
27060				sc = result.twjc.Response.Response.StatusCode
27061			}
27062			tracing.EndSpan(ctx, sc, err)
27063		}()
27064	}
27065	if err := validation.Validate([]validation.Validation{
27066		{TargetValue: resourceGroupName,
27067			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27068				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27069				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27070		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobs", err.Error())
27071	}
27072
27073	result.fn = client.listTriggeredWebJobsNextResults
27074	req, err := client.ListTriggeredWebJobsPreparer(ctx, resourceGroupName, name)
27075	if err != nil {
27076		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", nil, "Failure preparing request")
27077		return
27078	}
27079
27080	resp, err := client.ListTriggeredWebJobsSender(req)
27081	if err != nil {
27082		result.twjc.Response = autorest.Response{Response: resp}
27083		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure sending request")
27084		return
27085	}
27086
27087	result.twjc, err = client.ListTriggeredWebJobsResponder(resp)
27088	if err != nil {
27089		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure responding to request")
27090		return
27091	}
27092	if result.twjc.hasNextLink() && result.twjc.IsEmpty() {
27093		err = result.NextWithContext(ctx)
27094		return
27095	}
27096
27097	return
27098}
27099
27100// ListTriggeredWebJobsPreparer prepares the ListTriggeredWebJobs request.
27101func (client AppsClient) ListTriggeredWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27102	pathParameters := map[string]interface{}{
27103		"name":              autorest.Encode("path", name),
27104		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27105		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27106	}
27107
27108	const APIVersion = "2020-09-01"
27109	queryParameters := map[string]interface{}{
27110		"api-version": APIVersion,
27111	}
27112
27113	preparer := autorest.CreatePreparer(
27114		autorest.AsGet(),
27115		autorest.WithBaseURL(client.BaseURI),
27116		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs", pathParameters),
27117		autorest.WithQueryParameters(queryParameters))
27118	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27119}
27120
27121// ListTriggeredWebJobsSender sends the ListTriggeredWebJobs request. The method will close the
27122// http.Response Body if it receives an error.
27123func (client AppsClient) ListTriggeredWebJobsSender(req *http.Request) (*http.Response, error) {
27124	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27125}
27126
27127// ListTriggeredWebJobsResponder handles the response to the ListTriggeredWebJobs request. The method always
27128// closes the http.Response Body.
27129func (client AppsClient) ListTriggeredWebJobsResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) {
27130	err = autorest.Respond(
27131		resp,
27132		azure.WithErrorUnlessStatusCode(http.StatusOK),
27133		autorest.ByUnmarshallingJSON(&result),
27134		autorest.ByClosing())
27135	result.Response = autorest.Response{Response: resp}
27136	return
27137}
27138
27139// listTriggeredWebJobsNextResults retrieves the next set of results, if any.
27140func (client AppsClient) listTriggeredWebJobsNextResults(ctx context.Context, lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) {
27141	req, err := lastResults.triggeredWebJobCollectionPreparer(ctx)
27142	if err != nil {
27143		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", nil, "Failure preparing next results request")
27144	}
27145	if req == nil {
27146		return
27147	}
27148	resp, err := client.ListTriggeredWebJobsSender(req)
27149	if err != nil {
27150		result.Response = autorest.Response{Response: resp}
27151		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", resp, "Failure sending next results request")
27152	}
27153	result, err = client.ListTriggeredWebJobsResponder(resp)
27154	if err != nil {
27155		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsNextResults", resp, "Failure responding to next results request")
27156	}
27157	return
27158}
27159
27160// ListTriggeredWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
27161func (client AppsClient) ListTriggeredWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result TriggeredWebJobCollectionIterator, err error) {
27162	if tracing.IsEnabled() {
27163		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobs")
27164		defer func() {
27165			sc := -1
27166			if result.Response().Response.Response != nil {
27167				sc = result.page.Response().Response.Response.StatusCode
27168			}
27169			tracing.EndSpan(ctx, sc, err)
27170		}()
27171	}
27172	result.page, err = client.ListTriggeredWebJobs(ctx, resourceGroupName, name)
27173	return
27174}
27175
27176// ListTriggeredWebJobsSlot description for List triggered web jobs for an app, or a deployment slot.
27177// Parameters:
27178// resourceGroupName - name of the resource group to which the resource belongs.
27179// name - site name.
27180// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
27181// production slot.
27182func (client AppsClient) ListTriggeredWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result TriggeredWebJobCollectionPage, err error) {
27183	if tracing.IsEnabled() {
27184		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobsSlot")
27185		defer func() {
27186			sc := -1
27187			if result.twjc.Response.Response != nil {
27188				sc = result.twjc.Response.Response.StatusCode
27189			}
27190			tracing.EndSpan(ctx, sc, err)
27191		}()
27192	}
27193	if err := validation.Validate([]validation.Validation{
27194		{TargetValue: resourceGroupName,
27195			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27196				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27197				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27198		return result, validation.NewError("web.AppsClient", "ListTriggeredWebJobsSlot", err.Error())
27199	}
27200
27201	result.fn = client.listTriggeredWebJobsSlotNextResults
27202	req, err := client.ListTriggeredWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
27203	if err != nil {
27204		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", nil, "Failure preparing request")
27205		return
27206	}
27207
27208	resp, err := client.ListTriggeredWebJobsSlotSender(req)
27209	if err != nil {
27210		result.twjc.Response = autorest.Response{Response: resp}
27211		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure sending request")
27212		return
27213	}
27214
27215	result.twjc, err = client.ListTriggeredWebJobsSlotResponder(resp)
27216	if err != nil {
27217		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure responding to request")
27218		return
27219	}
27220	if result.twjc.hasNextLink() && result.twjc.IsEmpty() {
27221		err = result.NextWithContext(ctx)
27222		return
27223	}
27224
27225	return
27226}
27227
27228// ListTriggeredWebJobsSlotPreparer prepares the ListTriggeredWebJobsSlot request.
27229func (client AppsClient) ListTriggeredWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27230	pathParameters := map[string]interface{}{
27231		"name":              autorest.Encode("path", name),
27232		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27233		"slot":              autorest.Encode("path", slot),
27234		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27235	}
27236
27237	const APIVersion = "2020-09-01"
27238	queryParameters := map[string]interface{}{
27239		"api-version": APIVersion,
27240	}
27241
27242	preparer := autorest.CreatePreparer(
27243		autorest.AsGet(),
27244		autorest.WithBaseURL(client.BaseURI),
27245		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs", pathParameters),
27246		autorest.WithQueryParameters(queryParameters))
27247	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27248}
27249
27250// ListTriggeredWebJobsSlotSender sends the ListTriggeredWebJobsSlot request. The method will close the
27251// http.Response Body if it receives an error.
27252func (client AppsClient) ListTriggeredWebJobsSlotSender(req *http.Request) (*http.Response, error) {
27253	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27254}
27255
27256// ListTriggeredWebJobsSlotResponder handles the response to the ListTriggeredWebJobsSlot request. The method always
27257// closes the http.Response Body.
27258func (client AppsClient) ListTriggeredWebJobsSlotResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) {
27259	err = autorest.Respond(
27260		resp,
27261		azure.WithErrorUnlessStatusCode(http.StatusOK),
27262		autorest.ByUnmarshallingJSON(&result),
27263		autorest.ByClosing())
27264	result.Response = autorest.Response{Response: resp}
27265	return
27266}
27267
27268// listTriggeredWebJobsSlotNextResults retrieves the next set of results, if any.
27269func (client AppsClient) listTriggeredWebJobsSlotNextResults(ctx context.Context, lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) {
27270	req, err := lastResults.triggeredWebJobCollectionPreparer(ctx)
27271	if err != nil {
27272		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", nil, "Failure preparing next results request")
27273	}
27274	if req == nil {
27275		return
27276	}
27277	resp, err := client.ListTriggeredWebJobsSlotSender(req)
27278	if err != nil {
27279		result.Response = autorest.Response{Response: resp}
27280		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", resp, "Failure sending next results request")
27281	}
27282	result, err = client.ListTriggeredWebJobsSlotResponder(resp)
27283	if err != nil {
27284		err = autorest.NewErrorWithError(err, "web.AppsClient", "listTriggeredWebJobsSlotNextResults", resp, "Failure responding to next results request")
27285	}
27286	return
27287}
27288
27289// ListTriggeredWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
27290func (client AppsClient) ListTriggeredWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result TriggeredWebJobCollectionIterator, err error) {
27291	if tracing.IsEnabled() {
27292		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListTriggeredWebJobsSlot")
27293		defer func() {
27294			sc := -1
27295			if result.Response().Response.Response != nil {
27296				sc = result.page.Response().Response.Response.StatusCode
27297			}
27298			tracing.EndSpan(ctx, sc, err)
27299		}()
27300	}
27301	result.page, err = client.ListTriggeredWebJobsSlot(ctx, resourceGroupName, name, slot)
27302	return
27303}
27304
27305// ListUsages description for Gets the quota usage information of an app (or deployment slot, if specified).
27306// Parameters:
27307// resourceGroupName - name of the resource group to which the resource belongs.
27308// name - name of the app.
27309// filter - return only information specified in the filter (using OData syntax). For example:
27310// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and
27311// endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
27312func (client AppsClient) ListUsages(ctx context.Context, resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollectionPage, err error) {
27313	if tracing.IsEnabled() {
27314		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsages")
27315		defer func() {
27316			sc := -1
27317			if result.cuqc.Response.Response != nil {
27318				sc = result.cuqc.Response.Response.StatusCode
27319			}
27320			tracing.EndSpan(ctx, sc, err)
27321		}()
27322	}
27323	if err := validation.Validate([]validation.Validation{
27324		{TargetValue: resourceGroupName,
27325			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27326				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27327				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27328		return result, validation.NewError("web.AppsClient", "ListUsages", err.Error())
27329	}
27330
27331	result.fn = client.listUsagesNextResults
27332	req, err := client.ListUsagesPreparer(ctx, resourceGroupName, name, filter)
27333	if err != nil {
27334		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", nil, "Failure preparing request")
27335		return
27336	}
27337
27338	resp, err := client.ListUsagesSender(req)
27339	if err != nil {
27340		result.cuqc.Response = autorest.Response{Response: resp}
27341		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", resp, "Failure sending request")
27342		return
27343	}
27344
27345	result.cuqc, err = client.ListUsagesResponder(resp)
27346	if err != nil {
27347		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsages", resp, "Failure responding to request")
27348		return
27349	}
27350	if result.cuqc.hasNextLink() && result.cuqc.IsEmpty() {
27351		err = result.NextWithContext(ctx)
27352		return
27353	}
27354
27355	return
27356}
27357
27358// ListUsagesPreparer prepares the ListUsages request.
27359func (client AppsClient) ListUsagesPreparer(ctx context.Context, resourceGroupName string, name string, filter string) (*http.Request, error) {
27360	pathParameters := map[string]interface{}{
27361		"name":              autorest.Encode("path", name),
27362		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27363		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27364	}
27365
27366	const APIVersion = "2020-09-01"
27367	queryParameters := map[string]interface{}{
27368		"api-version": APIVersion,
27369	}
27370	if len(filter) > 0 {
27371		queryParameters["$filter"] = filter
27372	}
27373
27374	preparer := autorest.CreatePreparer(
27375		autorest.AsGet(),
27376		autorest.WithBaseURL(client.BaseURI),
27377		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages", pathParameters),
27378		autorest.WithQueryParameters(queryParameters))
27379	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27380}
27381
27382// ListUsagesSender sends the ListUsages request. The method will close the
27383// http.Response Body if it receives an error.
27384func (client AppsClient) ListUsagesSender(req *http.Request) (*http.Response, error) {
27385	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27386}
27387
27388// ListUsagesResponder handles the response to the ListUsages request. The method always
27389// closes the http.Response Body.
27390func (client AppsClient) ListUsagesResponder(resp *http.Response) (result CsmUsageQuotaCollection, err error) {
27391	err = autorest.Respond(
27392		resp,
27393		azure.WithErrorUnlessStatusCode(http.StatusOK),
27394		autorest.ByUnmarshallingJSON(&result),
27395		autorest.ByClosing())
27396	result.Response = autorest.Response{Response: resp}
27397	return
27398}
27399
27400// listUsagesNextResults retrieves the next set of results, if any.
27401func (client AppsClient) listUsagesNextResults(ctx context.Context, lastResults CsmUsageQuotaCollection) (result CsmUsageQuotaCollection, err error) {
27402	req, err := lastResults.csmUsageQuotaCollectionPreparer(ctx)
27403	if err != nil {
27404		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", nil, "Failure preparing next results request")
27405	}
27406	if req == nil {
27407		return
27408	}
27409	resp, err := client.ListUsagesSender(req)
27410	if err != nil {
27411		result.Response = autorest.Response{Response: resp}
27412		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", resp, "Failure sending next results request")
27413	}
27414	result, err = client.ListUsagesResponder(resp)
27415	if err != nil {
27416		err = autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesNextResults", resp, "Failure responding to next results request")
27417	}
27418	return
27419}
27420
27421// ListUsagesComplete enumerates all values, automatically crossing page boundaries as required.
27422func (client AppsClient) ListUsagesComplete(ctx context.Context, resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollectionIterator, err error) {
27423	if tracing.IsEnabled() {
27424		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsages")
27425		defer func() {
27426			sc := -1
27427			if result.Response().Response.Response != nil {
27428				sc = result.page.Response().Response.Response.StatusCode
27429			}
27430			tracing.EndSpan(ctx, sc, err)
27431		}()
27432	}
27433	result.page, err = client.ListUsages(ctx, resourceGroupName, name, filter)
27434	return
27435}
27436
27437// ListUsagesSlot description for Gets the quota usage information of an app (or deployment slot, if specified).
27438// Parameters:
27439// resourceGroupName - name of the resource group to which the resource belongs.
27440// name - name of the app.
27441// slot - name of the deployment slot. If a slot is not specified, the API will get quota information of the
27442// production slot.
27443// filter - return only information specified in the filter (using OData syntax). For example:
27444// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and
27445// endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'.
27446func (client AppsClient) ListUsagesSlot(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollectionPage, err error) {
27447	if tracing.IsEnabled() {
27448		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsagesSlot")
27449		defer func() {
27450			sc := -1
27451			if result.cuqc.Response.Response != nil {
27452				sc = result.cuqc.Response.Response.StatusCode
27453			}
27454			tracing.EndSpan(ctx, sc, err)
27455		}()
27456	}
27457	if err := validation.Validate([]validation.Validation{
27458		{TargetValue: resourceGroupName,
27459			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27460				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27461				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27462		return result, validation.NewError("web.AppsClient", "ListUsagesSlot", err.Error())
27463	}
27464
27465	result.fn = client.listUsagesSlotNextResults
27466	req, err := client.ListUsagesSlotPreparer(ctx, resourceGroupName, name, slot, filter)
27467	if err != nil {
27468		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", nil, "Failure preparing request")
27469		return
27470	}
27471
27472	resp, err := client.ListUsagesSlotSender(req)
27473	if err != nil {
27474		result.cuqc.Response = autorest.Response{Response: resp}
27475		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", resp, "Failure sending request")
27476		return
27477	}
27478
27479	result.cuqc, err = client.ListUsagesSlotResponder(resp)
27480	if err != nil {
27481		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListUsagesSlot", resp, "Failure responding to request")
27482		return
27483	}
27484	if result.cuqc.hasNextLink() && result.cuqc.IsEmpty() {
27485		err = result.NextWithContext(ctx)
27486		return
27487	}
27488
27489	return
27490}
27491
27492// ListUsagesSlotPreparer prepares the ListUsagesSlot request.
27493func (client AppsClient) ListUsagesSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (*http.Request, error) {
27494	pathParameters := map[string]interface{}{
27495		"name":              autorest.Encode("path", name),
27496		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27497		"slot":              autorest.Encode("path", slot),
27498		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27499	}
27500
27501	const APIVersion = "2020-09-01"
27502	queryParameters := map[string]interface{}{
27503		"api-version": APIVersion,
27504	}
27505	if len(filter) > 0 {
27506		queryParameters["$filter"] = filter
27507	}
27508
27509	preparer := autorest.CreatePreparer(
27510		autorest.AsGet(),
27511		autorest.WithBaseURL(client.BaseURI),
27512		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages", pathParameters),
27513		autorest.WithQueryParameters(queryParameters))
27514	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27515}
27516
27517// ListUsagesSlotSender sends the ListUsagesSlot request. The method will close the
27518// http.Response Body if it receives an error.
27519func (client AppsClient) ListUsagesSlotSender(req *http.Request) (*http.Response, error) {
27520	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27521}
27522
27523// ListUsagesSlotResponder handles the response to the ListUsagesSlot request. The method always
27524// closes the http.Response Body.
27525func (client AppsClient) ListUsagesSlotResponder(resp *http.Response) (result CsmUsageQuotaCollection, err error) {
27526	err = autorest.Respond(
27527		resp,
27528		azure.WithErrorUnlessStatusCode(http.StatusOK),
27529		autorest.ByUnmarshallingJSON(&result),
27530		autorest.ByClosing())
27531	result.Response = autorest.Response{Response: resp}
27532	return
27533}
27534
27535// listUsagesSlotNextResults retrieves the next set of results, if any.
27536func (client AppsClient) listUsagesSlotNextResults(ctx context.Context, lastResults CsmUsageQuotaCollection) (result CsmUsageQuotaCollection, err error) {
27537	req, err := lastResults.csmUsageQuotaCollectionPreparer(ctx)
27538	if err != nil {
27539		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", nil, "Failure preparing next results request")
27540	}
27541	if req == nil {
27542		return
27543	}
27544	resp, err := client.ListUsagesSlotSender(req)
27545	if err != nil {
27546		result.Response = autorest.Response{Response: resp}
27547		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", resp, "Failure sending next results request")
27548	}
27549	result, err = client.ListUsagesSlotResponder(resp)
27550	if err != nil {
27551		err = autorest.NewErrorWithError(err, "web.AppsClient", "listUsagesSlotNextResults", resp, "Failure responding to next results request")
27552	}
27553	return
27554}
27555
27556// ListUsagesSlotComplete enumerates all values, automatically crossing page boundaries as required.
27557func (client AppsClient) ListUsagesSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollectionIterator, err error) {
27558	if tracing.IsEnabled() {
27559		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListUsagesSlot")
27560		defer func() {
27561			sc := -1
27562			if result.Response().Response.Response != nil {
27563				sc = result.page.Response().Response.Response.StatusCode
27564			}
27565			tracing.EndSpan(ctx, sc, err)
27566		}()
27567	}
27568	result.page, err = client.ListUsagesSlot(ctx, resourceGroupName, name, slot, filter)
27569	return
27570}
27571
27572// ListVnetConnections description for Gets the virtual networks the app (or deployment slot) is connected to.
27573// Parameters:
27574// resourceGroupName - name of the resource group to which the resource belongs.
27575// name - name of the app.
27576func (client AppsClient) ListVnetConnections(ctx context.Context, resourceGroupName string, name string) (result ListVnetInfo, err error) {
27577	if tracing.IsEnabled() {
27578		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListVnetConnections")
27579		defer func() {
27580			sc := -1
27581			if result.Response.Response != nil {
27582				sc = result.Response.Response.StatusCode
27583			}
27584			tracing.EndSpan(ctx, sc, err)
27585		}()
27586	}
27587	if err := validation.Validate([]validation.Validation{
27588		{TargetValue: resourceGroupName,
27589			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27590				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27591				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27592		return result, validation.NewError("web.AppsClient", "ListVnetConnections", err.Error())
27593	}
27594
27595	req, err := client.ListVnetConnectionsPreparer(ctx, resourceGroupName, name)
27596	if err != nil {
27597		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", nil, "Failure preparing request")
27598		return
27599	}
27600
27601	resp, err := client.ListVnetConnectionsSender(req)
27602	if err != nil {
27603		result.Response = autorest.Response{Response: resp}
27604		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", resp, "Failure sending request")
27605		return
27606	}
27607
27608	result, err = client.ListVnetConnectionsResponder(resp)
27609	if err != nil {
27610		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnections", resp, "Failure responding to request")
27611		return
27612	}
27613
27614	return
27615}
27616
27617// ListVnetConnectionsPreparer prepares the ListVnetConnections request.
27618func (client AppsClient) ListVnetConnectionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27619	pathParameters := map[string]interface{}{
27620		"name":              autorest.Encode("path", name),
27621		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27622		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27623	}
27624
27625	const APIVersion = "2020-09-01"
27626	queryParameters := map[string]interface{}{
27627		"api-version": APIVersion,
27628	}
27629
27630	preparer := autorest.CreatePreparer(
27631		autorest.AsGet(),
27632		autorest.WithBaseURL(client.BaseURI),
27633		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections", pathParameters),
27634		autorest.WithQueryParameters(queryParameters))
27635	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27636}
27637
27638// ListVnetConnectionsSender sends the ListVnetConnections request. The method will close the
27639// http.Response Body if it receives an error.
27640func (client AppsClient) ListVnetConnectionsSender(req *http.Request) (*http.Response, error) {
27641	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27642}
27643
27644// ListVnetConnectionsResponder handles the response to the ListVnetConnections request. The method always
27645// closes the http.Response Body.
27646func (client AppsClient) ListVnetConnectionsResponder(resp *http.Response) (result ListVnetInfo, err error) {
27647	err = autorest.Respond(
27648		resp,
27649		azure.WithErrorUnlessStatusCode(http.StatusOK),
27650		autorest.ByUnmarshallingJSON(&result.Value),
27651		autorest.ByClosing())
27652	result.Response = autorest.Response{Response: resp}
27653	return
27654}
27655
27656// ListVnetConnectionsSlot description for Gets the virtual networks the app (or deployment slot) is connected to.
27657// Parameters:
27658// resourceGroupName - name of the resource group to which the resource belongs.
27659// name - name of the app.
27660// slot - name of the deployment slot. If a slot is not specified, the API will get virtual network connections
27661// for the production slot.
27662func (client AppsClient) ListVnetConnectionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result ListVnetInfo, err error) {
27663	if tracing.IsEnabled() {
27664		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListVnetConnectionsSlot")
27665		defer func() {
27666			sc := -1
27667			if result.Response.Response != nil {
27668				sc = result.Response.Response.StatusCode
27669			}
27670			tracing.EndSpan(ctx, sc, err)
27671		}()
27672	}
27673	if err := validation.Validate([]validation.Validation{
27674		{TargetValue: resourceGroupName,
27675			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27676				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27677				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27678		return result, validation.NewError("web.AppsClient", "ListVnetConnectionsSlot", err.Error())
27679	}
27680
27681	req, err := client.ListVnetConnectionsSlotPreparer(ctx, resourceGroupName, name, slot)
27682	if err != nil {
27683		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", nil, "Failure preparing request")
27684		return
27685	}
27686
27687	resp, err := client.ListVnetConnectionsSlotSender(req)
27688	if err != nil {
27689		result.Response = autorest.Response{Response: resp}
27690		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", resp, "Failure sending request")
27691		return
27692	}
27693
27694	result, err = client.ListVnetConnectionsSlotResponder(resp)
27695	if err != nil {
27696		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListVnetConnectionsSlot", resp, "Failure responding to request")
27697		return
27698	}
27699
27700	return
27701}
27702
27703// ListVnetConnectionsSlotPreparer prepares the ListVnetConnectionsSlot request.
27704func (client AppsClient) ListVnetConnectionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27705	pathParameters := map[string]interface{}{
27706		"name":              autorest.Encode("path", name),
27707		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27708		"slot":              autorest.Encode("path", slot),
27709		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27710	}
27711
27712	const APIVersion = "2020-09-01"
27713	queryParameters := map[string]interface{}{
27714		"api-version": APIVersion,
27715	}
27716
27717	preparer := autorest.CreatePreparer(
27718		autorest.AsGet(),
27719		autorest.WithBaseURL(client.BaseURI),
27720		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections", pathParameters),
27721		autorest.WithQueryParameters(queryParameters))
27722	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27723}
27724
27725// ListVnetConnectionsSlotSender sends the ListVnetConnectionsSlot request. The method will close the
27726// http.Response Body if it receives an error.
27727func (client AppsClient) ListVnetConnectionsSlotSender(req *http.Request) (*http.Response, error) {
27728	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27729}
27730
27731// ListVnetConnectionsSlotResponder handles the response to the ListVnetConnectionsSlot request. The method always
27732// closes the http.Response Body.
27733func (client AppsClient) ListVnetConnectionsSlotResponder(resp *http.Response) (result ListVnetInfo, err error) {
27734	err = autorest.Respond(
27735		resp,
27736		azure.WithErrorUnlessStatusCode(http.StatusOK),
27737		autorest.ByUnmarshallingJSON(&result.Value),
27738		autorest.ByClosing())
27739	result.Response = autorest.Response{Response: resp}
27740	return
27741}
27742
27743// ListWebJobs description for List webjobs for an app, or a deployment slot.
27744// Parameters:
27745// resourceGroupName - name of the resource group to which the resource belongs.
27746// name - site name.
27747func (client AppsClient) ListWebJobs(ctx context.Context, resourceGroupName string, name string) (result JobCollectionPage, err error) {
27748	if tracing.IsEnabled() {
27749		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobs")
27750		defer func() {
27751			sc := -1
27752			if result.jc.Response.Response != nil {
27753				sc = result.jc.Response.Response.StatusCode
27754			}
27755			tracing.EndSpan(ctx, sc, err)
27756		}()
27757	}
27758	if err := validation.Validate([]validation.Validation{
27759		{TargetValue: resourceGroupName,
27760			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27761				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27762				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27763		return result, validation.NewError("web.AppsClient", "ListWebJobs", err.Error())
27764	}
27765
27766	result.fn = client.listWebJobsNextResults
27767	req, err := client.ListWebJobsPreparer(ctx, resourceGroupName, name)
27768	if err != nil {
27769		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", nil, "Failure preparing request")
27770		return
27771	}
27772
27773	resp, err := client.ListWebJobsSender(req)
27774	if err != nil {
27775		result.jc.Response = autorest.Response{Response: resp}
27776		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure sending request")
27777		return
27778	}
27779
27780	result.jc, err = client.ListWebJobsResponder(resp)
27781	if err != nil {
27782		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure responding to request")
27783		return
27784	}
27785	if result.jc.hasNextLink() && result.jc.IsEmpty() {
27786		err = result.NextWithContext(ctx)
27787		return
27788	}
27789
27790	return
27791}
27792
27793// ListWebJobsPreparer prepares the ListWebJobs request.
27794func (client AppsClient) ListWebJobsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
27795	pathParameters := map[string]interface{}{
27796		"name":              autorest.Encode("path", name),
27797		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27798		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27799	}
27800
27801	const APIVersion = "2020-09-01"
27802	queryParameters := map[string]interface{}{
27803		"api-version": APIVersion,
27804	}
27805
27806	preparer := autorest.CreatePreparer(
27807		autorest.AsGet(),
27808		autorest.WithBaseURL(client.BaseURI),
27809		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs", pathParameters),
27810		autorest.WithQueryParameters(queryParameters))
27811	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27812}
27813
27814// ListWebJobsSender sends the ListWebJobs request. The method will close the
27815// http.Response Body if it receives an error.
27816func (client AppsClient) ListWebJobsSender(req *http.Request) (*http.Response, error) {
27817	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27818}
27819
27820// ListWebJobsResponder handles the response to the ListWebJobs request. The method always
27821// closes the http.Response Body.
27822func (client AppsClient) ListWebJobsResponder(resp *http.Response) (result JobCollection, err error) {
27823	err = autorest.Respond(
27824		resp,
27825		azure.WithErrorUnlessStatusCode(http.StatusOK),
27826		autorest.ByUnmarshallingJSON(&result),
27827		autorest.ByClosing())
27828	result.Response = autorest.Response{Response: resp}
27829	return
27830}
27831
27832// listWebJobsNextResults retrieves the next set of results, if any.
27833func (client AppsClient) listWebJobsNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) {
27834	req, err := lastResults.jobCollectionPreparer(ctx)
27835	if err != nil {
27836		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", nil, "Failure preparing next results request")
27837	}
27838	if req == nil {
27839		return
27840	}
27841	resp, err := client.ListWebJobsSender(req)
27842	if err != nil {
27843		result.Response = autorest.Response{Response: resp}
27844		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", resp, "Failure sending next results request")
27845	}
27846	result, err = client.ListWebJobsResponder(resp)
27847	if err != nil {
27848		err = autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsNextResults", resp, "Failure responding to next results request")
27849	}
27850	return
27851}
27852
27853// ListWebJobsComplete enumerates all values, automatically crossing page boundaries as required.
27854func (client AppsClient) ListWebJobsComplete(ctx context.Context, resourceGroupName string, name string) (result JobCollectionIterator, err error) {
27855	if tracing.IsEnabled() {
27856		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobs")
27857		defer func() {
27858			sc := -1
27859			if result.Response().Response.Response != nil {
27860				sc = result.page.Response().Response.Response.StatusCode
27861			}
27862			tracing.EndSpan(ctx, sc, err)
27863		}()
27864	}
27865	result.page, err = client.ListWebJobs(ctx, resourceGroupName, name)
27866	return
27867}
27868
27869// ListWebJobsSlot description for List webjobs for an app, or a deployment slot.
27870// Parameters:
27871// resourceGroupName - name of the resource group to which the resource belongs.
27872// name - site name.
27873// slot - name of the deployment slot. If a slot is not specified, the API returns deployments for the
27874// production slot.
27875func (client AppsClient) ListWebJobsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result JobCollectionPage, err error) {
27876	if tracing.IsEnabled() {
27877		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobsSlot")
27878		defer func() {
27879			sc := -1
27880			if result.jc.Response.Response != nil {
27881				sc = result.jc.Response.Response.StatusCode
27882			}
27883			tracing.EndSpan(ctx, sc, err)
27884		}()
27885	}
27886	if err := validation.Validate([]validation.Validation{
27887		{TargetValue: resourceGroupName,
27888			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
27889				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
27890				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
27891		return result, validation.NewError("web.AppsClient", "ListWebJobsSlot", err.Error())
27892	}
27893
27894	result.fn = client.listWebJobsSlotNextResults
27895	req, err := client.ListWebJobsSlotPreparer(ctx, resourceGroupName, name, slot)
27896	if err != nil {
27897		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", nil, "Failure preparing request")
27898		return
27899	}
27900
27901	resp, err := client.ListWebJobsSlotSender(req)
27902	if err != nil {
27903		result.jc.Response = autorest.Response{Response: resp}
27904		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure sending request")
27905		return
27906	}
27907
27908	result.jc, err = client.ListWebJobsSlotResponder(resp)
27909	if err != nil {
27910		err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure responding to request")
27911		return
27912	}
27913	if result.jc.hasNextLink() && result.jc.IsEmpty() {
27914		err = result.NextWithContext(ctx)
27915		return
27916	}
27917
27918	return
27919}
27920
27921// ListWebJobsSlotPreparer prepares the ListWebJobsSlot request.
27922func (client AppsClient) ListWebJobsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
27923	pathParameters := map[string]interface{}{
27924		"name":              autorest.Encode("path", name),
27925		"resourceGroupName": autorest.Encode("path", resourceGroupName),
27926		"slot":              autorest.Encode("path", slot),
27927		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
27928	}
27929
27930	const APIVersion = "2020-09-01"
27931	queryParameters := map[string]interface{}{
27932		"api-version": APIVersion,
27933	}
27934
27935	preparer := autorest.CreatePreparer(
27936		autorest.AsGet(),
27937		autorest.WithBaseURL(client.BaseURI),
27938		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs", pathParameters),
27939		autorest.WithQueryParameters(queryParameters))
27940	return preparer.Prepare((&http.Request{}).WithContext(ctx))
27941}
27942
27943// ListWebJobsSlotSender sends the ListWebJobsSlot request. The method will close the
27944// http.Response Body if it receives an error.
27945func (client AppsClient) ListWebJobsSlotSender(req *http.Request) (*http.Response, error) {
27946	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
27947}
27948
27949// ListWebJobsSlotResponder handles the response to the ListWebJobsSlot request. The method always
27950// closes the http.Response Body.
27951func (client AppsClient) ListWebJobsSlotResponder(resp *http.Response) (result JobCollection, err error) {
27952	err = autorest.Respond(
27953		resp,
27954		azure.WithErrorUnlessStatusCode(http.StatusOK),
27955		autorest.ByUnmarshallingJSON(&result),
27956		autorest.ByClosing())
27957	result.Response = autorest.Response{Response: resp}
27958	return
27959}
27960
27961// listWebJobsSlotNextResults retrieves the next set of results, if any.
27962func (client AppsClient) listWebJobsSlotNextResults(ctx context.Context, lastResults JobCollection) (result JobCollection, err error) {
27963	req, err := lastResults.jobCollectionPreparer(ctx)
27964	if err != nil {
27965		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", nil, "Failure preparing next results request")
27966	}
27967	if req == nil {
27968		return
27969	}
27970	resp, err := client.ListWebJobsSlotSender(req)
27971	if err != nil {
27972		result.Response = autorest.Response{Response: resp}
27973		return result, autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", resp, "Failure sending next results request")
27974	}
27975	result, err = client.ListWebJobsSlotResponder(resp)
27976	if err != nil {
27977		err = autorest.NewErrorWithError(err, "web.AppsClient", "listWebJobsSlotNextResults", resp, "Failure responding to next results request")
27978	}
27979	return
27980}
27981
27982// ListWebJobsSlotComplete enumerates all values, automatically crossing page boundaries as required.
27983func (client AppsClient) ListWebJobsSlotComplete(ctx context.Context, resourceGroupName string, name string, slot string) (result JobCollectionIterator, err error) {
27984	if tracing.IsEnabled() {
27985		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ListWebJobsSlot")
27986		defer func() {
27987			sc := -1
27988			if result.Response().Response.Response != nil {
27989				sc = result.page.Response().Response.Response.StatusCode
27990			}
27991			tracing.EndSpan(ctx, sc, err)
27992		}()
27993	}
27994	result.page, err = client.ListWebJobsSlot(ctx, resourceGroupName, name, slot)
27995	return
27996}
27997
27998// MigrateMySQL description for Migrates a local (in-app) MySql database to a remote MySql database.
27999// Parameters:
28000// resourceGroupName - name of the resource group to which the resource belongs.
28001// name - name of web app.
28002// migrationRequestEnvelope - mySql migration options.
28003func (client AppsClient) MigrateMySQL(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest) (result AppsMigrateMySQLFuture, err error) {
28004	if tracing.IsEnabled() {
28005		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.MigrateMySQL")
28006		defer func() {
28007			sc := -1
28008			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28009				sc = result.FutureAPI.Response().StatusCode
28010			}
28011			tracing.EndSpan(ctx, sc, err)
28012		}()
28013	}
28014	if err := validation.Validate([]validation.Validation{
28015		{TargetValue: resourceGroupName,
28016			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28017				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28018				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28019		{TargetValue: migrationRequestEnvelope,
28020			Constraints: []validation.Constraint{{Target: "migrationRequestEnvelope.MigrateMySQLRequestProperties", Name: validation.Null, Rule: false,
28021				Chain: []validation.Constraint{{Target: "migrationRequestEnvelope.MigrateMySQLRequestProperties.ConnectionString", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
28022		return result, validation.NewError("web.AppsClient", "MigrateMySQL", err.Error())
28023	}
28024
28025	req, err := client.MigrateMySQLPreparer(ctx, resourceGroupName, name, migrationRequestEnvelope)
28026	if err != nil {
28027		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateMySQL", nil, "Failure preparing request")
28028		return
28029	}
28030
28031	result, err = client.MigrateMySQLSender(req)
28032	if err != nil {
28033		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateMySQL", nil, "Failure sending request")
28034		return
28035	}
28036
28037	return
28038}
28039
28040// MigrateMySQLPreparer prepares the MigrateMySQL request.
28041func (client AppsClient) MigrateMySQLPreparer(ctx context.Context, resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest) (*http.Request, error) {
28042	pathParameters := map[string]interface{}{
28043		"name":              autorest.Encode("path", name),
28044		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28045		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28046	}
28047
28048	const APIVersion = "2020-09-01"
28049	queryParameters := map[string]interface{}{
28050		"api-version": APIVersion,
28051	}
28052
28053	preparer := autorest.CreatePreparer(
28054		autorest.AsContentType("application/json; charset=utf-8"),
28055		autorest.AsPost(),
28056		autorest.WithBaseURL(client.BaseURI),
28057		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql", pathParameters),
28058		autorest.WithJSON(migrationRequestEnvelope),
28059		autorest.WithQueryParameters(queryParameters))
28060	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28061}
28062
28063// MigrateMySQLSender sends the MigrateMySQL request. The method will close the
28064// http.Response Body if it receives an error.
28065func (client AppsClient) MigrateMySQLSender(req *http.Request) (future AppsMigrateMySQLFuture, err error) {
28066	var resp *http.Response
28067	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28068	if err != nil {
28069		return
28070	}
28071	var azf azure.Future
28072	azf, err = azure.NewFutureFromResponse(resp)
28073	future.FutureAPI = &azf
28074	future.Result = func(client AppsClient) (o Operation, err error) {
28075		var done bool
28076		done, err = future.DoneWithContext(context.Background(), client)
28077		if err != nil {
28078			err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", future.Response(), "Polling failure")
28079			return
28080		}
28081		if !done {
28082			err = azure.NewAsyncOpIncompleteError("web.AppsMigrateMySQLFuture")
28083			return
28084		}
28085		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28086		o.Response.Response, err = future.GetResult(sender)
28087		if o.Response.Response == nil && err == nil {
28088			err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", nil, "received nil response and error")
28089		}
28090		if err == nil && o.Response.Response.StatusCode != http.StatusNoContent {
28091			o, err = client.MigrateMySQLResponder(o.Response.Response)
28092			if err != nil {
28093				err = autorest.NewErrorWithError(err, "web.AppsMigrateMySQLFuture", "Result", o.Response.Response, "Failure responding to request")
28094			}
28095		}
28096		return
28097	}
28098	return
28099}
28100
28101// MigrateMySQLResponder handles the response to the MigrateMySQL request. The method always
28102// closes the http.Response Body.
28103func (client AppsClient) MigrateMySQLResponder(resp *http.Response) (result Operation, err error) {
28104	err = autorest.Respond(
28105		resp,
28106		azure.WithErrorUnlessStatusCode(http.StatusOK),
28107		autorest.ByUnmarshallingJSON(&result),
28108		autorest.ByClosing())
28109	result.Response = autorest.Response{Response: resp}
28110	return
28111}
28112
28113// MigrateStorage description for Restores a web app.
28114// Parameters:
28115// subscriptionName - azure subscription.
28116// resourceGroupName - name of the resource group to which the resource belongs.
28117// name - name of web app.
28118// migrationOptions - migration migrationOptions.
28119func (client AppsClient) MigrateStorage(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions) (result AppsMigrateStorageFuture, err error) {
28120	if tracing.IsEnabled() {
28121		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.MigrateStorage")
28122		defer func() {
28123			sc := -1
28124			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28125				sc = result.FutureAPI.Response().StatusCode
28126			}
28127			tracing.EndSpan(ctx, sc, err)
28128		}()
28129	}
28130	if err := validation.Validate([]validation.Validation{
28131		{TargetValue: resourceGroupName,
28132			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28133				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28134				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28135		{TargetValue: migrationOptions,
28136			Constraints: []validation.Constraint{{Target: "migrationOptions.StorageMigrationOptionsProperties", Name: validation.Null, Rule: false,
28137				Chain: []validation.Constraint{{Target: "migrationOptions.StorageMigrationOptionsProperties.AzurefilesConnectionString", Name: validation.Null, Rule: true, Chain: nil},
28138					{Target: "migrationOptions.StorageMigrationOptionsProperties.AzurefilesShare", Name: validation.Null, Rule: true, Chain: nil},
28139				}}}}}); err != nil {
28140		return result, validation.NewError("web.AppsClient", "MigrateStorage", err.Error())
28141	}
28142
28143	req, err := client.MigrateStoragePreparer(ctx, subscriptionName, resourceGroupName, name, migrationOptions)
28144	if err != nil {
28145		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateStorage", nil, "Failure preparing request")
28146		return
28147	}
28148
28149	result, err = client.MigrateStorageSender(req)
28150	if err != nil {
28151		err = autorest.NewErrorWithError(err, "web.AppsClient", "MigrateStorage", nil, "Failure sending request")
28152		return
28153	}
28154
28155	return
28156}
28157
28158// MigrateStoragePreparer prepares the MigrateStorage request.
28159func (client AppsClient) MigrateStoragePreparer(ctx context.Context, subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions) (*http.Request, error) {
28160	pathParameters := map[string]interface{}{
28161		"name":              autorest.Encode("path", name),
28162		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28163		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28164	}
28165
28166	const APIVersion = "2020-09-01"
28167	queryParameters := map[string]interface{}{
28168		"api-version":      APIVersion,
28169		"subscriptionName": autorest.Encode("query", subscriptionName),
28170	}
28171
28172	preparer := autorest.CreatePreparer(
28173		autorest.AsContentType("application/json; charset=utf-8"),
28174		autorest.AsPut(),
28175		autorest.WithBaseURL(client.BaseURI),
28176		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate", pathParameters),
28177		autorest.WithJSON(migrationOptions),
28178		autorest.WithQueryParameters(queryParameters))
28179	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28180}
28181
28182// MigrateStorageSender sends the MigrateStorage request. The method will close the
28183// http.Response Body if it receives an error.
28184func (client AppsClient) MigrateStorageSender(req *http.Request) (future AppsMigrateStorageFuture, err error) {
28185	var resp *http.Response
28186	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
28187	if err != nil {
28188		return
28189	}
28190	var azf azure.Future
28191	azf, err = azure.NewFutureFromResponse(resp)
28192	future.FutureAPI = &azf
28193	future.Result = func(client AppsClient) (smr StorageMigrationResponse, err error) {
28194		var done bool
28195		done, err = future.DoneWithContext(context.Background(), client)
28196		if err != nil {
28197			err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", future.Response(), "Polling failure")
28198			return
28199		}
28200		if !done {
28201			err = azure.NewAsyncOpIncompleteError("web.AppsMigrateStorageFuture")
28202			return
28203		}
28204		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
28205		smr.Response.Response, err = future.GetResult(sender)
28206		if smr.Response.Response == nil && err == nil {
28207			err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", nil, "received nil response and error")
28208		}
28209		if err == nil && smr.Response.Response.StatusCode != http.StatusNoContent {
28210			smr, err = client.MigrateStorageResponder(smr.Response.Response)
28211			if err != nil {
28212				err = autorest.NewErrorWithError(err, "web.AppsMigrateStorageFuture", "Result", smr.Response.Response, "Failure responding to request")
28213			}
28214		}
28215		return
28216	}
28217	return
28218}
28219
28220// MigrateStorageResponder handles the response to the MigrateStorage request. The method always
28221// closes the http.Response Body.
28222func (client AppsClient) MigrateStorageResponder(resp *http.Response) (result StorageMigrationResponse, err error) {
28223	err = autorest.Respond(
28224		resp,
28225		azure.WithErrorUnlessStatusCode(http.StatusOK),
28226		autorest.ByUnmarshallingJSON(&result),
28227		autorest.ByClosing())
28228	result.Response = autorest.Response{Response: resp}
28229	return
28230}
28231
28232// PutPrivateAccessVnet description for Sets data around private site access enablement and authorized Virtual Networks
28233// that can access the site.
28234// Parameters:
28235// resourceGroupName - name of the resource group to which the resource belongs.
28236// name - the name of the web app.
28237// access - the information for the private access
28238func (client AppsClient) PutPrivateAccessVnet(ctx context.Context, resourceGroupName string, name string, access PrivateAccess) (result PrivateAccess, err error) {
28239	if tracing.IsEnabled() {
28240		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PutPrivateAccessVnet")
28241		defer func() {
28242			sc := -1
28243			if result.Response.Response != nil {
28244				sc = result.Response.Response.StatusCode
28245			}
28246			tracing.EndSpan(ctx, sc, err)
28247		}()
28248	}
28249	if err := validation.Validate([]validation.Validation{
28250		{TargetValue: resourceGroupName,
28251			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28252				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28253				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28254		return result, validation.NewError("web.AppsClient", "PutPrivateAccessVnet", err.Error())
28255	}
28256
28257	req, err := client.PutPrivateAccessVnetPreparer(ctx, resourceGroupName, name, access)
28258	if err != nil {
28259		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", nil, "Failure preparing request")
28260		return
28261	}
28262
28263	resp, err := client.PutPrivateAccessVnetSender(req)
28264	if err != nil {
28265		result.Response = autorest.Response{Response: resp}
28266		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", resp, "Failure sending request")
28267		return
28268	}
28269
28270	result, err = client.PutPrivateAccessVnetResponder(resp)
28271	if err != nil {
28272		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnet", resp, "Failure responding to request")
28273		return
28274	}
28275
28276	return
28277}
28278
28279// PutPrivateAccessVnetPreparer prepares the PutPrivateAccessVnet request.
28280func (client AppsClient) PutPrivateAccessVnetPreparer(ctx context.Context, resourceGroupName string, name string, access PrivateAccess) (*http.Request, error) {
28281	pathParameters := map[string]interface{}{
28282		"name":              autorest.Encode("path", name),
28283		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28284		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28285	}
28286
28287	const APIVersion = "2020-09-01"
28288	queryParameters := map[string]interface{}{
28289		"api-version": APIVersion,
28290	}
28291
28292	preparer := autorest.CreatePreparer(
28293		autorest.AsContentType("application/json; charset=utf-8"),
28294		autorest.AsPut(),
28295		autorest.WithBaseURL(client.BaseURI),
28296		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks", pathParameters),
28297		autorest.WithJSON(access),
28298		autorest.WithQueryParameters(queryParameters))
28299	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28300}
28301
28302// PutPrivateAccessVnetSender sends the PutPrivateAccessVnet request. The method will close the
28303// http.Response Body if it receives an error.
28304func (client AppsClient) PutPrivateAccessVnetSender(req *http.Request) (*http.Response, error) {
28305	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28306}
28307
28308// PutPrivateAccessVnetResponder handles the response to the PutPrivateAccessVnet request. The method always
28309// closes the http.Response Body.
28310func (client AppsClient) PutPrivateAccessVnetResponder(resp *http.Response) (result PrivateAccess, err error) {
28311	err = autorest.Respond(
28312		resp,
28313		azure.WithErrorUnlessStatusCode(http.StatusOK),
28314		autorest.ByUnmarshallingJSON(&result),
28315		autorest.ByClosing())
28316	result.Response = autorest.Response{Response: resp}
28317	return
28318}
28319
28320// PutPrivateAccessVnetSlot description for Sets data around private site access enablement and authorized Virtual
28321// Networks that can access the site.
28322// Parameters:
28323// resourceGroupName - name of the resource group to which the resource belongs.
28324// name - the name of the web app.
28325// access - the information for the private access
28326// slot - the name of the slot for the web app.
28327func (client AppsClient) PutPrivateAccessVnetSlot(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, slot string) (result PrivateAccess, err error) {
28328	if tracing.IsEnabled() {
28329		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.PutPrivateAccessVnetSlot")
28330		defer func() {
28331			sc := -1
28332			if result.Response.Response != nil {
28333				sc = result.Response.Response.StatusCode
28334			}
28335			tracing.EndSpan(ctx, sc, err)
28336		}()
28337	}
28338	if err := validation.Validate([]validation.Validation{
28339		{TargetValue: resourceGroupName,
28340			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28341				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28342				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28343		return result, validation.NewError("web.AppsClient", "PutPrivateAccessVnetSlot", err.Error())
28344	}
28345
28346	req, err := client.PutPrivateAccessVnetSlotPreparer(ctx, resourceGroupName, name, access, slot)
28347	if err != nil {
28348		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", nil, "Failure preparing request")
28349		return
28350	}
28351
28352	resp, err := client.PutPrivateAccessVnetSlotSender(req)
28353	if err != nil {
28354		result.Response = autorest.Response{Response: resp}
28355		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", resp, "Failure sending request")
28356		return
28357	}
28358
28359	result, err = client.PutPrivateAccessVnetSlotResponder(resp)
28360	if err != nil {
28361		err = autorest.NewErrorWithError(err, "web.AppsClient", "PutPrivateAccessVnetSlot", resp, "Failure responding to request")
28362		return
28363	}
28364
28365	return
28366}
28367
28368// PutPrivateAccessVnetSlotPreparer prepares the PutPrivateAccessVnetSlot request.
28369func (client AppsClient) PutPrivateAccessVnetSlotPreparer(ctx context.Context, resourceGroupName string, name string, access PrivateAccess, slot string) (*http.Request, error) {
28370	pathParameters := map[string]interface{}{
28371		"name":              autorest.Encode("path", name),
28372		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28373		"slot":              autorest.Encode("path", slot),
28374		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28375	}
28376
28377	const APIVersion = "2020-09-01"
28378	queryParameters := map[string]interface{}{
28379		"api-version": APIVersion,
28380	}
28381
28382	preparer := autorest.CreatePreparer(
28383		autorest.AsContentType("application/json; charset=utf-8"),
28384		autorest.AsPut(),
28385		autorest.WithBaseURL(client.BaseURI),
28386		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks", pathParameters),
28387		autorest.WithJSON(access),
28388		autorest.WithQueryParameters(queryParameters))
28389	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28390}
28391
28392// PutPrivateAccessVnetSlotSender sends the PutPrivateAccessVnetSlot request. The method will close the
28393// http.Response Body if it receives an error.
28394func (client AppsClient) PutPrivateAccessVnetSlotSender(req *http.Request) (*http.Response, error) {
28395	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28396}
28397
28398// PutPrivateAccessVnetSlotResponder handles the response to the PutPrivateAccessVnetSlot request. The method always
28399// closes the http.Response Body.
28400func (client AppsClient) PutPrivateAccessVnetSlotResponder(resp *http.Response) (result PrivateAccess, err error) {
28401	err = autorest.Respond(
28402		resp,
28403		azure.WithErrorUnlessStatusCode(http.StatusOK),
28404		autorest.ByUnmarshallingJSON(&result),
28405		autorest.ByClosing())
28406	result.Response = autorest.Response{Response: resp}
28407	return
28408}
28409
28410// RecoverSiteConfigurationSnapshot description for Reverts the configuration of an app to a previous snapshot.
28411// Parameters:
28412// resourceGroupName - name of the resource group to which the resource belongs.
28413// name - name of the app.
28414// snapshotID - the ID of the snapshot to read.
28415func (client AppsClient) RecoverSiteConfigurationSnapshot(ctx context.Context, resourceGroupName string, name string, snapshotID string) (result autorest.Response, err error) {
28416	if tracing.IsEnabled() {
28417		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RecoverSiteConfigurationSnapshot")
28418		defer func() {
28419			sc := -1
28420			if result.Response != nil {
28421				sc = result.Response.StatusCode
28422			}
28423			tracing.EndSpan(ctx, sc, err)
28424		}()
28425	}
28426	if err := validation.Validate([]validation.Validation{
28427		{TargetValue: resourceGroupName,
28428			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28429				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28430				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28431		return result, validation.NewError("web.AppsClient", "RecoverSiteConfigurationSnapshot", err.Error())
28432	}
28433
28434	req, err := client.RecoverSiteConfigurationSnapshotPreparer(ctx, resourceGroupName, name, snapshotID)
28435	if err != nil {
28436		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", nil, "Failure preparing request")
28437		return
28438	}
28439
28440	resp, err := client.RecoverSiteConfigurationSnapshotSender(req)
28441	if err != nil {
28442		result.Response = resp
28443		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", resp, "Failure sending request")
28444		return
28445	}
28446
28447	result, err = client.RecoverSiteConfigurationSnapshotResponder(resp)
28448	if err != nil {
28449		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshot", resp, "Failure responding to request")
28450		return
28451	}
28452
28453	return
28454}
28455
28456// RecoverSiteConfigurationSnapshotPreparer prepares the RecoverSiteConfigurationSnapshot request.
28457func (client AppsClient) RecoverSiteConfigurationSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string) (*http.Request, error) {
28458	pathParameters := map[string]interface{}{
28459		"name":              autorest.Encode("path", name),
28460		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28461		"snapshotId":        autorest.Encode("path", snapshotID),
28462		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28463	}
28464
28465	const APIVersion = "2020-09-01"
28466	queryParameters := map[string]interface{}{
28467		"api-version": APIVersion,
28468	}
28469
28470	preparer := autorest.CreatePreparer(
28471		autorest.AsPost(),
28472		autorest.WithBaseURL(client.BaseURI),
28473		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover", pathParameters),
28474		autorest.WithQueryParameters(queryParameters))
28475	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28476}
28477
28478// RecoverSiteConfigurationSnapshotSender sends the RecoverSiteConfigurationSnapshot request. The method will close the
28479// http.Response Body if it receives an error.
28480func (client AppsClient) RecoverSiteConfigurationSnapshotSender(req *http.Request) (*http.Response, error) {
28481	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28482}
28483
28484// RecoverSiteConfigurationSnapshotResponder handles the response to the RecoverSiteConfigurationSnapshot request. The method always
28485// closes the http.Response Body.
28486func (client AppsClient) RecoverSiteConfigurationSnapshotResponder(resp *http.Response) (result autorest.Response, err error) {
28487	err = autorest.Respond(
28488		resp,
28489		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
28490		autorest.ByClosing())
28491	result.Response = resp
28492	return
28493}
28494
28495// RecoverSiteConfigurationSnapshotSlot description for Reverts the configuration of an app to a previous snapshot.
28496// Parameters:
28497// resourceGroupName - name of the resource group to which the resource belongs.
28498// name - name of the app.
28499// snapshotID - the ID of the snapshot to read.
28500// slot - name of the deployment slot. If a slot is not specified, the API will return configuration for the
28501// production slot.
28502func (client AppsClient) RecoverSiteConfigurationSnapshotSlot(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (result autorest.Response, err error) {
28503	if tracing.IsEnabled() {
28504		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RecoverSiteConfigurationSnapshotSlot")
28505		defer func() {
28506			sc := -1
28507			if result.Response != nil {
28508				sc = result.Response.StatusCode
28509			}
28510			tracing.EndSpan(ctx, sc, err)
28511		}()
28512	}
28513	if err := validation.Validate([]validation.Validation{
28514		{TargetValue: resourceGroupName,
28515			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28516				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28517				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28518		return result, validation.NewError("web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", err.Error())
28519	}
28520
28521	req, err := client.RecoverSiteConfigurationSnapshotSlotPreparer(ctx, resourceGroupName, name, snapshotID, slot)
28522	if err != nil {
28523		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", nil, "Failure preparing request")
28524		return
28525	}
28526
28527	resp, err := client.RecoverSiteConfigurationSnapshotSlotSender(req)
28528	if err != nil {
28529		result.Response = resp
28530		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", resp, "Failure sending request")
28531		return
28532	}
28533
28534	result, err = client.RecoverSiteConfigurationSnapshotSlotResponder(resp)
28535	if err != nil {
28536		err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSiteConfigurationSnapshotSlot", resp, "Failure responding to request")
28537		return
28538	}
28539
28540	return
28541}
28542
28543// RecoverSiteConfigurationSnapshotSlotPreparer prepares the RecoverSiteConfigurationSnapshotSlot request.
28544func (client AppsClient) RecoverSiteConfigurationSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, snapshotID string, slot string) (*http.Request, error) {
28545	pathParameters := map[string]interface{}{
28546		"name":              autorest.Encode("path", name),
28547		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28548		"slot":              autorest.Encode("path", slot),
28549		"snapshotId":        autorest.Encode("path", snapshotID),
28550		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28551	}
28552
28553	const APIVersion = "2020-09-01"
28554	queryParameters := map[string]interface{}{
28555		"api-version": APIVersion,
28556	}
28557
28558	preparer := autorest.CreatePreparer(
28559		autorest.AsPost(),
28560		autorest.WithBaseURL(client.BaseURI),
28561		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover", pathParameters),
28562		autorest.WithQueryParameters(queryParameters))
28563	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28564}
28565
28566// RecoverSiteConfigurationSnapshotSlotSender sends the RecoverSiteConfigurationSnapshotSlot request. The method will close the
28567// http.Response Body if it receives an error.
28568func (client AppsClient) RecoverSiteConfigurationSnapshotSlotSender(req *http.Request) (*http.Response, error) {
28569	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28570}
28571
28572// RecoverSiteConfigurationSnapshotSlotResponder handles the response to the RecoverSiteConfigurationSnapshotSlot request. The method always
28573// closes the http.Response Body.
28574func (client AppsClient) RecoverSiteConfigurationSnapshotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28575	err = autorest.Respond(
28576		resp,
28577		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
28578		autorest.ByClosing())
28579	result.Response = resp
28580	return
28581}
28582
28583// ResetProductionSlotConfig description for Resets the configuration settings of the current slot if they were
28584// previously modified by calling the API with POST.
28585// Parameters:
28586// resourceGroupName - name of the resource group to which the resource belongs.
28587// name - name of the app.
28588func (client AppsClient) ResetProductionSlotConfig(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
28589	if tracing.IsEnabled() {
28590		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ResetProductionSlotConfig")
28591		defer func() {
28592			sc := -1
28593			if result.Response != nil {
28594				sc = result.Response.StatusCode
28595			}
28596			tracing.EndSpan(ctx, sc, err)
28597		}()
28598	}
28599	if err := validation.Validate([]validation.Validation{
28600		{TargetValue: resourceGroupName,
28601			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28602				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28603				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28604		return result, validation.NewError("web.AppsClient", "ResetProductionSlotConfig", err.Error())
28605	}
28606
28607	req, err := client.ResetProductionSlotConfigPreparer(ctx, resourceGroupName, name)
28608	if err != nil {
28609		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", nil, "Failure preparing request")
28610		return
28611	}
28612
28613	resp, err := client.ResetProductionSlotConfigSender(req)
28614	if err != nil {
28615		result.Response = resp
28616		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", resp, "Failure sending request")
28617		return
28618	}
28619
28620	result, err = client.ResetProductionSlotConfigResponder(resp)
28621	if err != nil {
28622		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetProductionSlotConfig", resp, "Failure responding to request")
28623		return
28624	}
28625
28626	return
28627}
28628
28629// ResetProductionSlotConfigPreparer prepares the ResetProductionSlotConfig request.
28630func (client AppsClient) ResetProductionSlotConfigPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
28631	pathParameters := map[string]interface{}{
28632		"name":              autorest.Encode("path", name),
28633		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28634		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28635	}
28636
28637	const APIVersion = "2020-09-01"
28638	queryParameters := map[string]interface{}{
28639		"api-version": APIVersion,
28640	}
28641
28642	preparer := autorest.CreatePreparer(
28643		autorest.AsPost(),
28644		autorest.WithBaseURL(client.BaseURI),
28645		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig", pathParameters),
28646		autorest.WithQueryParameters(queryParameters))
28647	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28648}
28649
28650// ResetProductionSlotConfigSender sends the ResetProductionSlotConfig request. The method will close the
28651// http.Response Body if it receives an error.
28652func (client AppsClient) ResetProductionSlotConfigSender(req *http.Request) (*http.Response, error) {
28653	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28654}
28655
28656// ResetProductionSlotConfigResponder handles the response to the ResetProductionSlotConfig request. The method always
28657// closes the http.Response Body.
28658func (client AppsClient) ResetProductionSlotConfigResponder(resp *http.Response) (result autorest.Response, err error) {
28659	err = autorest.Respond(
28660		resp,
28661		azure.WithErrorUnlessStatusCode(http.StatusOK),
28662		autorest.ByClosing())
28663	result.Response = resp
28664	return
28665}
28666
28667// ResetSlotConfigurationSlot description for Resets the configuration settings of the current slot if they were
28668// previously modified by calling the API with POST.
28669// Parameters:
28670// resourceGroupName - name of the resource group to which the resource belongs.
28671// name - name of the app.
28672// slot - name of the deployment slot. If a slot is not specified, the API resets configuration settings for
28673// the production slot.
28674func (client AppsClient) ResetSlotConfigurationSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
28675	if tracing.IsEnabled() {
28676		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.ResetSlotConfigurationSlot")
28677		defer func() {
28678			sc := -1
28679			if result.Response != nil {
28680				sc = result.Response.StatusCode
28681			}
28682			tracing.EndSpan(ctx, sc, err)
28683		}()
28684	}
28685	if err := validation.Validate([]validation.Validation{
28686		{TargetValue: resourceGroupName,
28687			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28688				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28689				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28690		return result, validation.NewError("web.AppsClient", "ResetSlotConfigurationSlot", err.Error())
28691	}
28692
28693	req, err := client.ResetSlotConfigurationSlotPreparer(ctx, resourceGroupName, name, slot)
28694	if err != nil {
28695		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", nil, "Failure preparing request")
28696		return
28697	}
28698
28699	resp, err := client.ResetSlotConfigurationSlotSender(req)
28700	if err != nil {
28701		result.Response = resp
28702		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", resp, "Failure sending request")
28703		return
28704	}
28705
28706	result, err = client.ResetSlotConfigurationSlotResponder(resp)
28707	if err != nil {
28708		err = autorest.NewErrorWithError(err, "web.AppsClient", "ResetSlotConfigurationSlot", resp, "Failure responding to request")
28709		return
28710	}
28711
28712	return
28713}
28714
28715// ResetSlotConfigurationSlotPreparer prepares the ResetSlotConfigurationSlot request.
28716func (client AppsClient) ResetSlotConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
28717	pathParameters := map[string]interface{}{
28718		"name":              autorest.Encode("path", name),
28719		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28720		"slot":              autorest.Encode("path", slot),
28721		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28722	}
28723
28724	const APIVersion = "2020-09-01"
28725	queryParameters := map[string]interface{}{
28726		"api-version": APIVersion,
28727	}
28728
28729	preparer := autorest.CreatePreparer(
28730		autorest.AsPost(),
28731		autorest.WithBaseURL(client.BaseURI),
28732		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig", pathParameters),
28733		autorest.WithQueryParameters(queryParameters))
28734	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28735}
28736
28737// ResetSlotConfigurationSlotSender sends the ResetSlotConfigurationSlot request. The method will close the
28738// http.Response Body if it receives an error.
28739func (client AppsClient) ResetSlotConfigurationSlotSender(req *http.Request) (*http.Response, error) {
28740	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28741}
28742
28743// ResetSlotConfigurationSlotResponder handles the response to the ResetSlotConfigurationSlot request. The method always
28744// closes the http.Response Body.
28745func (client AppsClient) ResetSlotConfigurationSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28746	err = autorest.Respond(
28747		resp,
28748		azure.WithErrorUnlessStatusCode(http.StatusOK),
28749		autorest.ByClosing())
28750	result.Response = resp
28751	return
28752}
28753
28754// Restart description for Restarts an app (or deployment slot, if specified).
28755// Parameters:
28756// resourceGroupName - name of the resource group to which the resource belongs.
28757// name - name of the app.
28758// softRestart - specify true to apply the configuration settings and restarts the app only if necessary. By
28759// default, the API always restarts and reprovisions the app.
28760// synchronous - specify true to block until the app is restarted. By default, it is set to false, and the API
28761// responds immediately (asynchronous).
28762func (client AppsClient) Restart(ctx context.Context, resourceGroupName string, name string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) {
28763	if tracing.IsEnabled() {
28764		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Restart")
28765		defer func() {
28766			sc := -1
28767			if result.Response != nil {
28768				sc = result.Response.StatusCode
28769			}
28770			tracing.EndSpan(ctx, sc, err)
28771		}()
28772	}
28773	if err := validation.Validate([]validation.Validation{
28774		{TargetValue: resourceGroupName,
28775			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28776				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28777				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28778		return result, validation.NewError("web.AppsClient", "Restart", err.Error())
28779	}
28780
28781	req, err := client.RestartPreparer(ctx, resourceGroupName, name, softRestart, synchronous)
28782	if err != nil {
28783		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", nil, "Failure preparing request")
28784		return
28785	}
28786
28787	resp, err := client.RestartSender(req)
28788	if err != nil {
28789		result.Response = resp
28790		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", resp, "Failure sending request")
28791		return
28792	}
28793
28794	result, err = client.RestartResponder(resp)
28795	if err != nil {
28796		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restart", resp, "Failure responding to request")
28797		return
28798	}
28799
28800	return
28801}
28802
28803// RestartPreparer prepares the Restart request.
28804func (client AppsClient) RestartPreparer(ctx context.Context, resourceGroupName string, name string, softRestart *bool, synchronous *bool) (*http.Request, error) {
28805	pathParameters := map[string]interface{}{
28806		"name":              autorest.Encode("path", name),
28807		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28808		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28809	}
28810
28811	const APIVersion = "2020-09-01"
28812	queryParameters := map[string]interface{}{
28813		"api-version": APIVersion,
28814	}
28815	if softRestart != nil {
28816		queryParameters["softRestart"] = autorest.Encode("query", *softRestart)
28817	}
28818	if synchronous != nil {
28819		queryParameters["synchronous"] = autorest.Encode("query", *synchronous)
28820	}
28821
28822	preparer := autorest.CreatePreparer(
28823		autorest.AsPost(),
28824		autorest.WithBaseURL(client.BaseURI),
28825		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart", pathParameters),
28826		autorest.WithQueryParameters(queryParameters))
28827	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28828}
28829
28830// RestartSender sends the Restart request. The method will close the
28831// http.Response Body if it receives an error.
28832func (client AppsClient) RestartSender(req *http.Request) (*http.Response, error) {
28833	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28834}
28835
28836// RestartResponder handles the response to the Restart request. The method always
28837// closes the http.Response Body.
28838func (client AppsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
28839	err = autorest.Respond(
28840		resp,
28841		azure.WithErrorUnlessStatusCode(http.StatusOK),
28842		autorest.ByClosing())
28843	result.Response = resp
28844	return
28845}
28846
28847// RestartSlot description for Restarts an app (or deployment slot, if specified).
28848// Parameters:
28849// resourceGroupName - name of the resource group to which the resource belongs.
28850// name - name of the app.
28851// slot - name of the deployment slot. If a slot is not specified, the API will restart the production slot.
28852// softRestart - specify true to apply the configuration settings and restarts the app only if necessary. By
28853// default, the API always restarts and reprovisions the app.
28854// synchronous - specify true to block until the app is restarted. By default, it is set to false, and the API
28855// responds immediately (asynchronous).
28856func (client AppsClient) RestartSlot(ctx context.Context, resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) {
28857	if tracing.IsEnabled() {
28858		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestartSlot")
28859		defer func() {
28860			sc := -1
28861			if result.Response != nil {
28862				sc = result.Response.StatusCode
28863			}
28864			tracing.EndSpan(ctx, sc, err)
28865		}()
28866	}
28867	if err := validation.Validate([]validation.Validation{
28868		{TargetValue: resourceGroupName,
28869			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28870				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28871				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
28872		return result, validation.NewError("web.AppsClient", "RestartSlot", err.Error())
28873	}
28874
28875	req, err := client.RestartSlotPreparer(ctx, resourceGroupName, name, slot, softRestart, synchronous)
28876	if err != nil {
28877		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", nil, "Failure preparing request")
28878		return
28879	}
28880
28881	resp, err := client.RestartSlotSender(req)
28882	if err != nil {
28883		result.Response = resp
28884		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", resp, "Failure sending request")
28885		return
28886	}
28887
28888	result, err = client.RestartSlotResponder(resp)
28889	if err != nil {
28890		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestartSlot", resp, "Failure responding to request")
28891		return
28892	}
28893
28894	return
28895}
28896
28897// RestartSlotPreparer prepares the RestartSlot request.
28898func (client AppsClient) RestartSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (*http.Request, error) {
28899	pathParameters := map[string]interface{}{
28900		"name":              autorest.Encode("path", name),
28901		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28902		"slot":              autorest.Encode("path", slot),
28903		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28904	}
28905
28906	const APIVersion = "2020-09-01"
28907	queryParameters := map[string]interface{}{
28908		"api-version": APIVersion,
28909	}
28910	if softRestart != nil {
28911		queryParameters["softRestart"] = autorest.Encode("query", *softRestart)
28912	}
28913	if synchronous != nil {
28914		queryParameters["synchronous"] = autorest.Encode("query", *synchronous)
28915	}
28916
28917	preparer := autorest.CreatePreparer(
28918		autorest.AsPost(),
28919		autorest.WithBaseURL(client.BaseURI),
28920		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart", pathParameters),
28921		autorest.WithQueryParameters(queryParameters))
28922	return preparer.Prepare((&http.Request{}).WithContext(ctx))
28923}
28924
28925// RestartSlotSender sends the RestartSlot request. The method will close the
28926// http.Response Body if it receives an error.
28927func (client AppsClient) RestartSlotSender(req *http.Request) (*http.Response, error) {
28928	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
28929}
28930
28931// RestartSlotResponder handles the response to the RestartSlot request. The method always
28932// closes the http.Response Body.
28933func (client AppsClient) RestartSlotResponder(resp *http.Response) (result autorest.Response, err error) {
28934	err = autorest.Respond(
28935		resp,
28936		azure.WithErrorUnlessStatusCode(http.StatusOK),
28937		autorest.ByClosing())
28938	result.Response = resp
28939	return
28940}
28941
28942// Restore description for Restores a specific backup to another app (or deployment slot, if specified).
28943// Parameters:
28944// resourceGroupName - name of the resource group to which the resource belongs.
28945// name - name of the app.
28946// backupID - ID of the backup.
28947// request - information on restore request .
28948func (client AppsClient) Restore(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest) (result AppsRestoreFuture, err error) {
28949	if tracing.IsEnabled() {
28950		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Restore")
28951		defer func() {
28952			sc := -1
28953			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
28954				sc = result.FutureAPI.Response().StatusCode
28955			}
28956			tracing.EndSpan(ctx, sc, err)
28957		}()
28958	}
28959	if err := validation.Validate([]validation.Validation{
28960		{TargetValue: resourceGroupName,
28961			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
28962				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
28963				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
28964		{TargetValue: request,
28965			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
28966				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
28967					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
28968				}}}}}); err != nil {
28969		return result, validation.NewError("web.AppsClient", "Restore", err.Error())
28970	}
28971
28972	req, err := client.RestorePreparer(ctx, resourceGroupName, name, backupID, request)
28973	if err != nil {
28974		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restore", nil, "Failure preparing request")
28975		return
28976	}
28977
28978	result, err = client.RestoreSender(req)
28979	if err != nil {
28980		err = autorest.NewErrorWithError(err, "web.AppsClient", "Restore", nil, "Failure sending request")
28981		return
28982	}
28983
28984	return
28985}
28986
28987// RestorePreparer prepares the Restore request.
28988func (client AppsClient) RestorePreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest) (*http.Request, error) {
28989	pathParameters := map[string]interface{}{
28990		"backupId":          autorest.Encode("path", backupID),
28991		"name":              autorest.Encode("path", name),
28992		"resourceGroupName": autorest.Encode("path", resourceGroupName),
28993		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
28994	}
28995
28996	const APIVersion = "2020-09-01"
28997	queryParameters := map[string]interface{}{
28998		"api-version": APIVersion,
28999	}
29000
29001	preparer := autorest.CreatePreparer(
29002		autorest.AsContentType("application/json; charset=utf-8"),
29003		autorest.AsPost(),
29004		autorest.WithBaseURL(client.BaseURI),
29005		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore", pathParameters),
29006		autorest.WithJSON(request),
29007		autorest.WithQueryParameters(queryParameters))
29008	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29009}
29010
29011// RestoreSender sends the Restore request. The method will close the
29012// http.Response Body if it receives an error.
29013func (client AppsClient) RestoreSender(req *http.Request) (future AppsRestoreFuture, err error) {
29014	var resp *http.Response
29015	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29016	if err != nil {
29017		return
29018	}
29019	var azf azure.Future
29020	azf, err = azure.NewFutureFromResponse(resp)
29021	future.FutureAPI = &azf
29022	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29023		var done bool
29024		done, err = future.DoneWithContext(context.Background(), client)
29025		if err != nil {
29026			err = autorest.NewErrorWithError(err, "web.AppsRestoreFuture", "Result", future.Response(), "Polling failure")
29027			return
29028		}
29029		if !done {
29030			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFuture")
29031			return
29032		}
29033		ar.Response = future.Response()
29034		return
29035	}
29036	return
29037}
29038
29039// RestoreResponder handles the response to the Restore request. The method always
29040// closes the http.Response Body.
29041func (client AppsClient) RestoreResponder(resp *http.Response) (result autorest.Response, err error) {
29042	err = autorest.Respond(
29043		resp,
29044		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29045		autorest.ByClosing())
29046	result.Response = resp
29047	return
29048}
29049
29050// RestoreFromBackupBlob description for Restores an app from a backup blob in Azure Storage.
29051// Parameters:
29052// resourceGroupName - name of the resource group to which the resource belongs.
29053// name - name of the app.
29054// request - information on restore request .
29055func (client AppsClient) RestoreFromBackupBlob(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (result AppsRestoreFromBackupBlobFuture, err error) {
29056	if tracing.IsEnabled() {
29057		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromBackupBlob")
29058		defer func() {
29059			sc := -1
29060			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29061				sc = result.FutureAPI.Response().StatusCode
29062			}
29063			tracing.EndSpan(ctx, sc, err)
29064		}()
29065	}
29066	if err := validation.Validate([]validation.Validation{
29067		{TargetValue: resourceGroupName,
29068			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29069				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29070				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29071		{TargetValue: request,
29072			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
29073				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
29074					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
29075				}}}}}); err != nil {
29076		return result, validation.NewError("web.AppsClient", "RestoreFromBackupBlob", err.Error())
29077	}
29078
29079	req, err := client.RestoreFromBackupBlobPreparer(ctx, resourceGroupName, name, request)
29080	if err != nil {
29081		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlob", nil, "Failure preparing request")
29082		return
29083	}
29084
29085	result, err = client.RestoreFromBackupBlobSender(req)
29086	if err != nil {
29087		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlob", nil, "Failure sending request")
29088		return
29089	}
29090
29091	return
29092}
29093
29094// RestoreFromBackupBlobPreparer prepares the RestoreFromBackupBlob request.
29095func (client AppsClient) RestoreFromBackupBlobPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest) (*http.Request, error) {
29096	pathParameters := map[string]interface{}{
29097		"name":              autorest.Encode("path", name),
29098		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29099		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29100	}
29101
29102	const APIVersion = "2020-09-01"
29103	queryParameters := map[string]interface{}{
29104		"api-version": APIVersion,
29105	}
29106
29107	preparer := autorest.CreatePreparer(
29108		autorest.AsContentType("application/json; charset=utf-8"),
29109		autorest.AsPost(),
29110		autorest.WithBaseURL(client.BaseURI),
29111		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob", pathParameters),
29112		autorest.WithJSON(request),
29113		autorest.WithQueryParameters(queryParameters))
29114	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29115}
29116
29117// RestoreFromBackupBlobSender sends the RestoreFromBackupBlob request. The method will close the
29118// http.Response Body if it receives an error.
29119func (client AppsClient) RestoreFromBackupBlobSender(req *http.Request) (future AppsRestoreFromBackupBlobFuture, err error) {
29120	var resp *http.Response
29121	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29122	if err != nil {
29123		return
29124	}
29125	var azf azure.Future
29126	azf, err = azure.NewFutureFromResponse(resp)
29127	future.FutureAPI = &azf
29128	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29129		var done bool
29130		done, err = future.DoneWithContext(context.Background(), client)
29131		if err != nil {
29132			err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobFuture", "Result", future.Response(), "Polling failure")
29133			return
29134		}
29135		if !done {
29136			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromBackupBlobFuture")
29137			return
29138		}
29139		ar.Response = future.Response()
29140		return
29141	}
29142	return
29143}
29144
29145// RestoreFromBackupBlobResponder handles the response to the RestoreFromBackupBlob request. The method always
29146// closes the http.Response Body.
29147func (client AppsClient) RestoreFromBackupBlobResponder(resp *http.Response) (result autorest.Response, err error) {
29148	err = autorest.Respond(
29149		resp,
29150		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29151		autorest.ByClosing())
29152	result.Response = resp
29153	return
29154}
29155
29156// RestoreFromBackupBlobSlot description for Restores an app from a backup blob in Azure Storage.
29157// Parameters:
29158// resourceGroupName - name of the resource group to which the resource belongs.
29159// name - name of the app.
29160// request - information on restore request .
29161// slot - name of the deployment slot. If a slot is not specified, the API will restore a backup of the
29162// production slot.
29163func (client AppsClient) RestoreFromBackupBlobSlot(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (result AppsRestoreFromBackupBlobSlotFuture, err error) {
29164	if tracing.IsEnabled() {
29165		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromBackupBlobSlot")
29166		defer func() {
29167			sc := -1
29168			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29169				sc = result.FutureAPI.Response().StatusCode
29170			}
29171			tracing.EndSpan(ctx, sc, err)
29172		}()
29173	}
29174	if err := validation.Validate([]validation.Validation{
29175		{TargetValue: resourceGroupName,
29176			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29177				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29178				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29179		{TargetValue: request,
29180			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
29181				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
29182					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
29183				}}}}}); err != nil {
29184		return result, validation.NewError("web.AppsClient", "RestoreFromBackupBlobSlot", err.Error())
29185	}
29186
29187	req, err := client.RestoreFromBackupBlobSlotPreparer(ctx, resourceGroupName, name, request, slot)
29188	if err != nil {
29189		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlobSlot", nil, "Failure preparing request")
29190		return
29191	}
29192
29193	result, err = client.RestoreFromBackupBlobSlotSender(req)
29194	if err != nil {
29195		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromBackupBlobSlot", nil, "Failure sending request")
29196		return
29197	}
29198
29199	return
29200}
29201
29202// RestoreFromBackupBlobSlotPreparer prepares the RestoreFromBackupBlobSlot request.
29203func (client AppsClient) RestoreFromBackupBlobSlotPreparer(ctx context.Context, resourceGroupName string, name string, request RestoreRequest, slot string) (*http.Request, error) {
29204	pathParameters := map[string]interface{}{
29205		"name":              autorest.Encode("path", name),
29206		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29207		"slot":              autorest.Encode("path", slot),
29208		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29209	}
29210
29211	const APIVersion = "2020-09-01"
29212	queryParameters := map[string]interface{}{
29213		"api-version": APIVersion,
29214	}
29215
29216	preparer := autorest.CreatePreparer(
29217		autorest.AsContentType("application/json; charset=utf-8"),
29218		autorest.AsPost(),
29219		autorest.WithBaseURL(client.BaseURI),
29220		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob", pathParameters),
29221		autorest.WithJSON(request),
29222		autorest.WithQueryParameters(queryParameters))
29223	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29224}
29225
29226// RestoreFromBackupBlobSlotSender sends the RestoreFromBackupBlobSlot request. The method will close the
29227// http.Response Body if it receives an error.
29228func (client AppsClient) RestoreFromBackupBlobSlotSender(req *http.Request) (future AppsRestoreFromBackupBlobSlotFuture, err error) {
29229	var resp *http.Response
29230	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29231	if err != nil {
29232		return
29233	}
29234	var azf azure.Future
29235	azf, err = azure.NewFutureFromResponse(resp)
29236	future.FutureAPI = &azf
29237	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29238		var done bool
29239		done, err = future.DoneWithContext(context.Background(), client)
29240		if err != nil {
29241			err = autorest.NewErrorWithError(err, "web.AppsRestoreFromBackupBlobSlotFuture", "Result", future.Response(), "Polling failure")
29242			return
29243		}
29244		if !done {
29245			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromBackupBlobSlotFuture")
29246			return
29247		}
29248		ar.Response = future.Response()
29249		return
29250	}
29251	return
29252}
29253
29254// RestoreFromBackupBlobSlotResponder handles the response to the RestoreFromBackupBlobSlot request. The method always
29255// closes the http.Response Body.
29256func (client AppsClient) RestoreFromBackupBlobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29257	err = autorest.Respond(
29258		resp,
29259		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29260		autorest.ByClosing())
29261	result.Response = resp
29262	return
29263}
29264
29265// RestoreFromDeletedApp description for Restores a deleted web app to this web app.
29266// Parameters:
29267// resourceGroupName - name of the resource group to which the resource belongs.
29268// name - name of web app.
29269// restoreRequest - deleted web app restore information.
29270func (client AppsClient) RestoreFromDeletedApp(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (result AppsRestoreFromDeletedAppFuture, err error) {
29271	if tracing.IsEnabled() {
29272		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromDeletedApp")
29273		defer func() {
29274			sc := -1
29275			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29276				sc = result.FutureAPI.Response().StatusCode
29277			}
29278			tracing.EndSpan(ctx, sc, err)
29279		}()
29280	}
29281	if err := validation.Validate([]validation.Validation{
29282		{TargetValue: resourceGroupName,
29283			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29284				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29285				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29286		return result, validation.NewError("web.AppsClient", "RestoreFromDeletedApp", err.Error())
29287	}
29288
29289	req, err := client.RestoreFromDeletedAppPreparer(ctx, resourceGroupName, name, restoreRequest)
29290	if err != nil {
29291		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure preparing request")
29292		return
29293	}
29294
29295	result, err = client.RestoreFromDeletedAppSender(req)
29296	if err != nil {
29297		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedApp", nil, "Failure sending request")
29298		return
29299	}
29300
29301	return
29302}
29303
29304// RestoreFromDeletedAppPreparer prepares the RestoreFromDeletedApp request.
29305func (client AppsClient) RestoreFromDeletedAppPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest) (*http.Request, error) {
29306	pathParameters := map[string]interface{}{
29307		"name":              autorest.Encode("path", name),
29308		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29309		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29310	}
29311
29312	const APIVersion = "2020-09-01"
29313	queryParameters := map[string]interface{}{
29314		"api-version": APIVersion,
29315	}
29316
29317	preparer := autorest.CreatePreparer(
29318		autorest.AsContentType("application/json; charset=utf-8"),
29319		autorest.AsPost(),
29320		autorest.WithBaseURL(client.BaseURI),
29321		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp", pathParameters),
29322		autorest.WithJSON(restoreRequest),
29323		autorest.WithQueryParameters(queryParameters))
29324	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29325}
29326
29327// RestoreFromDeletedAppSender sends the RestoreFromDeletedApp request. The method will close the
29328// http.Response Body if it receives an error.
29329func (client AppsClient) RestoreFromDeletedAppSender(req *http.Request) (future AppsRestoreFromDeletedAppFuture, err error) {
29330	var resp *http.Response
29331	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29332	if err != nil {
29333		return
29334	}
29335	var azf azure.Future
29336	azf, err = azure.NewFutureFromResponse(resp)
29337	future.FutureAPI = &azf
29338	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29339		var done bool
29340		done, err = future.DoneWithContext(context.Background(), client)
29341		if err != nil {
29342			err = autorest.NewErrorWithError(err, "web.AppsRestoreFromDeletedAppFuture", "Result", future.Response(), "Polling failure")
29343			return
29344		}
29345		if !done {
29346			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromDeletedAppFuture")
29347			return
29348		}
29349		ar.Response = future.Response()
29350		return
29351	}
29352	return
29353}
29354
29355// RestoreFromDeletedAppResponder handles the response to the RestoreFromDeletedApp request. The method always
29356// closes the http.Response Body.
29357func (client AppsClient) RestoreFromDeletedAppResponder(resp *http.Response) (result autorest.Response, err error) {
29358	err = autorest.Respond(
29359		resp,
29360		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29361		autorest.ByClosing())
29362	result.Response = resp
29363	return
29364}
29365
29366// RestoreFromDeletedAppSlot description for Restores a deleted web app to this web app.
29367// Parameters:
29368// resourceGroupName - name of the resource group to which the resource belongs.
29369// name - name of web app.
29370// restoreRequest - deleted web app restore information.
29371// slot - name of web app slot. If not specified then will default to production slot.
29372func (client AppsClient) RestoreFromDeletedAppSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (result AppsRestoreFromDeletedAppSlotFuture, err error) {
29373	if tracing.IsEnabled() {
29374		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreFromDeletedAppSlot")
29375		defer func() {
29376			sc := -1
29377			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29378				sc = result.FutureAPI.Response().StatusCode
29379			}
29380			tracing.EndSpan(ctx, sc, err)
29381		}()
29382	}
29383	if err := validation.Validate([]validation.Validation{
29384		{TargetValue: resourceGroupName,
29385			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29386				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29387				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29388		return result, validation.NewError("web.AppsClient", "RestoreFromDeletedAppSlot", err.Error())
29389	}
29390
29391	req, err := client.RestoreFromDeletedAppSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
29392	if err != nil {
29393		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure preparing request")
29394		return
29395	}
29396
29397	result, err = client.RestoreFromDeletedAppSlotSender(req)
29398	if err != nil {
29399		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreFromDeletedAppSlot", nil, "Failure sending request")
29400		return
29401	}
29402
29403	return
29404}
29405
29406// RestoreFromDeletedAppSlotPreparer prepares the RestoreFromDeletedAppSlot request.
29407func (client AppsClient) RestoreFromDeletedAppSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest DeletedAppRestoreRequest, slot string) (*http.Request, error) {
29408	pathParameters := map[string]interface{}{
29409		"name":              autorest.Encode("path", name),
29410		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29411		"slot":              autorest.Encode("path", slot),
29412		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29413	}
29414
29415	const APIVersion = "2020-09-01"
29416	queryParameters := map[string]interface{}{
29417		"api-version": APIVersion,
29418	}
29419
29420	preparer := autorest.CreatePreparer(
29421		autorest.AsContentType("application/json; charset=utf-8"),
29422		autorest.AsPost(),
29423		autorest.WithBaseURL(client.BaseURI),
29424		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp", pathParameters),
29425		autorest.WithJSON(restoreRequest),
29426		autorest.WithQueryParameters(queryParameters))
29427	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29428}
29429
29430// RestoreFromDeletedAppSlotSender sends the RestoreFromDeletedAppSlot request. The method will close the
29431// http.Response Body if it receives an error.
29432func (client AppsClient) RestoreFromDeletedAppSlotSender(req *http.Request) (future AppsRestoreFromDeletedAppSlotFuture, err error) {
29433	var resp *http.Response
29434	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29435	if err != nil {
29436		return
29437	}
29438	var azf azure.Future
29439	azf, err = azure.NewFutureFromResponse(resp)
29440	future.FutureAPI = &azf
29441	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29442		var done bool
29443		done, err = future.DoneWithContext(context.Background(), client)
29444		if err != nil {
29445			err = autorest.NewErrorWithError(err, "web.AppsRestoreFromDeletedAppSlotFuture", "Result", future.Response(), "Polling failure")
29446			return
29447		}
29448		if !done {
29449			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreFromDeletedAppSlotFuture")
29450			return
29451		}
29452		ar.Response = future.Response()
29453		return
29454	}
29455	return
29456}
29457
29458// RestoreFromDeletedAppSlotResponder handles the response to the RestoreFromDeletedAppSlot request. The method always
29459// closes the http.Response Body.
29460func (client AppsClient) RestoreFromDeletedAppSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29461	err = autorest.Respond(
29462		resp,
29463		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29464		autorest.ByClosing())
29465	result.Response = resp
29466	return
29467}
29468
29469// RestoreSlot description for Restores a specific backup to another app (or deployment slot, if specified).
29470// Parameters:
29471// resourceGroupName - name of the resource group to which the resource belongs.
29472// name - name of the app.
29473// backupID - ID of the backup.
29474// request - information on restore request .
29475// slot - name of the deployment slot. If a slot is not specified, the API will restore a backup of the
29476// production slot.
29477func (client AppsClient) RestoreSlot(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, slot string) (result AppsRestoreSlotFuture, err error) {
29478	if tracing.IsEnabled() {
29479		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSlot")
29480		defer func() {
29481			sc := -1
29482			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29483				sc = result.FutureAPI.Response().StatusCode
29484			}
29485			tracing.EndSpan(ctx, sc, err)
29486		}()
29487	}
29488	if err := validation.Validate([]validation.Validation{
29489		{TargetValue: resourceGroupName,
29490			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29491				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29492				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29493		{TargetValue: request,
29494			Constraints: []validation.Constraint{{Target: "request.RestoreRequestProperties", Name: validation.Null, Rule: false,
29495				Chain: []validation.Constraint{{Target: "request.RestoreRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
29496					{Target: "request.RestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil},
29497				}}}}}); err != nil {
29498		return result, validation.NewError("web.AppsClient", "RestoreSlot", err.Error())
29499	}
29500
29501	req, err := client.RestoreSlotPreparer(ctx, resourceGroupName, name, backupID, request, slot)
29502	if err != nil {
29503		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSlot", nil, "Failure preparing request")
29504		return
29505	}
29506
29507	result, err = client.RestoreSlotSender(req)
29508	if err != nil {
29509		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSlot", nil, "Failure sending request")
29510		return
29511	}
29512
29513	return
29514}
29515
29516// RestoreSlotPreparer prepares the RestoreSlot request.
29517func (client AppsClient) RestoreSlotPreparer(ctx context.Context, resourceGroupName string, name string, backupID string, request RestoreRequest, slot string) (*http.Request, error) {
29518	pathParameters := map[string]interface{}{
29519		"backupId":          autorest.Encode("path", backupID),
29520		"name":              autorest.Encode("path", name),
29521		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29522		"slot":              autorest.Encode("path", slot),
29523		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29524	}
29525
29526	const APIVersion = "2020-09-01"
29527	queryParameters := map[string]interface{}{
29528		"api-version": APIVersion,
29529	}
29530
29531	preparer := autorest.CreatePreparer(
29532		autorest.AsContentType("application/json; charset=utf-8"),
29533		autorest.AsPost(),
29534		autorest.WithBaseURL(client.BaseURI),
29535		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore", pathParameters),
29536		autorest.WithJSON(request),
29537		autorest.WithQueryParameters(queryParameters))
29538	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29539}
29540
29541// RestoreSlotSender sends the RestoreSlot request. The method will close the
29542// http.Response Body if it receives an error.
29543func (client AppsClient) RestoreSlotSender(req *http.Request) (future AppsRestoreSlotFuture, err error) {
29544	var resp *http.Response
29545	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29546	if err != nil {
29547		return
29548	}
29549	var azf azure.Future
29550	azf, err = azure.NewFutureFromResponse(resp)
29551	future.FutureAPI = &azf
29552	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29553		var done bool
29554		done, err = future.DoneWithContext(context.Background(), client)
29555		if err != nil {
29556			err = autorest.NewErrorWithError(err, "web.AppsRestoreSlotFuture", "Result", future.Response(), "Polling failure")
29557			return
29558		}
29559		if !done {
29560			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSlotFuture")
29561			return
29562		}
29563		ar.Response = future.Response()
29564		return
29565	}
29566	return
29567}
29568
29569// RestoreSlotResponder handles the response to the RestoreSlot request. The method always
29570// closes the http.Response Body.
29571func (client AppsClient) RestoreSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29572	err = autorest.Respond(
29573		resp,
29574		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29575		autorest.ByClosing())
29576	result.Response = resp
29577	return
29578}
29579
29580// RestoreSnapshot description for Restores a web app from a snapshot.
29581// Parameters:
29582// resourceGroupName - name of the resource group to which the resource belongs.
29583// name - name of web app.
29584// restoreRequest - snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites
29585// or GetSiteSnapshots API.
29586func (client AppsClient) RestoreSnapshot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest) (result AppsRestoreSnapshotFuture, err error) {
29587	if tracing.IsEnabled() {
29588		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSnapshot")
29589		defer func() {
29590			sc := -1
29591			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29592				sc = result.FutureAPI.Response().StatusCode
29593			}
29594			tracing.EndSpan(ctx, sc, err)
29595		}()
29596	}
29597	if err := validation.Validate([]validation.Validation{
29598		{TargetValue: resourceGroupName,
29599			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29600				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29601				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29602		{TargetValue: restoreRequest,
29603			Constraints: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties", Name: validation.Null, Rule: false,
29604				Chain: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
29605		return result, validation.NewError("web.AppsClient", "RestoreSnapshot", err.Error())
29606	}
29607
29608	req, err := client.RestoreSnapshotPreparer(ctx, resourceGroupName, name, restoreRequest)
29609	if err != nil {
29610		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshot", nil, "Failure preparing request")
29611		return
29612	}
29613
29614	result, err = client.RestoreSnapshotSender(req)
29615	if err != nil {
29616		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshot", nil, "Failure sending request")
29617		return
29618	}
29619
29620	return
29621}
29622
29623// RestoreSnapshotPreparer prepares the RestoreSnapshot request.
29624func (client AppsClient) RestoreSnapshotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest) (*http.Request, error) {
29625	pathParameters := map[string]interface{}{
29626		"name":              autorest.Encode("path", name),
29627		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29628		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29629	}
29630
29631	const APIVersion = "2020-09-01"
29632	queryParameters := map[string]interface{}{
29633		"api-version": APIVersion,
29634	}
29635
29636	preparer := autorest.CreatePreparer(
29637		autorest.AsContentType("application/json; charset=utf-8"),
29638		autorest.AsPost(),
29639		autorest.WithBaseURL(client.BaseURI),
29640		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot", pathParameters),
29641		autorest.WithJSON(restoreRequest),
29642		autorest.WithQueryParameters(queryParameters))
29643	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29644}
29645
29646// RestoreSnapshotSender sends the RestoreSnapshot request. The method will close the
29647// http.Response Body if it receives an error.
29648func (client AppsClient) RestoreSnapshotSender(req *http.Request) (future AppsRestoreSnapshotFuture, err error) {
29649	var resp *http.Response
29650	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29651	if err != nil {
29652		return
29653	}
29654	var azf azure.Future
29655	azf, err = azure.NewFutureFromResponse(resp)
29656	future.FutureAPI = &azf
29657	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29658		var done bool
29659		done, err = future.DoneWithContext(context.Background(), client)
29660		if err != nil {
29661			err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotFuture", "Result", future.Response(), "Polling failure")
29662			return
29663		}
29664		if !done {
29665			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSnapshotFuture")
29666			return
29667		}
29668		ar.Response = future.Response()
29669		return
29670	}
29671	return
29672}
29673
29674// RestoreSnapshotResponder handles the response to the RestoreSnapshot request. The method always
29675// closes the http.Response Body.
29676func (client AppsClient) RestoreSnapshotResponder(resp *http.Response) (result autorest.Response, err error) {
29677	err = autorest.Respond(
29678		resp,
29679		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29680		autorest.ByClosing())
29681	result.Response = resp
29682	return
29683}
29684
29685// RestoreSnapshotSlot description for Restores a web app from a snapshot.
29686// Parameters:
29687// resourceGroupName - name of the resource group to which the resource belongs.
29688// name - name of web app.
29689// restoreRequest - snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites
29690// or GetSiteSnapshots API.
29691// slot - name of web app slot. If not specified then will default to production slot.
29692func (client AppsClient) RestoreSnapshotSlot(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, slot string) (result AppsRestoreSnapshotSlotFuture, err error) {
29693	if tracing.IsEnabled() {
29694		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RestoreSnapshotSlot")
29695		defer func() {
29696			sc := -1
29697			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
29698				sc = result.FutureAPI.Response().StatusCode
29699			}
29700			tracing.EndSpan(ctx, sc, err)
29701		}()
29702	}
29703	if err := validation.Validate([]validation.Validation{
29704		{TargetValue: resourceGroupName,
29705			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29706				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29707				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
29708		{TargetValue: restoreRequest,
29709			Constraints: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties", Name: validation.Null, Rule: false,
29710				Chain: []validation.Constraint{{Target: "restoreRequest.SnapshotRestoreRequestProperties.Overwrite", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
29711		return result, validation.NewError("web.AppsClient", "RestoreSnapshotSlot", err.Error())
29712	}
29713
29714	req, err := client.RestoreSnapshotSlotPreparer(ctx, resourceGroupName, name, restoreRequest, slot)
29715	if err != nil {
29716		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshotSlot", nil, "Failure preparing request")
29717		return
29718	}
29719
29720	result, err = client.RestoreSnapshotSlotSender(req)
29721	if err != nil {
29722		err = autorest.NewErrorWithError(err, "web.AppsClient", "RestoreSnapshotSlot", nil, "Failure sending request")
29723		return
29724	}
29725
29726	return
29727}
29728
29729// RestoreSnapshotSlotPreparer prepares the RestoreSnapshotSlot request.
29730func (client AppsClient) RestoreSnapshotSlotPreparer(ctx context.Context, resourceGroupName string, name string, restoreRequest SnapshotRestoreRequest, slot string) (*http.Request, error) {
29731	pathParameters := map[string]interface{}{
29732		"name":              autorest.Encode("path", name),
29733		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29734		"slot":              autorest.Encode("path", slot),
29735		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29736	}
29737
29738	const APIVersion = "2020-09-01"
29739	queryParameters := map[string]interface{}{
29740		"api-version": APIVersion,
29741	}
29742
29743	preparer := autorest.CreatePreparer(
29744		autorest.AsContentType("application/json; charset=utf-8"),
29745		autorest.AsPost(),
29746		autorest.WithBaseURL(client.BaseURI),
29747		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot", pathParameters),
29748		autorest.WithJSON(restoreRequest),
29749		autorest.WithQueryParameters(queryParameters))
29750	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29751}
29752
29753// RestoreSnapshotSlotSender sends the RestoreSnapshotSlot request. The method will close the
29754// http.Response Body if it receives an error.
29755func (client AppsClient) RestoreSnapshotSlotSender(req *http.Request) (future AppsRestoreSnapshotSlotFuture, err error) {
29756	var resp *http.Response
29757	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
29758	if err != nil {
29759		return
29760	}
29761	var azf azure.Future
29762	azf, err = azure.NewFutureFromResponse(resp)
29763	future.FutureAPI = &azf
29764	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
29765		var done bool
29766		done, err = future.DoneWithContext(context.Background(), client)
29767		if err != nil {
29768			err = autorest.NewErrorWithError(err, "web.AppsRestoreSnapshotSlotFuture", "Result", future.Response(), "Polling failure")
29769			return
29770		}
29771		if !done {
29772			err = azure.NewAsyncOpIncompleteError("web.AppsRestoreSnapshotSlotFuture")
29773			return
29774		}
29775		ar.Response = future.Response()
29776		return
29777	}
29778	return
29779}
29780
29781// RestoreSnapshotSlotResponder handles the response to the RestoreSnapshotSlot request. The method always
29782// closes the http.Response Body.
29783func (client AppsClient) RestoreSnapshotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29784	err = autorest.Respond(
29785		resp,
29786		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
29787		autorest.ByClosing())
29788	result.Response = resp
29789	return
29790}
29791
29792// RunTriggeredWebJob description for Run a triggered web job for an app, or a deployment slot.
29793// Parameters:
29794// resourceGroupName - name of the resource group to which the resource belongs.
29795// name - site name.
29796// webJobName - name of Web Job.
29797func (client AppsClient) RunTriggeredWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
29798	if tracing.IsEnabled() {
29799		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RunTriggeredWebJob")
29800		defer func() {
29801			sc := -1
29802			if result.Response != nil {
29803				sc = result.Response.StatusCode
29804			}
29805			tracing.EndSpan(ctx, sc, err)
29806		}()
29807	}
29808	if err := validation.Validate([]validation.Validation{
29809		{TargetValue: resourceGroupName,
29810			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29811				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29812				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29813		return result, validation.NewError("web.AppsClient", "RunTriggeredWebJob", err.Error())
29814	}
29815
29816	req, err := client.RunTriggeredWebJobPreparer(ctx, resourceGroupName, name, webJobName)
29817	if err != nil {
29818		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", nil, "Failure preparing request")
29819		return
29820	}
29821
29822	resp, err := client.RunTriggeredWebJobSender(req)
29823	if err != nil {
29824		result.Response = resp
29825		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure sending request")
29826		return
29827	}
29828
29829	result, err = client.RunTriggeredWebJobResponder(resp)
29830	if err != nil {
29831		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure responding to request")
29832		return
29833	}
29834
29835	return
29836}
29837
29838// RunTriggeredWebJobPreparer prepares the RunTriggeredWebJob request.
29839func (client AppsClient) RunTriggeredWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
29840	pathParameters := map[string]interface{}{
29841		"name":              autorest.Encode("path", name),
29842		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29843		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29844		"webJobName":        autorest.Encode("path", webJobName),
29845	}
29846
29847	const APIVersion = "2020-09-01"
29848	queryParameters := map[string]interface{}{
29849		"api-version": APIVersion,
29850	}
29851
29852	preparer := autorest.CreatePreparer(
29853		autorest.AsPost(),
29854		autorest.WithBaseURL(client.BaseURI),
29855		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run", pathParameters),
29856		autorest.WithQueryParameters(queryParameters))
29857	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29858}
29859
29860// RunTriggeredWebJobSender sends the RunTriggeredWebJob request. The method will close the
29861// http.Response Body if it receives an error.
29862func (client AppsClient) RunTriggeredWebJobSender(req *http.Request) (*http.Response, error) {
29863	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29864}
29865
29866// RunTriggeredWebJobResponder handles the response to the RunTriggeredWebJob request. The method always
29867// closes the http.Response Body.
29868func (client AppsClient) RunTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
29869	err = autorest.Respond(
29870		resp,
29871		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
29872		autorest.ByClosing())
29873	result.Response = resp
29874	return
29875}
29876
29877// RunTriggeredWebJobSlot description for Run a triggered web job for an app, or a deployment slot.
29878// Parameters:
29879// resourceGroupName - name of the resource group to which the resource belongs.
29880// name - site name.
29881// webJobName - name of Web Job.
29882// slot - name of the deployment slot. If a slot is not specified, the API uses the production slot.
29883func (client AppsClient) RunTriggeredWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
29884	if tracing.IsEnabled() {
29885		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.RunTriggeredWebJobSlot")
29886		defer func() {
29887			sc := -1
29888			if result.Response != nil {
29889				sc = result.Response.StatusCode
29890			}
29891			tracing.EndSpan(ctx, sc, err)
29892		}()
29893	}
29894	if err := validation.Validate([]validation.Validation{
29895		{TargetValue: resourceGroupName,
29896			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29897				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29898				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29899		return result, validation.NewError("web.AppsClient", "RunTriggeredWebJobSlot", err.Error())
29900	}
29901
29902	req, err := client.RunTriggeredWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
29903	if err != nil {
29904		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", nil, "Failure preparing request")
29905		return
29906	}
29907
29908	resp, err := client.RunTriggeredWebJobSlotSender(req)
29909	if err != nil {
29910		result.Response = resp
29911		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure sending request")
29912		return
29913	}
29914
29915	result, err = client.RunTriggeredWebJobSlotResponder(resp)
29916	if err != nil {
29917		err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure responding to request")
29918		return
29919	}
29920
29921	return
29922}
29923
29924// RunTriggeredWebJobSlotPreparer prepares the RunTriggeredWebJobSlot request.
29925func (client AppsClient) RunTriggeredWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
29926	pathParameters := map[string]interface{}{
29927		"name":              autorest.Encode("path", name),
29928		"resourceGroupName": autorest.Encode("path", resourceGroupName),
29929		"slot":              autorest.Encode("path", slot),
29930		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
29931		"webJobName":        autorest.Encode("path", webJobName),
29932	}
29933
29934	const APIVersion = "2020-09-01"
29935	queryParameters := map[string]interface{}{
29936		"api-version": APIVersion,
29937	}
29938
29939	preparer := autorest.CreatePreparer(
29940		autorest.AsPost(),
29941		autorest.WithBaseURL(client.BaseURI),
29942		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run", pathParameters),
29943		autorest.WithQueryParameters(queryParameters))
29944	return preparer.Prepare((&http.Request{}).WithContext(ctx))
29945}
29946
29947// RunTriggeredWebJobSlotSender sends the RunTriggeredWebJobSlot request. The method will close the
29948// http.Response Body if it receives an error.
29949func (client AppsClient) RunTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) {
29950	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
29951}
29952
29953// RunTriggeredWebJobSlotResponder handles the response to the RunTriggeredWebJobSlot request. The method always
29954// closes the http.Response Body.
29955func (client AppsClient) RunTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
29956	err = autorest.Respond(
29957		resp,
29958		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
29959		autorest.ByClosing())
29960	result.Response = resp
29961	return
29962}
29963
29964// Start description for Starts an app (or deployment slot, if specified).
29965// Parameters:
29966// resourceGroupName - name of the resource group to which the resource belongs.
29967// name - name of the app.
29968func (client AppsClient) Start(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
29969	if tracing.IsEnabled() {
29970		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Start")
29971		defer func() {
29972			sc := -1
29973			if result.Response != nil {
29974				sc = result.Response.StatusCode
29975			}
29976			tracing.EndSpan(ctx, sc, err)
29977		}()
29978	}
29979	if err := validation.Validate([]validation.Validation{
29980		{TargetValue: resourceGroupName,
29981			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
29982				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
29983				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
29984		return result, validation.NewError("web.AppsClient", "Start", err.Error())
29985	}
29986
29987	req, err := client.StartPreparer(ctx, resourceGroupName, name)
29988	if err != nil {
29989		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", nil, "Failure preparing request")
29990		return
29991	}
29992
29993	resp, err := client.StartSender(req)
29994	if err != nil {
29995		result.Response = resp
29996		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", resp, "Failure sending request")
29997		return
29998	}
29999
30000	result, err = client.StartResponder(resp)
30001	if err != nil {
30002		err = autorest.NewErrorWithError(err, "web.AppsClient", "Start", resp, "Failure responding to request")
30003		return
30004	}
30005
30006	return
30007}
30008
30009// StartPreparer prepares the Start request.
30010func (client AppsClient) StartPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
30011	pathParameters := map[string]interface{}{
30012		"name":              autorest.Encode("path", name),
30013		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30014		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30015	}
30016
30017	const APIVersion = "2020-09-01"
30018	queryParameters := map[string]interface{}{
30019		"api-version": APIVersion,
30020	}
30021
30022	preparer := autorest.CreatePreparer(
30023		autorest.AsPost(),
30024		autorest.WithBaseURL(client.BaseURI),
30025		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start", pathParameters),
30026		autorest.WithQueryParameters(queryParameters))
30027	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30028}
30029
30030// StartSender sends the Start request. The method will close the
30031// http.Response Body if it receives an error.
30032func (client AppsClient) StartSender(req *http.Request) (*http.Response, error) {
30033	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30034}
30035
30036// StartResponder handles the response to the Start request. The method always
30037// closes the http.Response Body.
30038func (client AppsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
30039	err = autorest.Respond(
30040		resp,
30041		azure.WithErrorUnlessStatusCode(http.StatusOK),
30042		autorest.ByClosing())
30043	result.Response = resp
30044	return
30045}
30046
30047// StartContinuousWebJob description for Start a continuous web job for an app, or a deployment slot.
30048// Parameters:
30049// resourceGroupName - name of the resource group to which the resource belongs.
30050// name - site name.
30051// webJobName - name of Web Job.
30052func (client AppsClient) StartContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
30053	if tracing.IsEnabled() {
30054		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartContinuousWebJob")
30055		defer func() {
30056			sc := -1
30057			if result.Response != nil {
30058				sc = result.Response.StatusCode
30059			}
30060			tracing.EndSpan(ctx, sc, err)
30061		}()
30062	}
30063	if err := validation.Validate([]validation.Validation{
30064		{TargetValue: resourceGroupName,
30065			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30066				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30067				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30068		return result, validation.NewError("web.AppsClient", "StartContinuousWebJob", err.Error())
30069	}
30070
30071	req, err := client.StartContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
30072	if err != nil {
30073		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", nil, "Failure preparing request")
30074		return
30075	}
30076
30077	resp, err := client.StartContinuousWebJobSender(req)
30078	if err != nil {
30079		result.Response = resp
30080		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure sending request")
30081		return
30082	}
30083
30084	result, err = client.StartContinuousWebJobResponder(resp)
30085	if err != nil {
30086		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure responding to request")
30087		return
30088	}
30089
30090	return
30091}
30092
30093// StartContinuousWebJobPreparer prepares the StartContinuousWebJob request.
30094func (client AppsClient) StartContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
30095	pathParameters := map[string]interface{}{
30096		"name":              autorest.Encode("path", name),
30097		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30098		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30099		"webJobName":        autorest.Encode("path", webJobName),
30100	}
30101
30102	const APIVersion = "2020-09-01"
30103	queryParameters := map[string]interface{}{
30104		"api-version": APIVersion,
30105	}
30106
30107	preparer := autorest.CreatePreparer(
30108		autorest.AsPost(),
30109		autorest.WithBaseURL(client.BaseURI),
30110		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start", pathParameters),
30111		autorest.WithQueryParameters(queryParameters))
30112	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30113}
30114
30115// StartContinuousWebJobSender sends the StartContinuousWebJob request. The method will close the
30116// http.Response Body if it receives an error.
30117func (client AppsClient) StartContinuousWebJobSender(req *http.Request) (*http.Response, error) {
30118	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30119}
30120
30121// StartContinuousWebJobResponder handles the response to the StartContinuousWebJob request. The method always
30122// closes the http.Response Body.
30123func (client AppsClient) StartContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
30124	err = autorest.Respond(
30125		resp,
30126		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
30127		autorest.ByClosing())
30128	result.Response = resp
30129	return
30130}
30131
30132// StartContinuousWebJobSlot description for Start a continuous web job for an app, or a deployment slot.
30133// Parameters:
30134// resourceGroupName - name of the resource group to which the resource belongs.
30135// name - site name.
30136// webJobName - name of Web Job.
30137// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
30138// production slot.
30139func (client AppsClient) StartContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
30140	if tracing.IsEnabled() {
30141		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartContinuousWebJobSlot")
30142		defer func() {
30143			sc := -1
30144			if result.Response != nil {
30145				sc = result.Response.StatusCode
30146			}
30147			tracing.EndSpan(ctx, sc, err)
30148		}()
30149	}
30150	if err := validation.Validate([]validation.Validation{
30151		{TargetValue: resourceGroupName,
30152			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30153				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30154				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30155		return result, validation.NewError("web.AppsClient", "StartContinuousWebJobSlot", err.Error())
30156	}
30157
30158	req, err := client.StartContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
30159	if err != nil {
30160		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", nil, "Failure preparing request")
30161		return
30162	}
30163
30164	resp, err := client.StartContinuousWebJobSlotSender(req)
30165	if err != nil {
30166		result.Response = resp
30167		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure sending request")
30168		return
30169	}
30170
30171	result, err = client.StartContinuousWebJobSlotResponder(resp)
30172	if err != nil {
30173		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure responding to request")
30174		return
30175	}
30176
30177	return
30178}
30179
30180// StartContinuousWebJobSlotPreparer prepares the StartContinuousWebJobSlot request.
30181func (client AppsClient) StartContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
30182	pathParameters := map[string]interface{}{
30183		"name":              autorest.Encode("path", name),
30184		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30185		"slot":              autorest.Encode("path", slot),
30186		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30187		"webJobName":        autorest.Encode("path", webJobName),
30188	}
30189
30190	const APIVersion = "2020-09-01"
30191	queryParameters := map[string]interface{}{
30192		"api-version": APIVersion,
30193	}
30194
30195	preparer := autorest.CreatePreparer(
30196		autorest.AsPost(),
30197		autorest.WithBaseURL(client.BaseURI),
30198		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start", pathParameters),
30199		autorest.WithQueryParameters(queryParameters))
30200	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30201}
30202
30203// StartContinuousWebJobSlotSender sends the StartContinuousWebJobSlot request. The method will close the
30204// http.Response Body if it receives an error.
30205func (client AppsClient) StartContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
30206	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30207}
30208
30209// StartContinuousWebJobSlotResponder handles the response to the StartContinuousWebJobSlot request. The method always
30210// closes the http.Response Body.
30211func (client AppsClient) StartContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30212	err = autorest.Respond(
30213		resp,
30214		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
30215		autorest.ByClosing())
30216	result.Response = resp
30217	return
30218}
30219
30220// StartNetworkTrace description for Start capturing network packets for the site.
30221// Parameters:
30222// resourceGroupName - name of the resource group to which the resource belongs.
30223// name - the name of the web app.
30224// durationInSeconds - the duration to keep capturing in seconds.
30225// maxFrameLength - the maximum frame length in bytes (Optional).
30226// sasURL - the Blob URL to store capture file.
30227func (client AppsClient) StartNetworkTrace(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartNetworkTraceFuture, err error) {
30228	if tracing.IsEnabled() {
30229		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartNetworkTrace")
30230		defer func() {
30231			sc := -1
30232			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30233				sc = result.FutureAPI.Response().StatusCode
30234			}
30235			tracing.EndSpan(ctx, sc, err)
30236		}()
30237	}
30238	if err := validation.Validate([]validation.Validation{
30239		{TargetValue: resourceGroupName,
30240			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30241				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30242				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30243		return result, validation.NewError("web.AppsClient", "StartNetworkTrace", err.Error())
30244	}
30245
30246	req, err := client.StartNetworkTracePreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
30247	if err != nil {
30248		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTrace", nil, "Failure preparing request")
30249		return
30250	}
30251
30252	result, err = client.StartNetworkTraceSender(req)
30253	if err != nil {
30254		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTrace", nil, "Failure sending request")
30255		return
30256	}
30257
30258	return
30259}
30260
30261// StartNetworkTracePreparer prepares the StartNetworkTrace request.
30262func (client AppsClient) StartNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
30263	pathParameters := map[string]interface{}{
30264		"name":              autorest.Encode("path", name),
30265		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30266		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30267	}
30268
30269	const APIVersion = "2020-09-01"
30270	queryParameters := map[string]interface{}{
30271		"api-version": APIVersion,
30272	}
30273	if durationInSeconds != nil {
30274		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
30275	}
30276	if maxFrameLength != nil {
30277		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
30278	}
30279	if len(sasURL) > 0 {
30280		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
30281	}
30282
30283	preparer := autorest.CreatePreparer(
30284		autorest.AsPost(),
30285		autorest.WithBaseURL(client.BaseURI),
30286		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace", pathParameters),
30287		autorest.WithQueryParameters(queryParameters))
30288	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30289}
30290
30291// StartNetworkTraceSender sends the StartNetworkTrace request. The method will close the
30292// http.Response Body if it receives an error.
30293func (client AppsClient) StartNetworkTraceSender(req *http.Request) (future AppsStartNetworkTraceFuture, err error) {
30294	var resp *http.Response
30295	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30296	if err != nil {
30297		return
30298	}
30299	var azf azure.Future
30300	azf, err = azure.NewFutureFromResponse(resp)
30301	future.FutureAPI = &azf
30302	future.Result = func(client AppsClient) (lnt ListNetworkTrace, err error) {
30303		var done bool
30304		done, err = future.DoneWithContext(context.Background(), client)
30305		if err != nil {
30306			err = autorest.NewErrorWithError(err, "web.AppsStartNetworkTraceFuture", "Result", future.Response(), "Polling failure")
30307			return
30308		}
30309		if !done {
30310			err = azure.NewAsyncOpIncompleteError("web.AppsStartNetworkTraceFuture")
30311			return
30312		}
30313		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30314		lnt.Response.Response, err = future.GetResult(sender)
30315		if lnt.Response.Response == nil && err == nil {
30316			err = autorest.NewErrorWithError(err, "web.AppsStartNetworkTraceFuture", "Result", nil, "received nil response and error")
30317		}
30318		if err == nil && lnt.Response.Response.StatusCode != http.StatusNoContent {
30319			lnt, err = client.StartNetworkTraceResponder(lnt.Response.Response)
30320			if err != nil {
30321				err = autorest.NewErrorWithError(err, "web.AppsStartNetworkTraceFuture", "Result", lnt.Response.Response, "Failure responding to request")
30322			}
30323		}
30324		return
30325	}
30326	return
30327}
30328
30329// StartNetworkTraceResponder handles the response to the StartNetworkTrace request. The method always
30330// closes the http.Response Body.
30331func (client AppsClient) StartNetworkTraceResponder(resp *http.Response) (result ListNetworkTrace, err error) {
30332	err = autorest.Respond(
30333		resp,
30334		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30335		autorest.ByUnmarshallingJSON(&result),
30336		autorest.ByClosing())
30337	result.Response = autorest.Response{Response: resp}
30338	return
30339}
30340
30341// StartNetworkTraceSlot description for Start capturing network packets for the site.
30342// Parameters:
30343// resourceGroupName - name of the resource group to which the resource belongs.
30344// name - the name of the web app.
30345// slot - the name of the slot for this web app.
30346// durationInSeconds - the duration to keep capturing in seconds.
30347// maxFrameLength - the maximum frame length in bytes (Optional).
30348// sasURL - the Blob URL to store capture file.
30349func (client AppsClient) StartNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartNetworkTraceSlotFuture, err error) {
30350	if tracing.IsEnabled() {
30351		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartNetworkTraceSlot")
30352		defer func() {
30353			sc := -1
30354			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30355				sc = result.FutureAPI.Response().StatusCode
30356			}
30357			tracing.EndSpan(ctx, sc, err)
30358		}()
30359	}
30360	if err := validation.Validate([]validation.Validation{
30361		{TargetValue: resourceGroupName,
30362			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30363				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30364				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30365		return result, validation.NewError("web.AppsClient", "StartNetworkTraceSlot", err.Error())
30366	}
30367
30368	req, err := client.StartNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
30369	if err != nil {
30370		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTraceSlot", nil, "Failure preparing request")
30371		return
30372	}
30373
30374	result, err = client.StartNetworkTraceSlotSender(req)
30375	if err != nil {
30376		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartNetworkTraceSlot", nil, "Failure sending request")
30377		return
30378	}
30379
30380	return
30381}
30382
30383// StartNetworkTraceSlotPreparer prepares the StartNetworkTraceSlot request.
30384func (client AppsClient) StartNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
30385	pathParameters := map[string]interface{}{
30386		"name":              autorest.Encode("path", name),
30387		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30388		"slot":              autorest.Encode("path", slot),
30389		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30390	}
30391
30392	const APIVersion = "2020-09-01"
30393	queryParameters := map[string]interface{}{
30394		"api-version": APIVersion,
30395	}
30396	if durationInSeconds != nil {
30397		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
30398	}
30399	if maxFrameLength != nil {
30400		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
30401	}
30402	if len(sasURL) > 0 {
30403		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
30404	}
30405
30406	preparer := autorest.CreatePreparer(
30407		autorest.AsPost(),
30408		autorest.WithBaseURL(client.BaseURI),
30409		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace", pathParameters),
30410		autorest.WithQueryParameters(queryParameters))
30411	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30412}
30413
30414// StartNetworkTraceSlotSender sends the StartNetworkTraceSlot request. The method will close the
30415// http.Response Body if it receives an error.
30416func (client AppsClient) StartNetworkTraceSlotSender(req *http.Request) (future AppsStartNetworkTraceSlotFuture, err error) {
30417	var resp *http.Response
30418	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30419	if err != nil {
30420		return
30421	}
30422	var azf azure.Future
30423	azf, err = azure.NewFutureFromResponse(resp)
30424	future.FutureAPI = &azf
30425	future.Result = func(client AppsClient) (lnt ListNetworkTrace, err error) {
30426		var done bool
30427		done, err = future.DoneWithContext(context.Background(), client)
30428		if err != nil {
30429			err = autorest.NewErrorWithError(err, "web.AppsStartNetworkTraceSlotFuture", "Result", future.Response(), "Polling failure")
30430			return
30431		}
30432		if !done {
30433			err = azure.NewAsyncOpIncompleteError("web.AppsStartNetworkTraceSlotFuture")
30434			return
30435		}
30436		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30437		lnt.Response.Response, err = future.GetResult(sender)
30438		if lnt.Response.Response == nil && err == nil {
30439			err = autorest.NewErrorWithError(err, "web.AppsStartNetworkTraceSlotFuture", "Result", nil, "received nil response and error")
30440		}
30441		if err == nil && lnt.Response.Response.StatusCode != http.StatusNoContent {
30442			lnt, err = client.StartNetworkTraceSlotResponder(lnt.Response.Response)
30443			if err != nil {
30444				err = autorest.NewErrorWithError(err, "web.AppsStartNetworkTraceSlotFuture", "Result", lnt.Response.Response, "Failure responding to request")
30445			}
30446		}
30447		return
30448	}
30449	return
30450}
30451
30452// StartNetworkTraceSlotResponder handles the response to the StartNetworkTraceSlot request. The method always
30453// closes the http.Response Body.
30454func (client AppsClient) StartNetworkTraceSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
30455	err = autorest.Respond(
30456		resp,
30457		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30458		autorest.ByUnmarshallingJSON(&result),
30459		autorest.ByClosing())
30460	result.Response = autorest.Response{Response: resp}
30461	return
30462}
30463
30464// StartSlot description for Starts an app (or deployment slot, if specified).
30465// Parameters:
30466// resourceGroupName - name of the resource group to which the resource belongs.
30467// name - name of the app.
30468// slot - name of the deployment slot. If a slot is not specified, the API will start the production slot.
30469func (client AppsClient) StartSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
30470	if tracing.IsEnabled() {
30471		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartSlot")
30472		defer func() {
30473			sc := -1
30474			if result.Response != nil {
30475				sc = result.Response.StatusCode
30476			}
30477			tracing.EndSpan(ctx, sc, err)
30478		}()
30479	}
30480	if err := validation.Validate([]validation.Validation{
30481		{TargetValue: resourceGroupName,
30482			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30483				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30484				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30485		return result, validation.NewError("web.AppsClient", "StartSlot", err.Error())
30486	}
30487
30488	req, err := client.StartSlotPreparer(ctx, resourceGroupName, name, slot)
30489	if err != nil {
30490		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", nil, "Failure preparing request")
30491		return
30492	}
30493
30494	resp, err := client.StartSlotSender(req)
30495	if err != nil {
30496		result.Response = resp
30497		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", resp, "Failure sending request")
30498		return
30499	}
30500
30501	result, err = client.StartSlotResponder(resp)
30502	if err != nil {
30503		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartSlot", resp, "Failure responding to request")
30504		return
30505	}
30506
30507	return
30508}
30509
30510// StartSlotPreparer prepares the StartSlot request.
30511func (client AppsClient) StartSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
30512	pathParameters := map[string]interface{}{
30513		"name":              autorest.Encode("path", name),
30514		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30515		"slot":              autorest.Encode("path", slot),
30516		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30517	}
30518
30519	const APIVersion = "2020-09-01"
30520	queryParameters := map[string]interface{}{
30521		"api-version": APIVersion,
30522	}
30523
30524	preparer := autorest.CreatePreparer(
30525		autorest.AsPost(),
30526		autorest.WithBaseURL(client.BaseURI),
30527		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start", pathParameters),
30528		autorest.WithQueryParameters(queryParameters))
30529	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30530}
30531
30532// StartSlotSender sends the StartSlot request. The method will close the
30533// http.Response Body if it receives an error.
30534func (client AppsClient) StartSlotSender(req *http.Request) (*http.Response, error) {
30535	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30536}
30537
30538// StartSlotResponder handles the response to the StartSlot request. The method always
30539// closes the http.Response Body.
30540func (client AppsClient) StartSlotResponder(resp *http.Response) (result autorest.Response, err error) {
30541	err = autorest.Respond(
30542		resp,
30543		azure.WithErrorUnlessStatusCode(http.StatusOK),
30544		autorest.ByClosing())
30545	result.Response = resp
30546	return
30547}
30548
30549// StartWebSiteNetworkTrace description for Start capturing network packets for the site (To be deprecated).
30550// Parameters:
30551// resourceGroupName - name of the resource group to which the resource belongs.
30552// name - the name of the web app.
30553// durationInSeconds - the duration to keep capturing in seconds.
30554// maxFrameLength - the maximum frame length in bytes (Optional).
30555// sasURL - the Blob URL to store capture file.
30556func (client AppsClient) StartWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) {
30557	if tracing.IsEnabled() {
30558		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTrace")
30559		defer func() {
30560			sc := -1
30561			if result.Response.Response != nil {
30562				sc = result.Response.Response.StatusCode
30563			}
30564			tracing.EndSpan(ctx, sc, err)
30565		}()
30566	}
30567	if err := validation.Validate([]validation.Validation{
30568		{TargetValue: resourceGroupName,
30569			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30570				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30571				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30572		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTrace", err.Error())
30573	}
30574
30575	req, err := client.StartWebSiteNetworkTracePreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
30576	if err != nil {
30577		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", nil, "Failure preparing request")
30578		return
30579	}
30580
30581	resp, err := client.StartWebSiteNetworkTraceSender(req)
30582	if err != nil {
30583		result.Response = autorest.Response{Response: resp}
30584		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", resp, "Failure sending request")
30585		return
30586	}
30587
30588	result, err = client.StartWebSiteNetworkTraceResponder(resp)
30589	if err != nil {
30590		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTrace", resp, "Failure responding to request")
30591		return
30592	}
30593
30594	return
30595}
30596
30597// StartWebSiteNetworkTracePreparer prepares the StartWebSiteNetworkTrace request.
30598func (client AppsClient) StartWebSiteNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
30599	pathParameters := map[string]interface{}{
30600		"name":              autorest.Encode("path", name),
30601		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30602		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30603	}
30604
30605	const APIVersion = "2020-09-01"
30606	queryParameters := map[string]interface{}{
30607		"api-version": APIVersion,
30608	}
30609	if durationInSeconds != nil {
30610		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
30611	}
30612	if maxFrameLength != nil {
30613		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
30614	}
30615	if len(sasURL) > 0 {
30616		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
30617	}
30618
30619	preparer := autorest.CreatePreparer(
30620		autorest.AsPost(),
30621		autorest.WithBaseURL(client.BaseURI),
30622		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start", pathParameters),
30623		autorest.WithQueryParameters(queryParameters))
30624	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30625}
30626
30627// StartWebSiteNetworkTraceSender sends the StartWebSiteNetworkTrace request. The method will close the
30628// http.Response Body if it receives an error.
30629func (client AppsClient) StartWebSiteNetworkTraceSender(req *http.Request) (*http.Response, error) {
30630	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30631}
30632
30633// StartWebSiteNetworkTraceResponder handles the response to the StartWebSiteNetworkTrace request. The method always
30634// closes the http.Response Body.
30635func (client AppsClient) StartWebSiteNetworkTraceResponder(resp *http.Response) (result String, err error) {
30636	err = autorest.Respond(
30637		resp,
30638		azure.WithErrorUnlessStatusCode(http.StatusOK),
30639		autorest.ByUnmarshallingJSON(&result.Value),
30640		autorest.ByClosing())
30641	result.Response = autorest.Response{Response: resp}
30642	return
30643}
30644
30645// StartWebSiteNetworkTraceOperation description for Start capturing network packets for the site.
30646// Parameters:
30647// resourceGroupName - name of the resource group to which the resource belongs.
30648// name - the name of the web app.
30649// durationInSeconds - the duration to keep capturing in seconds.
30650// maxFrameLength - the maximum frame length in bytes (Optional).
30651// sasURL - the Blob URL to store capture file.
30652func (client AppsClient) StartWebSiteNetworkTraceOperation(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartWebSiteNetworkTraceOperationFuture, err error) {
30653	if tracing.IsEnabled() {
30654		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceOperation")
30655		defer func() {
30656			sc := -1
30657			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30658				sc = result.FutureAPI.Response().StatusCode
30659			}
30660			tracing.EndSpan(ctx, sc, err)
30661		}()
30662	}
30663	if err := validation.Validate([]validation.Validation{
30664		{TargetValue: resourceGroupName,
30665			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30666				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30667				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30668		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceOperation", err.Error())
30669	}
30670
30671	req, err := client.StartWebSiteNetworkTraceOperationPreparer(ctx, resourceGroupName, name, durationInSeconds, maxFrameLength, sasURL)
30672	if err != nil {
30673		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperation", nil, "Failure preparing request")
30674		return
30675	}
30676
30677	result, err = client.StartWebSiteNetworkTraceOperationSender(req)
30678	if err != nil {
30679		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperation", nil, "Failure sending request")
30680		return
30681	}
30682
30683	return
30684}
30685
30686// StartWebSiteNetworkTraceOperationPreparer prepares the StartWebSiteNetworkTraceOperation request.
30687func (client AppsClient) StartWebSiteNetworkTraceOperationPreparer(ctx context.Context, resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
30688	pathParameters := map[string]interface{}{
30689		"name":              autorest.Encode("path", name),
30690		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30691		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30692	}
30693
30694	const APIVersion = "2020-09-01"
30695	queryParameters := map[string]interface{}{
30696		"api-version": APIVersion,
30697	}
30698	if durationInSeconds != nil {
30699		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
30700	}
30701	if maxFrameLength != nil {
30702		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
30703	}
30704	if len(sasURL) > 0 {
30705		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
30706	}
30707
30708	preparer := autorest.CreatePreparer(
30709		autorest.AsPost(),
30710		autorest.WithBaseURL(client.BaseURI),
30711		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation", pathParameters),
30712		autorest.WithQueryParameters(queryParameters))
30713	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30714}
30715
30716// StartWebSiteNetworkTraceOperationSender sends the StartWebSiteNetworkTraceOperation request. The method will close the
30717// http.Response Body if it receives an error.
30718func (client AppsClient) StartWebSiteNetworkTraceOperationSender(req *http.Request) (future AppsStartWebSiteNetworkTraceOperationFuture, err error) {
30719	var resp *http.Response
30720	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30721	if err != nil {
30722		return
30723	}
30724	var azf azure.Future
30725	azf, err = azure.NewFutureFromResponse(resp)
30726	future.FutureAPI = &azf
30727	future.Result = func(client AppsClient) (lnt ListNetworkTrace, err error) {
30728		var done bool
30729		done, err = future.DoneWithContext(context.Background(), client)
30730		if err != nil {
30731			err = autorest.NewErrorWithError(err, "web.AppsStartWebSiteNetworkTraceOperationFuture", "Result", future.Response(), "Polling failure")
30732			return
30733		}
30734		if !done {
30735			err = azure.NewAsyncOpIncompleteError("web.AppsStartWebSiteNetworkTraceOperationFuture")
30736			return
30737		}
30738		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30739		lnt.Response.Response, err = future.GetResult(sender)
30740		if lnt.Response.Response == nil && err == nil {
30741			err = autorest.NewErrorWithError(err, "web.AppsStartWebSiteNetworkTraceOperationFuture", "Result", nil, "received nil response and error")
30742		}
30743		if err == nil && lnt.Response.Response.StatusCode != http.StatusNoContent {
30744			lnt, err = client.StartWebSiteNetworkTraceOperationResponder(lnt.Response.Response)
30745			if err != nil {
30746				err = autorest.NewErrorWithError(err, "web.AppsStartWebSiteNetworkTraceOperationFuture", "Result", lnt.Response.Response, "Failure responding to request")
30747			}
30748		}
30749		return
30750	}
30751	return
30752}
30753
30754// StartWebSiteNetworkTraceOperationResponder handles the response to the StartWebSiteNetworkTraceOperation request. The method always
30755// closes the http.Response Body.
30756func (client AppsClient) StartWebSiteNetworkTraceOperationResponder(resp *http.Response) (result ListNetworkTrace, err error) {
30757	err = autorest.Respond(
30758		resp,
30759		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30760		autorest.ByUnmarshallingJSON(&result),
30761		autorest.ByClosing())
30762	result.Response = autorest.Response{Response: resp}
30763	return
30764}
30765
30766// StartWebSiteNetworkTraceOperationSlot description for Start capturing network packets for the site.
30767// Parameters:
30768// resourceGroupName - name of the resource group to which the resource belongs.
30769// name - the name of the web app.
30770// slot - the name of the slot for this web app.
30771// durationInSeconds - the duration to keep capturing in seconds.
30772// maxFrameLength - the maximum frame length in bytes (Optional).
30773// sasURL - the Blob URL to store capture file.
30774func (client AppsClient) StartWebSiteNetworkTraceOperationSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result AppsStartWebSiteNetworkTraceOperationSlotFuture, err error) {
30775	if tracing.IsEnabled() {
30776		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceOperationSlot")
30777		defer func() {
30778			sc := -1
30779			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
30780				sc = result.FutureAPI.Response().StatusCode
30781			}
30782			tracing.EndSpan(ctx, sc, err)
30783		}()
30784	}
30785	if err := validation.Validate([]validation.Validation{
30786		{TargetValue: resourceGroupName,
30787			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30788				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30789				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30790		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", err.Error())
30791	}
30792
30793	req, err := client.StartWebSiteNetworkTraceOperationSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
30794	if err != nil {
30795		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", nil, "Failure preparing request")
30796		return
30797	}
30798
30799	result, err = client.StartWebSiteNetworkTraceOperationSlotSender(req)
30800	if err != nil {
30801		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceOperationSlot", nil, "Failure sending request")
30802		return
30803	}
30804
30805	return
30806}
30807
30808// StartWebSiteNetworkTraceOperationSlotPreparer prepares the StartWebSiteNetworkTraceOperationSlot request.
30809func (client AppsClient) StartWebSiteNetworkTraceOperationSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
30810	pathParameters := map[string]interface{}{
30811		"name":              autorest.Encode("path", name),
30812		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30813		"slot":              autorest.Encode("path", slot),
30814		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30815	}
30816
30817	const APIVersion = "2020-09-01"
30818	queryParameters := map[string]interface{}{
30819		"api-version": APIVersion,
30820	}
30821	if durationInSeconds != nil {
30822		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
30823	}
30824	if maxFrameLength != nil {
30825		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
30826	}
30827	if len(sasURL) > 0 {
30828		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
30829	}
30830
30831	preparer := autorest.CreatePreparer(
30832		autorest.AsPost(),
30833		autorest.WithBaseURL(client.BaseURI),
30834		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation", pathParameters),
30835		autorest.WithQueryParameters(queryParameters))
30836	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30837}
30838
30839// StartWebSiteNetworkTraceOperationSlotSender sends the StartWebSiteNetworkTraceOperationSlot request. The method will close the
30840// http.Response Body if it receives an error.
30841func (client AppsClient) StartWebSiteNetworkTraceOperationSlotSender(req *http.Request) (future AppsStartWebSiteNetworkTraceOperationSlotFuture, err error) {
30842	var resp *http.Response
30843	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
30844	if err != nil {
30845		return
30846	}
30847	var azf azure.Future
30848	azf, err = azure.NewFutureFromResponse(resp)
30849	future.FutureAPI = &azf
30850	future.Result = func(client AppsClient) (lnt ListNetworkTrace, err error) {
30851		var done bool
30852		done, err = future.DoneWithContext(context.Background(), client)
30853		if err != nil {
30854			err = autorest.NewErrorWithError(err, "web.AppsStartWebSiteNetworkTraceOperationSlotFuture", "Result", future.Response(), "Polling failure")
30855			return
30856		}
30857		if !done {
30858			err = azure.NewAsyncOpIncompleteError("web.AppsStartWebSiteNetworkTraceOperationSlotFuture")
30859			return
30860		}
30861		sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
30862		lnt.Response.Response, err = future.GetResult(sender)
30863		if lnt.Response.Response == nil && err == nil {
30864			err = autorest.NewErrorWithError(err, "web.AppsStartWebSiteNetworkTraceOperationSlotFuture", "Result", nil, "received nil response and error")
30865		}
30866		if err == nil && lnt.Response.Response.StatusCode != http.StatusNoContent {
30867			lnt, err = client.StartWebSiteNetworkTraceOperationSlotResponder(lnt.Response.Response)
30868			if err != nil {
30869				err = autorest.NewErrorWithError(err, "web.AppsStartWebSiteNetworkTraceOperationSlotFuture", "Result", lnt.Response.Response, "Failure responding to request")
30870			}
30871		}
30872		return
30873	}
30874	return
30875}
30876
30877// StartWebSiteNetworkTraceOperationSlotResponder handles the response to the StartWebSiteNetworkTraceOperationSlot request. The method always
30878// closes the http.Response Body.
30879func (client AppsClient) StartWebSiteNetworkTraceOperationSlotResponder(resp *http.Response) (result ListNetworkTrace, err error) {
30880	err = autorest.Respond(
30881		resp,
30882		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
30883		autorest.ByUnmarshallingJSON(&result),
30884		autorest.ByClosing())
30885	result.Response = autorest.Response{Response: resp}
30886	return
30887}
30888
30889// StartWebSiteNetworkTraceSlot description for Start capturing network packets for the site (To be deprecated).
30890// Parameters:
30891// resourceGroupName - name of the resource group to which the resource belongs.
30892// name - the name of the web app.
30893// slot - the name of the slot for this web app.
30894// durationInSeconds - the duration to keep capturing in seconds.
30895// maxFrameLength - the maximum frame length in bytes (Optional).
30896// sasURL - the Blob URL to store capture file.
30897func (client AppsClient) StartWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) {
30898	if tracing.IsEnabled() {
30899		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StartWebSiteNetworkTraceSlot")
30900		defer func() {
30901			sc := -1
30902			if result.Response.Response != nil {
30903				sc = result.Response.Response.StatusCode
30904			}
30905			tracing.EndSpan(ctx, sc, err)
30906		}()
30907	}
30908	if err := validation.Validate([]validation.Validation{
30909		{TargetValue: resourceGroupName,
30910			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
30911				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
30912				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
30913		return result, validation.NewError("web.AppsClient", "StartWebSiteNetworkTraceSlot", err.Error())
30914	}
30915
30916	req, err := client.StartWebSiteNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasURL)
30917	if err != nil {
30918		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", nil, "Failure preparing request")
30919		return
30920	}
30921
30922	resp, err := client.StartWebSiteNetworkTraceSlotSender(req)
30923	if err != nil {
30924		result.Response = autorest.Response{Response: resp}
30925		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", resp, "Failure sending request")
30926		return
30927	}
30928
30929	result, err = client.StartWebSiteNetworkTraceSlotResponder(resp)
30930	if err != nil {
30931		err = autorest.NewErrorWithError(err, "web.AppsClient", "StartWebSiteNetworkTraceSlot", resp, "Failure responding to request")
30932		return
30933	}
30934
30935	return
30936}
30937
30938// StartWebSiteNetworkTraceSlotPreparer prepares the StartWebSiteNetworkTraceSlot request.
30939func (client AppsClient) StartWebSiteNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (*http.Request, error) {
30940	pathParameters := map[string]interface{}{
30941		"name":              autorest.Encode("path", name),
30942		"resourceGroupName": autorest.Encode("path", resourceGroupName),
30943		"slot":              autorest.Encode("path", slot),
30944		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
30945	}
30946
30947	const APIVersion = "2020-09-01"
30948	queryParameters := map[string]interface{}{
30949		"api-version": APIVersion,
30950	}
30951	if durationInSeconds != nil {
30952		queryParameters["durationInSeconds"] = autorest.Encode("query", *durationInSeconds)
30953	}
30954	if maxFrameLength != nil {
30955		queryParameters["maxFrameLength"] = autorest.Encode("query", *maxFrameLength)
30956	}
30957	if len(sasURL) > 0 {
30958		queryParameters["sasUrl"] = autorest.Encode("query", sasURL)
30959	}
30960
30961	preparer := autorest.CreatePreparer(
30962		autorest.AsPost(),
30963		autorest.WithBaseURL(client.BaseURI),
30964		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start", pathParameters),
30965		autorest.WithQueryParameters(queryParameters))
30966	return preparer.Prepare((&http.Request{}).WithContext(ctx))
30967}
30968
30969// StartWebSiteNetworkTraceSlotSender sends the StartWebSiteNetworkTraceSlot request. The method will close the
30970// http.Response Body if it receives an error.
30971func (client AppsClient) StartWebSiteNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
30972	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
30973}
30974
30975// StartWebSiteNetworkTraceSlotResponder handles the response to the StartWebSiteNetworkTraceSlot request. The method always
30976// closes the http.Response Body.
30977func (client AppsClient) StartWebSiteNetworkTraceSlotResponder(resp *http.Response) (result String, err error) {
30978	err = autorest.Respond(
30979		resp,
30980		azure.WithErrorUnlessStatusCode(http.StatusOK),
30981		autorest.ByUnmarshallingJSON(&result.Value),
30982		autorest.ByClosing())
30983	result.Response = autorest.Response{Response: resp}
30984	return
30985}
30986
30987// Stop description for Stops an app (or deployment slot, if specified).
30988// Parameters:
30989// resourceGroupName - name of the resource group to which the resource belongs.
30990// name - name of the app.
30991func (client AppsClient) Stop(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
30992	if tracing.IsEnabled() {
30993		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Stop")
30994		defer func() {
30995			sc := -1
30996			if result.Response != nil {
30997				sc = result.Response.StatusCode
30998			}
30999			tracing.EndSpan(ctx, sc, err)
31000		}()
31001	}
31002	if err := validation.Validate([]validation.Validation{
31003		{TargetValue: resourceGroupName,
31004			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31005				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31006				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31007		return result, validation.NewError("web.AppsClient", "Stop", err.Error())
31008	}
31009
31010	req, err := client.StopPreparer(ctx, resourceGroupName, name)
31011	if err != nil {
31012		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", nil, "Failure preparing request")
31013		return
31014	}
31015
31016	resp, err := client.StopSender(req)
31017	if err != nil {
31018		result.Response = resp
31019		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", resp, "Failure sending request")
31020		return
31021	}
31022
31023	result, err = client.StopResponder(resp)
31024	if err != nil {
31025		err = autorest.NewErrorWithError(err, "web.AppsClient", "Stop", resp, "Failure responding to request")
31026		return
31027	}
31028
31029	return
31030}
31031
31032// StopPreparer prepares the Stop request.
31033func (client AppsClient) StopPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31034	pathParameters := map[string]interface{}{
31035		"name":              autorest.Encode("path", name),
31036		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31037		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31038	}
31039
31040	const APIVersion = "2020-09-01"
31041	queryParameters := map[string]interface{}{
31042		"api-version": APIVersion,
31043	}
31044
31045	preparer := autorest.CreatePreparer(
31046		autorest.AsPost(),
31047		autorest.WithBaseURL(client.BaseURI),
31048		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop", pathParameters),
31049		autorest.WithQueryParameters(queryParameters))
31050	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31051}
31052
31053// StopSender sends the Stop request. The method will close the
31054// http.Response Body if it receives an error.
31055func (client AppsClient) StopSender(req *http.Request) (*http.Response, error) {
31056	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31057}
31058
31059// StopResponder handles the response to the Stop request. The method always
31060// closes the http.Response Body.
31061func (client AppsClient) StopResponder(resp *http.Response) (result autorest.Response, err error) {
31062	err = autorest.Respond(
31063		resp,
31064		azure.WithErrorUnlessStatusCode(http.StatusOK),
31065		autorest.ByClosing())
31066	result.Response = resp
31067	return
31068}
31069
31070// StopContinuousWebJob description for Stop a continuous web job for an app, or a deployment slot.
31071// Parameters:
31072// resourceGroupName - name of the resource group to which the resource belongs.
31073// name - site name.
31074// webJobName - name of Web Job.
31075func (client AppsClient) StopContinuousWebJob(ctx context.Context, resourceGroupName string, name string, webJobName string) (result autorest.Response, err error) {
31076	if tracing.IsEnabled() {
31077		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopContinuousWebJob")
31078		defer func() {
31079			sc := -1
31080			if result.Response != nil {
31081				sc = result.Response.StatusCode
31082			}
31083			tracing.EndSpan(ctx, sc, err)
31084		}()
31085	}
31086	if err := validation.Validate([]validation.Validation{
31087		{TargetValue: resourceGroupName,
31088			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31089				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31090				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31091		return result, validation.NewError("web.AppsClient", "StopContinuousWebJob", err.Error())
31092	}
31093
31094	req, err := client.StopContinuousWebJobPreparer(ctx, resourceGroupName, name, webJobName)
31095	if err != nil {
31096		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", nil, "Failure preparing request")
31097		return
31098	}
31099
31100	resp, err := client.StopContinuousWebJobSender(req)
31101	if err != nil {
31102		result.Response = resp
31103		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure sending request")
31104		return
31105	}
31106
31107	result, err = client.StopContinuousWebJobResponder(resp)
31108	if err != nil {
31109		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure responding to request")
31110		return
31111	}
31112
31113	return
31114}
31115
31116// StopContinuousWebJobPreparer prepares the StopContinuousWebJob request.
31117func (client AppsClient) StopContinuousWebJobPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string) (*http.Request, error) {
31118	pathParameters := map[string]interface{}{
31119		"name":              autorest.Encode("path", name),
31120		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31121		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31122		"webJobName":        autorest.Encode("path", webJobName),
31123	}
31124
31125	const APIVersion = "2020-09-01"
31126	queryParameters := map[string]interface{}{
31127		"api-version": APIVersion,
31128	}
31129
31130	preparer := autorest.CreatePreparer(
31131		autorest.AsPost(),
31132		autorest.WithBaseURL(client.BaseURI),
31133		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop", pathParameters),
31134		autorest.WithQueryParameters(queryParameters))
31135	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31136}
31137
31138// StopContinuousWebJobSender sends the StopContinuousWebJob request. The method will close the
31139// http.Response Body if it receives an error.
31140func (client AppsClient) StopContinuousWebJobSender(req *http.Request) (*http.Response, error) {
31141	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31142}
31143
31144// StopContinuousWebJobResponder handles the response to the StopContinuousWebJob request. The method always
31145// closes the http.Response Body.
31146func (client AppsClient) StopContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) {
31147	err = autorest.Respond(
31148		resp,
31149		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
31150		autorest.ByClosing())
31151	result.Response = resp
31152	return
31153}
31154
31155// StopContinuousWebJobSlot description for Stop a continuous web job for an app, or a deployment slot.
31156// Parameters:
31157// resourceGroupName - name of the resource group to which the resource belongs.
31158// name - site name.
31159// webJobName - name of Web Job.
31160// slot - name of the deployment slot. If a slot is not specified, the API deletes a deployment for the
31161// production slot.
31162func (client AppsClient) StopContinuousWebJobSlot(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (result autorest.Response, err error) {
31163	if tracing.IsEnabled() {
31164		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopContinuousWebJobSlot")
31165		defer func() {
31166			sc := -1
31167			if result.Response != nil {
31168				sc = result.Response.StatusCode
31169			}
31170			tracing.EndSpan(ctx, sc, err)
31171		}()
31172	}
31173	if err := validation.Validate([]validation.Validation{
31174		{TargetValue: resourceGroupName,
31175			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31176				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31177				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31178		return result, validation.NewError("web.AppsClient", "StopContinuousWebJobSlot", err.Error())
31179	}
31180
31181	req, err := client.StopContinuousWebJobSlotPreparer(ctx, resourceGroupName, name, webJobName, slot)
31182	if err != nil {
31183		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", nil, "Failure preparing request")
31184		return
31185	}
31186
31187	resp, err := client.StopContinuousWebJobSlotSender(req)
31188	if err != nil {
31189		result.Response = resp
31190		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure sending request")
31191		return
31192	}
31193
31194	result, err = client.StopContinuousWebJobSlotResponder(resp)
31195	if err != nil {
31196		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure responding to request")
31197		return
31198	}
31199
31200	return
31201}
31202
31203// StopContinuousWebJobSlotPreparer prepares the StopContinuousWebJobSlot request.
31204func (client AppsClient) StopContinuousWebJobSlotPreparer(ctx context.Context, resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) {
31205	pathParameters := map[string]interface{}{
31206		"name":              autorest.Encode("path", name),
31207		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31208		"slot":              autorest.Encode("path", slot),
31209		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31210		"webJobName":        autorest.Encode("path", webJobName),
31211	}
31212
31213	const APIVersion = "2020-09-01"
31214	queryParameters := map[string]interface{}{
31215		"api-version": APIVersion,
31216	}
31217
31218	preparer := autorest.CreatePreparer(
31219		autorest.AsPost(),
31220		autorest.WithBaseURL(client.BaseURI),
31221		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop", pathParameters),
31222		autorest.WithQueryParameters(queryParameters))
31223	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31224}
31225
31226// StopContinuousWebJobSlotSender sends the StopContinuousWebJobSlot request. The method will close the
31227// http.Response Body if it receives an error.
31228func (client AppsClient) StopContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) {
31229	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31230}
31231
31232// StopContinuousWebJobSlotResponder handles the response to the StopContinuousWebJobSlot request. The method always
31233// closes the http.Response Body.
31234func (client AppsClient) StopContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31235	err = autorest.Respond(
31236		resp,
31237		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound),
31238		autorest.ByClosing())
31239	result.Response = resp
31240	return
31241}
31242
31243// StopNetworkTrace description for Stop ongoing capturing network packets for the site.
31244// Parameters:
31245// resourceGroupName - name of the resource group to which the resource belongs.
31246// name - the name of the web app.
31247func (client AppsClient) StopNetworkTrace(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31248	if tracing.IsEnabled() {
31249		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopNetworkTrace")
31250		defer func() {
31251			sc := -1
31252			if result.Response != nil {
31253				sc = result.Response.StatusCode
31254			}
31255			tracing.EndSpan(ctx, sc, err)
31256		}()
31257	}
31258	if err := validation.Validate([]validation.Validation{
31259		{TargetValue: resourceGroupName,
31260			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31261				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31262				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31263		return result, validation.NewError("web.AppsClient", "StopNetworkTrace", err.Error())
31264	}
31265
31266	req, err := client.StopNetworkTracePreparer(ctx, resourceGroupName, name)
31267	if err != nil {
31268		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", nil, "Failure preparing request")
31269		return
31270	}
31271
31272	resp, err := client.StopNetworkTraceSender(req)
31273	if err != nil {
31274		result.Response = resp
31275		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", resp, "Failure sending request")
31276		return
31277	}
31278
31279	result, err = client.StopNetworkTraceResponder(resp)
31280	if err != nil {
31281		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTrace", resp, "Failure responding to request")
31282		return
31283	}
31284
31285	return
31286}
31287
31288// StopNetworkTracePreparer prepares the StopNetworkTrace request.
31289func (client AppsClient) StopNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31290	pathParameters := map[string]interface{}{
31291		"name":              autorest.Encode("path", name),
31292		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31293		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31294	}
31295
31296	const APIVersion = "2020-09-01"
31297	queryParameters := map[string]interface{}{
31298		"api-version": APIVersion,
31299	}
31300
31301	preparer := autorest.CreatePreparer(
31302		autorest.AsPost(),
31303		autorest.WithBaseURL(client.BaseURI),
31304		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace", pathParameters),
31305		autorest.WithQueryParameters(queryParameters))
31306	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31307}
31308
31309// StopNetworkTraceSender sends the StopNetworkTrace request. The method will close the
31310// http.Response Body if it receives an error.
31311func (client AppsClient) StopNetworkTraceSender(req *http.Request) (*http.Response, error) {
31312	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31313}
31314
31315// StopNetworkTraceResponder handles the response to the StopNetworkTrace request. The method always
31316// closes the http.Response Body.
31317func (client AppsClient) StopNetworkTraceResponder(resp *http.Response) (result autorest.Response, err error) {
31318	err = autorest.Respond(
31319		resp,
31320		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31321		autorest.ByClosing())
31322	result.Response = resp
31323	return
31324}
31325
31326// StopNetworkTraceSlot description for Stop ongoing capturing network packets for the site.
31327// Parameters:
31328// resourceGroupName - name of the resource group to which the resource belongs.
31329// name - the name of the web app.
31330// slot - the name of the slot for this web app.
31331func (client AppsClient) StopNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31332	if tracing.IsEnabled() {
31333		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopNetworkTraceSlot")
31334		defer func() {
31335			sc := -1
31336			if result.Response != nil {
31337				sc = result.Response.StatusCode
31338			}
31339			tracing.EndSpan(ctx, sc, err)
31340		}()
31341	}
31342	if err := validation.Validate([]validation.Validation{
31343		{TargetValue: resourceGroupName,
31344			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31345				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31346				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31347		return result, validation.NewError("web.AppsClient", "StopNetworkTraceSlot", err.Error())
31348	}
31349
31350	req, err := client.StopNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot)
31351	if err != nil {
31352		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", nil, "Failure preparing request")
31353		return
31354	}
31355
31356	resp, err := client.StopNetworkTraceSlotSender(req)
31357	if err != nil {
31358		result.Response = resp
31359		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", resp, "Failure sending request")
31360		return
31361	}
31362
31363	result, err = client.StopNetworkTraceSlotResponder(resp)
31364	if err != nil {
31365		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopNetworkTraceSlot", resp, "Failure responding to request")
31366		return
31367	}
31368
31369	return
31370}
31371
31372// StopNetworkTraceSlotPreparer prepares the StopNetworkTraceSlot request.
31373func (client AppsClient) StopNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
31374	pathParameters := map[string]interface{}{
31375		"name":              autorest.Encode("path", name),
31376		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31377		"slot":              autorest.Encode("path", slot),
31378		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31379	}
31380
31381	const APIVersion = "2020-09-01"
31382	queryParameters := map[string]interface{}{
31383		"api-version": APIVersion,
31384	}
31385
31386	preparer := autorest.CreatePreparer(
31387		autorest.AsPost(),
31388		autorest.WithBaseURL(client.BaseURI),
31389		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace", pathParameters),
31390		autorest.WithQueryParameters(queryParameters))
31391	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31392}
31393
31394// StopNetworkTraceSlotSender sends the StopNetworkTraceSlot request. The method will close the
31395// http.Response Body if it receives an error.
31396func (client AppsClient) StopNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
31397	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31398}
31399
31400// StopNetworkTraceSlotResponder handles the response to the StopNetworkTraceSlot request. The method always
31401// closes the http.Response Body.
31402func (client AppsClient) StopNetworkTraceSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31403	err = autorest.Respond(
31404		resp,
31405		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31406		autorest.ByClosing())
31407	result.Response = resp
31408	return
31409}
31410
31411// StopSlot description for Stops an app (or deployment slot, if specified).
31412// Parameters:
31413// resourceGroupName - name of the resource group to which the resource belongs.
31414// name - name of the app.
31415// slot - name of the deployment slot. If a slot is not specified, the API will stop the production slot.
31416func (client AppsClient) StopSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31417	if tracing.IsEnabled() {
31418		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopSlot")
31419		defer func() {
31420			sc := -1
31421			if result.Response != nil {
31422				sc = result.Response.StatusCode
31423			}
31424			tracing.EndSpan(ctx, sc, err)
31425		}()
31426	}
31427	if err := validation.Validate([]validation.Validation{
31428		{TargetValue: resourceGroupName,
31429			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31430				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31431				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31432		return result, validation.NewError("web.AppsClient", "StopSlot", err.Error())
31433	}
31434
31435	req, err := client.StopSlotPreparer(ctx, resourceGroupName, name, slot)
31436	if err != nil {
31437		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", nil, "Failure preparing request")
31438		return
31439	}
31440
31441	resp, err := client.StopSlotSender(req)
31442	if err != nil {
31443		result.Response = resp
31444		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", resp, "Failure sending request")
31445		return
31446	}
31447
31448	result, err = client.StopSlotResponder(resp)
31449	if err != nil {
31450		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopSlot", resp, "Failure responding to request")
31451		return
31452	}
31453
31454	return
31455}
31456
31457// StopSlotPreparer prepares the StopSlot request.
31458func (client AppsClient) StopSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
31459	pathParameters := map[string]interface{}{
31460		"name":              autorest.Encode("path", name),
31461		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31462		"slot":              autorest.Encode("path", slot),
31463		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31464	}
31465
31466	const APIVersion = "2020-09-01"
31467	queryParameters := map[string]interface{}{
31468		"api-version": APIVersion,
31469	}
31470
31471	preparer := autorest.CreatePreparer(
31472		autorest.AsPost(),
31473		autorest.WithBaseURL(client.BaseURI),
31474		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop", pathParameters),
31475		autorest.WithQueryParameters(queryParameters))
31476	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31477}
31478
31479// StopSlotSender sends the StopSlot request. The method will close the
31480// http.Response Body if it receives an error.
31481func (client AppsClient) StopSlotSender(req *http.Request) (*http.Response, error) {
31482	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31483}
31484
31485// StopSlotResponder handles the response to the StopSlot request. The method always
31486// closes the http.Response Body.
31487func (client AppsClient) StopSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31488	err = autorest.Respond(
31489		resp,
31490		azure.WithErrorUnlessStatusCode(http.StatusOK),
31491		autorest.ByClosing())
31492	result.Response = resp
31493	return
31494}
31495
31496// StopWebSiteNetworkTrace description for Stop ongoing capturing network packets for the site.
31497// Parameters:
31498// resourceGroupName - name of the resource group to which the resource belongs.
31499// name - the name of the web app.
31500func (client AppsClient) StopWebSiteNetworkTrace(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31501	if tracing.IsEnabled() {
31502		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopWebSiteNetworkTrace")
31503		defer func() {
31504			sc := -1
31505			if result.Response != nil {
31506				sc = result.Response.StatusCode
31507			}
31508			tracing.EndSpan(ctx, sc, err)
31509		}()
31510	}
31511	if err := validation.Validate([]validation.Validation{
31512		{TargetValue: resourceGroupName,
31513			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31514				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31515				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31516		return result, validation.NewError("web.AppsClient", "StopWebSiteNetworkTrace", err.Error())
31517	}
31518
31519	req, err := client.StopWebSiteNetworkTracePreparer(ctx, resourceGroupName, name)
31520	if err != nil {
31521		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", nil, "Failure preparing request")
31522		return
31523	}
31524
31525	resp, err := client.StopWebSiteNetworkTraceSender(req)
31526	if err != nil {
31527		result.Response = resp
31528		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", resp, "Failure sending request")
31529		return
31530	}
31531
31532	result, err = client.StopWebSiteNetworkTraceResponder(resp)
31533	if err != nil {
31534		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTrace", resp, "Failure responding to request")
31535		return
31536	}
31537
31538	return
31539}
31540
31541// StopWebSiteNetworkTracePreparer prepares the StopWebSiteNetworkTrace request.
31542func (client AppsClient) StopWebSiteNetworkTracePreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31543	pathParameters := map[string]interface{}{
31544		"name":              autorest.Encode("path", name),
31545		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31546		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31547	}
31548
31549	const APIVersion = "2020-09-01"
31550	queryParameters := map[string]interface{}{
31551		"api-version": APIVersion,
31552	}
31553
31554	preparer := autorest.CreatePreparer(
31555		autorest.AsPost(),
31556		autorest.WithBaseURL(client.BaseURI),
31557		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop", pathParameters),
31558		autorest.WithQueryParameters(queryParameters))
31559	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31560}
31561
31562// StopWebSiteNetworkTraceSender sends the StopWebSiteNetworkTrace request. The method will close the
31563// http.Response Body if it receives an error.
31564func (client AppsClient) StopWebSiteNetworkTraceSender(req *http.Request) (*http.Response, error) {
31565	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31566}
31567
31568// StopWebSiteNetworkTraceResponder handles the response to the StopWebSiteNetworkTrace request. The method always
31569// closes the http.Response Body.
31570func (client AppsClient) StopWebSiteNetworkTraceResponder(resp *http.Response) (result autorest.Response, err error) {
31571	err = autorest.Respond(
31572		resp,
31573		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31574		autorest.ByClosing())
31575	result.Response = resp
31576	return
31577}
31578
31579// StopWebSiteNetworkTraceSlot description for Stop ongoing capturing network packets for the site.
31580// Parameters:
31581// resourceGroupName - name of the resource group to which the resource belongs.
31582// name - the name of the web app.
31583// slot - the name of the slot for this web app.
31584func (client AppsClient) StopWebSiteNetworkTraceSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31585	if tracing.IsEnabled() {
31586		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.StopWebSiteNetworkTraceSlot")
31587		defer func() {
31588			sc := -1
31589			if result.Response != nil {
31590				sc = result.Response.StatusCode
31591			}
31592			tracing.EndSpan(ctx, sc, err)
31593		}()
31594	}
31595	if err := validation.Validate([]validation.Validation{
31596		{TargetValue: resourceGroupName,
31597			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31598				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31599				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31600		return result, validation.NewError("web.AppsClient", "StopWebSiteNetworkTraceSlot", err.Error())
31601	}
31602
31603	req, err := client.StopWebSiteNetworkTraceSlotPreparer(ctx, resourceGroupName, name, slot)
31604	if err != nil {
31605		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", nil, "Failure preparing request")
31606		return
31607	}
31608
31609	resp, err := client.StopWebSiteNetworkTraceSlotSender(req)
31610	if err != nil {
31611		result.Response = resp
31612		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", resp, "Failure sending request")
31613		return
31614	}
31615
31616	result, err = client.StopWebSiteNetworkTraceSlotResponder(resp)
31617	if err != nil {
31618		err = autorest.NewErrorWithError(err, "web.AppsClient", "StopWebSiteNetworkTraceSlot", resp, "Failure responding to request")
31619		return
31620	}
31621
31622	return
31623}
31624
31625// StopWebSiteNetworkTraceSlotPreparer prepares the StopWebSiteNetworkTraceSlot request.
31626func (client AppsClient) StopWebSiteNetworkTraceSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
31627	pathParameters := map[string]interface{}{
31628		"name":              autorest.Encode("path", name),
31629		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31630		"slot":              autorest.Encode("path", slot),
31631		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31632	}
31633
31634	const APIVersion = "2020-09-01"
31635	queryParameters := map[string]interface{}{
31636		"api-version": APIVersion,
31637	}
31638
31639	preparer := autorest.CreatePreparer(
31640		autorest.AsPost(),
31641		autorest.WithBaseURL(client.BaseURI),
31642		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop", pathParameters),
31643		autorest.WithQueryParameters(queryParameters))
31644	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31645}
31646
31647// StopWebSiteNetworkTraceSlotSender sends the StopWebSiteNetworkTraceSlot request. The method will close the
31648// http.Response Body if it receives an error.
31649func (client AppsClient) StopWebSiteNetworkTraceSlotSender(req *http.Request) (*http.Response, error) {
31650	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31651}
31652
31653// StopWebSiteNetworkTraceSlotResponder handles the response to the StopWebSiteNetworkTraceSlot request. The method always
31654// closes the http.Response Body.
31655func (client AppsClient) StopWebSiteNetworkTraceSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31656	err = autorest.Respond(
31657		resp,
31658		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31659		autorest.ByClosing())
31660	result.Response = resp
31661	return
31662}
31663
31664// SwapSlotSlot description for Swaps two deployment slots of an app.
31665// Parameters:
31666// resourceGroupName - name of the resource group to which the resource belongs.
31667// name - name of the app.
31668// slotSwapEntity - JSON object that contains the target slot name. See example.
31669// slot - name of the source slot. If a slot is not specified, the production slot is used as the source slot.
31670func (client AppsClient) SwapSlotSlot(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result AppsSwapSlotSlotFuture, err error) {
31671	if tracing.IsEnabled() {
31672		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SwapSlotSlot")
31673		defer func() {
31674			sc := -1
31675			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
31676				sc = result.FutureAPI.Response().StatusCode
31677			}
31678			tracing.EndSpan(ctx, sc, err)
31679		}()
31680	}
31681	if err := validation.Validate([]validation.Validation{
31682		{TargetValue: resourceGroupName,
31683			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31684				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31685				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
31686		{TargetValue: slotSwapEntity,
31687			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
31688				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
31689		return result, validation.NewError("web.AppsClient", "SwapSlotSlot", err.Error())
31690	}
31691
31692	req, err := client.SwapSlotSlotPreparer(ctx, resourceGroupName, name, slotSwapEntity, slot)
31693	if err != nil {
31694		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotSlot", nil, "Failure preparing request")
31695		return
31696	}
31697
31698	result, err = client.SwapSlotSlotSender(req)
31699	if err != nil {
31700		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotSlot", nil, "Failure sending request")
31701		return
31702	}
31703
31704	return
31705}
31706
31707// SwapSlotSlotPreparer prepares the SwapSlotSlot request.
31708func (client AppsClient) SwapSlotSlotPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (*http.Request, error) {
31709	pathParameters := map[string]interface{}{
31710		"name":              autorest.Encode("path", name),
31711		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31712		"slot":              autorest.Encode("path", slot),
31713		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31714	}
31715
31716	const APIVersion = "2020-09-01"
31717	queryParameters := map[string]interface{}{
31718		"api-version": APIVersion,
31719	}
31720
31721	preparer := autorest.CreatePreparer(
31722		autorest.AsContentType("application/json; charset=utf-8"),
31723		autorest.AsPost(),
31724		autorest.WithBaseURL(client.BaseURI),
31725		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap", pathParameters),
31726		autorest.WithJSON(slotSwapEntity),
31727		autorest.WithQueryParameters(queryParameters))
31728	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31729}
31730
31731// SwapSlotSlotSender sends the SwapSlotSlot request. The method will close the
31732// http.Response Body if it receives an error.
31733func (client AppsClient) SwapSlotSlotSender(req *http.Request) (future AppsSwapSlotSlotFuture, err error) {
31734	var resp *http.Response
31735	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
31736	if err != nil {
31737		return
31738	}
31739	var azf azure.Future
31740	azf, err = azure.NewFutureFromResponse(resp)
31741	future.FutureAPI = &azf
31742	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
31743		var done bool
31744		done, err = future.DoneWithContext(context.Background(), client)
31745		if err != nil {
31746			err = autorest.NewErrorWithError(err, "web.AppsSwapSlotSlotFuture", "Result", future.Response(), "Polling failure")
31747			return
31748		}
31749		if !done {
31750			err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotSlotFuture")
31751			return
31752		}
31753		ar.Response = future.Response()
31754		return
31755	}
31756	return
31757}
31758
31759// SwapSlotSlotResponder handles the response to the SwapSlotSlot request. The method always
31760// closes the http.Response Body.
31761func (client AppsClient) SwapSlotSlotResponder(resp *http.Response) (result autorest.Response, err error) {
31762	err = autorest.Respond(
31763		resp,
31764		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31765		autorest.ByClosing())
31766	result.Response = resp
31767	return
31768}
31769
31770// SwapSlotWithProduction description for Swaps two deployment slots of an app.
31771// Parameters:
31772// resourceGroupName - name of the resource group to which the resource belongs.
31773// name - name of the app.
31774// slotSwapEntity - JSON object that contains the target slot name. See example.
31775func (client AppsClient) SwapSlotWithProduction(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result AppsSwapSlotWithProductionFuture, err error) {
31776	if tracing.IsEnabled() {
31777		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SwapSlotWithProduction")
31778		defer func() {
31779			sc := -1
31780			if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
31781				sc = result.FutureAPI.Response().StatusCode
31782			}
31783			tracing.EndSpan(ctx, sc, err)
31784		}()
31785	}
31786	if err := validation.Validate([]validation.Validation{
31787		{TargetValue: resourceGroupName,
31788			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31789				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31790				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
31791		{TargetValue: slotSwapEntity,
31792			Constraints: []validation.Constraint{{Target: "slotSwapEntity.TargetSlot", Name: validation.Null, Rule: true, Chain: nil},
31793				{Target: "slotSwapEntity.PreserveVnet", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
31794		return result, validation.NewError("web.AppsClient", "SwapSlotWithProduction", err.Error())
31795	}
31796
31797	req, err := client.SwapSlotWithProductionPreparer(ctx, resourceGroupName, name, slotSwapEntity)
31798	if err != nil {
31799		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotWithProduction", nil, "Failure preparing request")
31800		return
31801	}
31802
31803	result, err = client.SwapSlotWithProductionSender(req)
31804	if err != nil {
31805		err = autorest.NewErrorWithError(err, "web.AppsClient", "SwapSlotWithProduction", nil, "Failure sending request")
31806		return
31807	}
31808
31809	return
31810}
31811
31812// SwapSlotWithProductionPreparer prepares the SwapSlotWithProduction request.
31813func (client AppsClient) SwapSlotWithProductionPreparer(ctx context.Context, resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (*http.Request, error) {
31814	pathParameters := map[string]interface{}{
31815		"name":              autorest.Encode("path", name),
31816		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31817		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31818	}
31819
31820	const APIVersion = "2020-09-01"
31821	queryParameters := map[string]interface{}{
31822		"api-version": APIVersion,
31823	}
31824
31825	preparer := autorest.CreatePreparer(
31826		autorest.AsContentType("application/json; charset=utf-8"),
31827		autorest.AsPost(),
31828		autorest.WithBaseURL(client.BaseURI),
31829		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap", pathParameters),
31830		autorest.WithJSON(slotSwapEntity),
31831		autorest.WithQueryParameters(queryParameters))
31832	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31833}
31834
31835// SwapSlotWithProductionSender sends the SwapSlotWithProduction request. The method will close the
31836// http.Response Body if it receives an error.
31837func (client AppsClient) SwapSlotWithProductionSender(req *http.Request) (future AppsSwapSlotWithProductionFuture, err error) {
31838	var resp *http.Response
31839	resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
31840	if err != nil {
31841		return
31842	}
31843	var azf azure.Future
31844	azf, err = azure.NewFutureFromResponse(resp)
31845	future.FutureAPI = &azf
31846	future.Result = func(client AppsClient) (ar autorest.Response, err error) {
31847		var done bool
31848		done, err = future.DoneWithContext(context.Background(), client)
31849		if err != nil {
31850			err = autorest.NewErrorWithError(err, "web.AppsSwapSlotWithProductionFuture", "Result", future.Response(), "Polling failure")
31851			return
31852		}
31853		if !done {
31854			err = azure.NewAsyncOpIncompleteError("web.AppsSwapSlotWithProductionFuture")
31855			return
31856		}
31857		ar.Response = future.Response()
31858		return
31859	}
31860	return
31861}
31862
31863// SwapSlotWithProductionResponder handles the response to the SwapSlotWithProduction request. The method always
31864// closes the http.Response Body.
31865func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (result autorest.Response, err error) {
31866	err = autorest.Respond(
31867		resp,
31868		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
31869		autorest.ByClosing())
31870	result.Response = resp
31871	return
31872}
31873
31874// SyncFunctions description for Syncs function trigger metadata to the management database
31875// Parameters:
31876// resourceGroupName - name of the resource group to which the resource belongs.
31877// name - name of the app.
31878func (client AppsClient) SyncFunctions(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
31879	if tracing.IsEnabled() {
31880		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctions")
31881		defer func() {
31882			sc := -1
31883			if result.Response != nil {
31884				sc = result.Response.StatusCode
31885			}
31886			tracing.EndSpan(ctx, sc, err)
31887		}()
31888	}
31889	if err := validation.Validate([]validation.Validation{
31890		{TargetValue: resourceGroupName,
31891			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31892				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31893				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31894		return result, validation.NewError("web.AppsClient", "SyncFunctions", err.Error())
31895	}
31896
31897	req, err := client.SyncFunctionsPreparer(ctx, resourceGroupName, name)
31898	if err != nil {
31899		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", nil, "Failure preparing request")
31900		return
31901	}
31902
31903	resp, err := client.SyncFunctionsSender(req)
31904	if err != nil {
31905		result.Response = resp
31906		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure sending request")
31907		return
31908	}
31909
31910	result, err = client.SyncFunctionsResponder(resp)
31911	if err != nil {
31912		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctions", resp, "Failure responding to request")
31913		return
31914	}
31915
31916	return
31917}
31918
31919// SyncFunctionsPreparer prepares the SyncFunctions request.
31920func (client AppsClient) SyncFunctionsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
31921	pathParameters := map[string]interface{}{
31922		"name":              autorest.Encode("path", name),
31923		"resourceGroupName": autorest.Encode("path", resourceGroupName),
31924		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
31925	}
31926
31927	const APIVersion = "2020-09-01"
31928	queryParameters := map[string]interface{}{
31929		"api-version": APIVersion,
31930	}
31931
31932	preparer := autorest.CreatePreparer(
31933		autorest.AsPost(),
31934		autorest.WithBaseURL(client.BaseURI),
31935		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync", pathParameters),
31936		autorest.WithQueryParameters(queryParameters))
31937	return preparer.Prepare((&http.Request{}).WithContext(ctx))
31938}
31939
31940// SyncFunctionsSender sends the SyncFunctions request. The method will close the
31941// http.Response Body if it receives an error.
31942func (client AppsClient) SyncFunctionsSender(req *http.Request) (*http.Response, error) {
31943	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
31944}
31945
31946// SyncFunctionsResponder handles the response to the SyncFunctions request. The method always
31947// closes the http.Response Body.
31948func (client AppsClient) SyncFunctionsResponder(resp *http.Response) (result autorest.Response, err error) {
31949	err = autorest.Respond(
31950		resp,
31951		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
31952		autorest.ByClosing())
31953	result.Response = resp
31954	return
31955}
31956
31957// SyncFunctionsSlot description for Syncs function trigger metadata to the management database
31958// Parameters:
31959// resourceGroupName - name of the resource group to which the resource belongs.
31960// name - name of the app.
31961// slot - name of the deployment slot.
31962func (client AppsClient) SyncFunctionsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
31963	if tracing.IsEnabled() {
31964		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionsSlot")
31965		defer func() {
31966			sc := -1
31967			if result.Response != nil {
31968				sc = result.Response.StatusCode
31969			}
31970			tracing.EndSpan(ctx, sc, err)
31971		}()
31972	}
31973	if err := validation.Validate([]validation.Validation{
31974		{TargetValue: resourceGroupName,
31975			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
31976				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
31977				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
31978		return result, validation.NewError("web.AppsClient", "SyncFunctionsSlot", err.Error())
31979	}
31980
31981	req, err := client.SyncFunctionsSlotPreparer(ctx, resourceGroupName, name, slot)
31982	if err != nil {
31983		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", nil, "Failure preparing request")
31984		return
31985	}
31986
31987	resp, err := client.SyncFunctionsSlotSender(req)
31988	if err != nil {
31989		result.Response = resp
31990		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure sending request")
31991		return
31992	}
31993
31994	result, err = client.SyncFunctionsSlotResponder(resp)
31995	if err != nil {
31996		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionsSlot", resp, "Failure responding to request")
31997		return
31998	}
31999
32000	return
32001}
32002
32003// SyncFunctionsSlotPreparer prepares the SyncFunctionsSlot request.
32004func (client AppsClient) SyncFunctionsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32005	pathParameters := map[string]interface{}{
32006		"name":              autorest.Encode("path", name),
32007		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32008		"slot":              autorest.Encode("path", slot),
32009		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32010	}
32011
32012	const APIVersion = "2020-09-01"
32013	queryParameters := map[string]interface{}{
32014		"api-version": APIVersion,
32015	}
32016
32017	preparer := autorest.CreatePreparer(
32018		autorest.AsPost(),
32019		autorest.WithBaseURL(client.BaseURI),
32020		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync", pathParameters),
32021		autorest.WithQueryParameters(queryParameters))
32022	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32023}
32024
32025// SyncFunctionsSlotSender sends the SyncFunctionsSlot request. The method will close the
32026// http.Response Body if it receives an error.
32027func (client AppsClient) SyncFunctionsSlotSender(req *http.Request) (*http.Response, error) {
32028	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32029}
32030
32031// SyncFunctionsSlotResponder handles the response to the SyncFunctionsSlot request. The method always
32032// closes the http.Response Body.
32033func (client AppsClient) SyncFunctionsSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32034	err = autorest.Respond(
32035		resp,
32036		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32037		autorest.ByClosing())
32038	result.Response = resp
32039	return
32040}
32041
32042// SyncFunctionTriggers description for Syncs function trigger metadata to the management database
32043// Parameters:
32044// resourceGroupName - name of the resource group to which the resource belongs.
32045// name - name of the app.
32046func (client AppsClient) SyncFunctionTriggers(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
32047	if tracing.IsEnabled() {
32048		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggers")
32049		defer func() {
32050			sc := -1
32051			if result.Response != nil {
32052				sc = result.Response.StatusCode
32053			}
32054			tracing.EndSpan(ctx, sc, err)
32055		}()
32056	}
32057	if err := validation.Validate([]validation.Validation{
32058		{TargetValue: resourceGroupName,
32059			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32060				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32061				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32062		return result, validation.NewError("web.AppsClient", "SyncFunctionTriggers", err.Error())
32063	}
32064
32065	req, err := client.SyncFunctionTriggersPreparer(ctx, resourceGroupName, name)
32066	if err != nil {
32067		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", nil, "Failure preparing request")
32068		return
32069	}
32070
32071	resp, err := client.SyncFunctionTriggersSender(req)
32072	if err != nil {
32073		result.Response = resp
32074		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure sending request")
32075		return
32076	}
32077
32078	result, err = client.SyncFunctionTriggersResponder(resp)
32079	if err != nil {
32080		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggers", resp, "Failure responding to request")
32081		return
32082	}
32083
32084	return
32085}
32086
32087// SyncFunctionTriggersPreparer prepares the SyncFunctionTriggers request.
32088func (client AppsClient) SyncFunctionTriggersPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
32089	pathParameters := map[string]interface{}{
32090		"name":              autorest.Encode("path", name),
32091		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32092		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32093	}
32094
32095	const APIVersion = "2020-09-01"
32096	queryParameters := map[string]interface{}{
32097		"api-version": APIVersion,
32098	}
32099
32100	preparer := autorest.CreatePreparer(
32101		autorest.AsPost(),
32102		autorest.WithBaseURL(client.BaseURI),
32103		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers", pathParameters),
32104		autorest.WithQueryParameters(queryParameters))
32105	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32106}
32107
32108// SyncFunctionTriggersSender sends the SyncFunctionTriggers request. The method will close the
32109// http.Response Body if it receives an error.
32110func (client AppsClient) SyncFunctionTriggersSender(req *http.Request) (*http.Response, error) {
32111	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32112}
32113
32114// SyncFunctionTriggersResponder handles the response to the SyncFunctionTriggers request. The method always
32115// closes the http.Response Body.
32116func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (result autorest.Response, err error) {
32117	err = autorest.Respond(
32118		resp,
32119		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32120		autorest.ByClosing())
32121	result.Response = resp
32122	return
32123}
32124
32125// SyncFunctionTriggersSlot description for Syncs function trigger metadata to the management database
32126// Parameters:
32127// resourceGroupName - name of the resource group to which the resource belongs.
32128// name - name of the app.
32129// slot - name of the deployment slot.
32130func (client AppsClient) SyncFunctionTriggersSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
32131	if tracing.IsEnabled() {
32132		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncFunctionTriggersSlot")
32133		defer func() {
32134			sc := -1
32135			if result.Response != nil {
32136				sc = result.Response.StatusCode
32137			}
32138			tracing.EndSpan(ctx, sc, err)
32139		}()
32140	}
32141	if err := validation.Validate([]validation.Validation{
32142		{TargetValue: resourceGroupName,
32143			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32144				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32145				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32146		return result, validation.NewError("web.AppsClient", "SyncFunctionTriggersSlot", err.Error())
32147	}
32148
32149	req, err := client.SyncFunctionTriggersSlotPreparer(ctx, resourceGroupName, name, slot)
32150	if err != nil {
32151		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", nil, "Failure preparing request")
32152		return
32153	}
32154
32155	resp, err := client.SyncFunctionTriggersSlotSender(req)
32156	if err != nil {
32157		result.Response = resp
32158		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure sending request")
32159		return
32160	}
32161
32162	result, err = client.SyncFunctionTriggersSlotResponder(resp)
32163	if err != nil {
32164		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncFunctionTriggersSlot", resp, "Failure responding to request")
32165		return
32166	}
32167
32168	return
32169}
32170
32171// SyncFunctionTriggersSlotPreparer prepares the SyncFunctionTriggersSlot request.
32172func (client AppsClient) SyncFunctionTriggersSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32173	pathParameters := map[string]interface{}{
32174		"name":              autorest.Encode("path", name),
32175		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32176		"slot":              autorest.Encode("path", slot),
32177		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32178	}
32179
32180	const APIVersion = "2020-09-01"
32181	queryParameters := map[string]interface{}{
32182		"api-version": APIVersion,
32183	}
32184
32185	preparer := autorest.CreatePreparer(
32186		autorest.AsPost(),
32187		autorest.WithBaseURL(client.BaseURI),
32188		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers", pathParameters),
32189		autorest.WithQueryParameters(queryParameters))
32190	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32191}
32192
32193// SyncFunctionTriggersSlotSender sends the SyncFunctionTriggersSlot request. The method will close the
32194// http.Response Body if it receives an error.
32195func (client AppsClient) SyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) {
32196	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32197}
32198
32199// SyncFunctionTriggersSlotResponder handles the response to the SyncFunctionTriggersSlot request. The method always
32200// closes the http.Response Body.
32201func (client AppsClient) SyncFunctionTriggersSlotResponder(resp *http.Response) (result autorest.Response, err error) {
32202	err = autorest.Respond(
32203		resp,
32204		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
32205		autorest.ByClosing())
32206	result.Response = resp
32207	return
32208}
32209
32210// SyncRepository description for Sync web app repository.
32211// Parameters:
32212// resourceGroupName - name of the resource group to which the resource belongs.
32213// name - name of web app.
32214func (client AppsClient) SyncRepository(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
32215	if tracing.IsEnabled() {
32216		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncRepository")
32217		defer func() {
32218			sc := -1
32219			if result.Response != nil {
32220				sc = result.Response.StatusCode
32221			}
32222			tracing.EndSpan(ctx, sc, err)
32223		}()
32224	}
32225	if err := validation.Validate([]validation.Validation{
32226		{TargetValue: resourceGroupName,
32227			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32228				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32229				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32230		return result, validation.NewError("web.AppsClient", "SyncRepository", err.Error())
32231	}
32232
32233	req, err := client.SyncRepositoryPreparer(ctx, resourceGroupName, name)
32234	if err != nil {
32235		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", nil, "Failure preparing request")
32236		return
32237	}
32238
32239	resp, err := client.SyncRepositorySender(req)
32240	if err != nil {
32241		result.Response = resp
32242		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", resp, "Failure sending request")
32243		return
32244	}
32245
32246	result, err = client.SyncRepositoryResponder(resp)
32247	if err != nil {
32248		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepository", resp, "Failure responding to request")
32249		return
32250	}
32251
32252	return
32253}
32254
32255// SyncRepositoryPreparer prepares the SyncRepository request.
32256func (client AppsClient) SyncRepositoryPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) {
32257	pathParameters := map[string]interface{}{
32258		"name":              autorest.Encode("path", name),
32259		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32260		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32261	}
32262
32263	const APIVersion = "2020-09-01"
32264	queryParameters := map[string]interface{}{
32265		"api-version": APIVersion,
32266	}
32267
32268	preparer := autorest.CreatePreparer(
32269		autorest.AsPost(),
32270		autorest.WithBaseURL(client.BaseURI),
32271		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync", pathParameters),
32272		autorest.WithQueryParameters(queryParameters))
32273	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32274}
32275
32276// SyncRepositorySender sends the SyncRepository request. The method will close the
32277// http.Response Body if it receives an error.
32278func (client AppsClient) SyncRepositorySender(req *http.Request) (*http.Response, error) {
32279	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32280}
32281
32282// SyncRepositoryResponder handles the response to the SyncRepository request. The method always
32283// closes the http.Response Body.
32284func (client AppsClient) SyncRepositoryResponder(resp *http.Response) (result autorest.Response, err error) {
32285	err = autorest.Respond(
32286		resp,
32287		azure.WithErrorUnlessStatusCode(http.StatusOK),
32288		autorest.ByClosing())
32289	result.Response = resp
32290	return
32291}
32292
32293// SyncRepositorySlot description for Sync web app repository.
32294// Parameters:
32295// resourceGroupName - name of the resource group to which the resource belongs.
32296// name - name of web app.
32297// slot - name of web app slot. If not specified then will default to production slot.
32298func (client AppsClient) SyncRepositorySlot(ctx context.Context, resourceGroupName string, name string, slot string) (result autorest.Response, err error) {
32299	if tracing.IsEnabled() {
32300		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.SyncRepositorySlot")
32301		defer func() {
32302			sc := -1
32303			if result.Response != nil {
32304				sc = result.Response.StatusCode
32305			}
32306			tracing.EndSpan(ctx, sc, err)
32307		}()
32308	}
32309	if err := validation.Validate([]validation.Validation{
32310		{TargetValue: resourceGroupName,
32311			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32312				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32313				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32314		return result, validation.NewError("web.AppsClient", "SyncRepositorySlot", err.Error())
32315	}
32316
32317	req, err := client.SyncRepositorySlotPreparer(ctx, resourceGroupName, name, slot)
32318	if err != nil {
32319		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", nil, "Failure preparing request")
32320		return
32321	}
32322
32323	resp, err := client.SyncRepositorySlotSender(req)
32324	if err != nil {
32325		result.Response = resp
32326		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", resp, "Failure sending request")
32327		return
32328	}
32329
32330	result, err = client.SyncRepositorySlotResponder(resp)
32331	if err != nil {
32332		err = autorest.NewErrorWithError(err, "web.AppsClient", "SyncRepositorySlot", resp, "Failure responding to request")
32333		return
32334	}
32335
32336	return
32337}
32338
32339// SyncRepositorySlotPreparer prepares the SyncRepositorySlot request.
32340func (client AppsClient) SyncRepositorySlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) {
32341	pathParameters := map[string]interface{}{
32342		"name":              autorest.Encode("path", name),
32343		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32344		"slot":              autorest.Encode("path", slot),
32345		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32346	}
32347
32348	const APIVersion = "2020-09-01"
32349	queryParameters := map[string]interface{}{
32350		"api-version": APIVersion,
32351	}
32352
32353	preparer := autorest.CreatePreparer(
32354		autorest.AsPost(),
32355		autorest.WithBaseURL(client.BaseURI),
32356		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync", pathParameters),
32357		autorest.WithQueryParameters(queryParameters))
32358	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32359}
32360
32361// SyncRepositorySlotSender sends the SyncRepositorySlot request. The method will close the
32362// http.Response Body if it receives an error.
32363func (client AppsClient) SyncRepositorySlotSender(req *http.Request) (*http.Response, error) {
32364	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32365}
32366
32367// SyncRepositorySlotResponder handles the response to the SyncRepositorySlot request. The method always
32368// closes the http.Response Body.
32369func (client AppsClient) SyncRepositorySlotResponder(resp *http.Response) (result autorest.Response, err error) {
32370	err = autorest.Respond(
32371		resp,
32372		azure.WithErrorUnlessStatusCode(http.StatusOK),
32373		autorest.ByClosing())
32374	result.Response = resp
32375	return
32376}
32377
32378// Update description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing
32379// app.
32380// Parameters:
32381// resourceGroupName - name of the resource group to which the resource belongs.
32382// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
32383// parameter.
32384// siteEnvelope - a JSON representation of the app properties. See example.
32385func (client AppsClient) Update(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource) (result Site, err error) {
32386	if tracing.IsEnabled() {
32387		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.Update")
32388		defer func() {
32389			sc := -1
32390			if result.Response.Response != nil {
32391				sc = result.Response.Response.StatusCode
32392			}
32393			tracing.EndSpan(ctx, sc, err)
32394		}()
32395	}
32396	if err := validation.Validate([]validation.Validation{
32397		{TargetValue: resourceGroupName,
32398			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32399				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32400				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32401		return result, validation.NewError("web.AppsClient", "Update", err.Error())
32402	}
32403
32404	req, err := client.UpdatePreparer(ctx, resourceGroupName, name, siteEnvelope)
32405	if err != nil {
32406		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", nil, "Failure preparing request")
32407		return
32408	}
32409
32410	resp, err := client.UpdateSender(req)
32411	if err != nil {
32412		result.Response = autorest.Response{Response: resp}
32413		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", resp, "Failure sending request")
32414		return
32415	}
32416
32417	result, err = client.UpdateResponder(resp)
32418	if err != nil {
32419		err = autorest.NewErrorWithError(err, "web.AppsClient", "Update", resp, "Failure responding to request")
32420		return
32421	}
32422
32423	return
32424}
32425
32426// UpdatePreparer prepares the Update request.
32427func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource) (*http.Request, error) {
32428	pathParameters := map[string]interface{}{
32429		"name":              autorest.Encode("path", name),
32430		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32431		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32432	}
32433
32434	const APIVersion = "2020-09-01"
32435	queryParameters := map[string]interface{}{
32436		"api-version": APIVersion,
32437	}
32438
32439	preparer := autorest.CreatePreparer(
32440		autorest.AsContentType("application/json; charset=utf-8"),
32441		autorest.AsPatch(),
32442		autorest.WithBaseURL(client.BaseURI),
32443		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}", pathParameters),
32444		autorest.WithJSON(siteEnvelope),
32445		autorest.WithQueryParameters(queryParameters))
32446	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32447}
32448
32449// UpdateSender sends the Update request. The method will close the
32450// http.Response Body if it receives an error.
32451func (client AppsClient) UpdateSender(req *http.Request) (*http.Response, error) {
32452	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32453}
32454
32455// UpdateResponder handles the response to the Update request. The method always
32456// closes the http.Response Body.
32457func (client AppsClient) UpdateResponder(resp *http.Response) (result Site, err error) {
32458	err = autorest.Respond(
32459		resp,
32460		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
32461		autorest.ByUnmarshallingJSON(&result),
32462		autorest.ByClosing())
32463	result.Response = autorest.Response{Response: resp}
32464	return
32465}
32466
32467// UpdateApplicationSettings description for Replaces the application settings of an app.
32468// Parameters:
32469// resourceGroupName - name of the resource group to which the resource belongs.
32470// name - name of the app.
32471// appSettings - application settings of the app.
32472func (client AppsClient) UpdateApplicationSettings(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary) (result StringDictionary, err error) {
32473	if tracing.IsEnabled() {
32474		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateApplicationSettings")
32475		defer func() {
32476			sc := -1
32477			if result.Response.Response != nil {
32478				sc = result.Response.Response.StatusCode
32479			}
32480			tracing.EndSpan(ctx, sc, err)
32481		}()
32482	}
32483	if err := validation.Validate([]validation.Validation{
32484		{TargetValue: resourceGroupName,
32485			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32486				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32487				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32488		return result, validation.NewError("web.AppsClient", "UpdateApplicationSettings", err.Error())
32489	}
32490
32491	req, err := client.UpdateApplicationSettingsPreparer(ctx, resourceGroupName, name, appSettings)
32492	if err != nil {
32493		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", nil, "Failure preparing request")
32494		return
32495	}
32496
32497	resp, err := client.UpdateApplicationSettingsSender(req)
32498	if err != nil {
32499		result.Response = autorest.Response{Response: resp}
32500		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", resp, "Failure sending request")
32501		return
32502	}
32503
32504	result, err = client.UpdateApplicationSettingsResponder(resp)
32505	if err != nil {
32506		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettings", resp, "Failure responding to request")
32507		return
32508	}
32509
32510	return
32511}
32512
32513// UpdateApplicationSettingsPreparer prepares the UpdateApplicationSettings request.
32514func (client AppsClient) UpdateApplicationSettingsPreparer(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary) (*http.Request, error) {
32515	pathParameters := map[string]interface{}{
32516		"name":              autorest.Encode("path", name),
32517		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32518		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32519	}
32520
32521	const APIVersion = "2020-09-01"
32522	queryParameters := map[string]interface{}{
32523		"api-version": APIVersion,
32524	}
32525
32526	preparer := autorest.CreatePreparer(
32527		autorest.AsContentType("application/json; charset=utf-8"),
32528		autorest.AsPut(),
32529		autorest.WithBaseURL(client.BaseURI),
32530		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings", pathParameters),
32531		autorest.WithJSON(appSettings),
32532		autorest.WithQueryParameters(queryParameters))
32533	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32534}
32535
32536// UpdateApplicationSettingsSender sends the UpdateApplicationSettings request. The method will close the
32537// http.Response Body if it receives an error.
32538func (client AppsClient) UpdateApplicationSettingsSender(req *http.Request) (*http.Response, error) {
32539	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32540}
32541
32542// UpdateApplicationSettingsResponder handles the response to the UpdateApplicationSettings request. The method always
32543// closes the http.Response Body.
32544func (client AppsClient) UpdateApplicationSettingsResponder(resp *http.Response) (result StringDictionary, err error) {
32545	err = autorest.Respond(
32546		resp,
32547		azure.WithErrorUnlessStatusCode(http.StatusOK),
32548		autorest.ByUnmarshallingJSON(&result),
32549		autorest.ByClosing())
32550	result.Response = autorest.Response{Response: resp}
32551	return
32552}
32553
32554// UpdateApplicationSettingsSlot description for Replaces the application settings of an app.
32555// Parameters:
32556// resourceGroupName - name of the resource group to which the resource belongs.
32557// name - name of the app.
32558// appSettings - application settings of the app.
32559// slot - name of the deployment slot. If a slot is not specified, the API will update the application settings
32560// for the production slot.
32561func (client AppsClient) UpdateApplicationSettingsSlot(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, slot string) (result StringDictionary, err error) {
32562	if tracing.IsEnabled() {
32563		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateApplicationSettingsSlot")
32564		defer func() {
32565			sc := -1
32566			if result.Response.Response != nil {
32567				sc = result.Response.Response.StatusCode
32568			}
32569			tracing.EndSpan(ctx, sc, err)
32570		}()
32571	}
32572	if err := validation.Validate([]validation.Validation{
32573		{TargetValue: resourceGroupName,
32574			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32575				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32576				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32577		return result, validation.NewError("web.AppsClient", "UpdateApplicationSettingsSlot", err.Error())
32578	}
32579
32580	req, err := client.UpdateApplicationSettingsSlotPreparer(ctx, resourceGroupName, name, appSettings, slot)
32581	if err != nil {
32582		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", nil, "Failure preparing request")
32583		return
32584	}
32585
32586	resp, err := client.UpdateApplicationSettingsSlotSender(req)
32587	if err != nil {
32588		result.Response = autorest.Response{Response: resp}
32589		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", resp, "Failure sending request")
32590		return
32591	}
32592
32593	result, err = client.UpdateApplicationSettingsSlotResponder(resp)
32594	if err != nil {
32595		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateApplicationSettingsSlot", resp, "Failure responding to request")
32596		return
32597	}
32598
32599	return
32600}
32601
32602// UpdateApplicationSettingsSlotPreparer prepares the UpdateApplicationSettingsSlot request.
32603func (client AppsClient) UpdateApplicationSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, appSettings StringDictionary, slot string) (*http.Request, error) {
32604	pathParameters := map[string]interface{}{
32605		"name":              autorest.Encode("path", name),
32606		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32607		"slot":              autorest.Encode("path", slot),
32608		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32609	}
32610
32611	const APIVersion = "2020-09-01"
32612	queryParameters := map[string]interface{}{
32613		"api-version": APIVersion,
32614	}
32615
32616	preparer := autorest.CreatePreparer(
32617		autorest.AsContentType("application/json; charset=utf-8"),
32618		autorest.AsPut(),
32619		autorest.WithBaseURL(client.BaseURI),
32620		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings", pathParameters),
32621		autorest.WithJSON(appSettings),
32622		autorest.WithQueryParameters(queryParameters))
32623	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32624}
32625
32626// UpdateApplicationSettingsSlotSender sends the UpdateApplicationSettingsSlot request. The method will close the
32627// http.Response Body if it receives an error.
32628func (client AppsClient) UpdateApplicationSettingsSlotSender(req *http.Request) (*http.Response, error) {
32629	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32630}
32631
32632// UpdateApplicationSettingsSlotResponder handles the response to the UpdateApplicationSettingsSlot request. The method always
32633// closes the http.Response Body.
32634func (client AppsClient) UpdateApplicationSettingsSlotResponder(resp *http.Response) (result StringDictionary, err error) {
32635	err = autorest.Respond(
32636		resp,
32637		azure.WithErrorUnlessStatusCode(http.StatusOK),
32638		autorest.ByUnmarshallingJSON(&result),
32639		autorest.ByClosing())
32640	result.Response = autorest.Response{Response: resp}
32641	return
32642}
32643
32644// UpdateAuthSettings description for Updates the Authentication / Authorization settings associated with web app.
32645// Parameters:
32646// resourceGroupName - name of the resource group to which the resource belongs.
32647// name - name of web app.
32648// siteAuthSettings - auth settings associated with web app.
32649func (client AppsClient) UpdateAuthSettings(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (result SiteAuthSettings, err error) {
32650	if tracing.IsEnabled() {
32651		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettings")
32652		defer func() {
32653			sc := -1
32654			if result.Response.Response != nil {
32655				sc = result.Response.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}}}}); err != nil {
32665		return result, validation.NewError("web.AppsClient", "UpdateAuthSettings", err.Error())
32666	}
32667
32668	req, err := client.UpdateAuthSettingsPreparer(ctx, resourceGroupName, name, siteAuthSettings)
32669	if err != nil {
32670		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", nil, "Failure preparing request")
32671		return
32672	}
32673
32674	resp, err := client.UpdateAuthSettingsSender(req)
32675	if err != nil {
32676		result.Response = autorest.Response{Response: resp}
32677		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", resp, "Failure sending request")
32678		return
32679	}
32680
32681	result, err = client.UpdateAuthSettingsResponder(resp)
32682	if err != nil {
32683		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettings", resp, "Failure responding to request")
32684		return
32685	}
32686
32687	return
32688}
32689
32690// UpdateAuthSettingsPreparer prepares the UpdateAuthSettings request.
32691func (client AppsClient) UpdateAuthSettingsPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (*http.Request, error) {
32692	pathParameters := map[string]interface{}{
32693		"name":              autorest.Encode("path", name),
32694		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32695		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32696	}
32697
32698	const APIVersion = "2020-09-01"
32699	queryParameters := map[string]interface{}{
32700		"api-version": APIVersion,
32701	}
32702
32703	preparer := autorest.CreatePreparer(
32704		autorest.AsContentType("application/json; charset=utf-8"),
32705		autorest.AsPut(),
32706		autorest.WithBaseURL(client.BaseURI),
32707		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings", pathParameters),
32708		autorest.WithJSON(siteAuthSettings),
32709		autorest.WithQueryParameters(queryParameters))
32710	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32711}
32712
32713// UpdateAuthSettingsSender sends the UpdateAuthSettings request. The method will close the
32714// http.Response Body if it receives an error.
32715func (client AppsClient) UpdateAuthSettingsSender(req *http.Request) (*http.Response, error) {
32716	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32717}
32718
32719// UpdateAuthSettingsResponder handles the response to the UpdateAuthSettings request. The method always
32720// closes the http.Response Body.
32721func (client AppsClient) UpdateAuthSettingsResponder(resp *http.Response) (result SiteAuthSettings, err error) {
32722	err = autorest.Respond(
32723		resp,
32724		azure.WithErrorUnlessStatusCode(http.StatusOK),
32725		autorest.ByUnmarshallingJSON(&result),
32726		autorest.ByClosing())
32727	result.Response = autorest.Response{Response: resp}
32728	return
32729}
32730
32731// UpdateAuthSettingsSlot description for Updates the Authentication / Authorization settings associated with web app.
32732// Parameters:
32733// resourceGroupName - name of the resource group to which the resource belongs.
32734// name - name of web app.
32735// siteAuthSettings - auth settings associated with web app.
32736// slot - name of web app slot. If not specified then will default to production slot.
32737func (client AppsClient) UpdateAuthSettingsSlot(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (result SiteAuthSettings, err error) {
32738	if tracing.IsEnabled() {
32739		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsSlot")
32740		defer func() {
32741			sc := -1
32742			if result.Response.Response != nil {
32743				sc = result.Response.Response.StatusCode
32744			}
32745			tracing.EndSpan(ctx, sc, err)
32746		}()
32747	}
32748	if err := validation.Validate([]validation.Validation{
32749		{TargetValue: resourceGroupName,
32750			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32751				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32752				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32753		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsSlot", err.Error())
32754	}
32755
32756	req, err := client.UpdateAuthSettingsSlotPreparer(ctx, resourceGroupName, name, siteAuthSettings, slot)
32757	if err != nil {
32758		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", nil, "Failure preparing request")
32759		return
32760	}
32761
32762	resp, err := client.UpdateAuthSettingsSlotSender(req)
32763	if err != nil {
32764		result.Response = autorest.Response{Response: resp}
32765		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", resp, "Failure sending request")
32766		return
32767	}
32768
32769	result, err = client.UpdateAuthSettingsSlotResponder(resp)
32770	if err != nil {
32771		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsSlot", resp, "Failure responding to request")
32772		return
32773	}
32774
32775	return
32776}
32777
32778// UpdateAuthSettingsSlotPreparer prepares the UpdateAuthSettingsSlot request.
32779func (client AppsClient) UpdateAuthSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (*http.Request, error) {
32780	pathParameters := map[string]interface{}{
32781		"name":              autorest.Encode("path", name),
32782		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32783		"slot":              autorest.Encode("path", slot),
32784		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32785	}
32786
32787	const APIVersion = "2020-09-01"
32788	queryParameters := map[string]interface{}{
32789		"api-version": APIVersion,
32790	}
32791
32792	preparer := autorest.CreatePreparer(
32793		autorest.AsContentType("application/json; charset=utf-8"),
32794		autorest.AsPut(),
32795		autorest.WithBaseURL(client.BaseURI),
32796		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings", pathParameters),
32797		autorest.WithJSON(siteAuthSettings),
32798		autorest.WithQueryParameters(queryParameters))
32799	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32800}
32801
32802// UpdateAuthSettingsSlotSender sends the UpdateAuthSettingsSlot request. The method will close the
32803// http.Response Body if it receives an error.
32804func (client AppsClient) UpdateAuthSettingsSlotSender(req *http.Request) (*http.Response, error) {
32805	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32806}
32807
32808// UpdateAuthSettingsSlotResponder handles the response to the UpdateAuthSettingsSlot request. The method always
32809// closes the http.Response Body.
32810func (client AppsClient) UpdateAuthSettingsSlotResponder(resp *http.Response) (result SiteAuthSettings, err error) {
32811	err = autorest.Respond(
32812		resp,
32813		azure.WithErrorUnlessStatusCode(http.StatusOK),
32814		autorest.ByUnmarshallingJSON(&result),
32815		autorest.ByClosing())
32816	result.Response = autorest.Response{Response: resp}
32817	return
32818}
32819
32820// UpdateAuthSettingsV2 description for Updates site's Authentication / Authorization settings for apps via the V2
32821// format
32822// Parameters:
32823// resourceGroupName - name of the resource group to which the resource belongs.
32824// name - name of web app.
32825// siteAuthSettingsV2 - auth settings associated with web app.
32826func (client AppsClient) UpdateAuthSettingsV2(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2) (result SiteAuthSettingsV2, err error) {
32827	if tracing.IsEnabled() {
32828		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsV2")
32829		defer func() {
32830			sc := -1
32831			if result.Response.Response != nil {
32832				sc = result.Response.Response.StatusCode
32833			}
32834			tracing.EndSpan(ctx, sc, err)
32835		}()
32836	}
32837	if err := validation.Validate([]validation.Validation{
32838		{TargetValue: resourceGroupName,
32839			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32840				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32841				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32842		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsV2", err.Error())
32843	}
32844
32845	req, err := client.UpdateAuthSettingsV2Preparer(ctx, resourceGroupName, name, siteAuthSettingsV2)
32846	if err != nil {
32847		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2", nil, "Failure preparing request")
32848		return
32849	}
32850
32851	resp, err := client.UpdateAuthSettingsV2Sender(req)
32852	if err != nil {
32853		result.Response = autorest.Response{Response: resp}
32854		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2", resp, "Failure sending request")
32855		return
32856	}
32857
32858	result, err = client.UpdateAuthSettingsV2Responder(resp)
32859	if err != nil {
32860		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2", resp, "Failure responding to request")
32861		return
32862	}
32863
32864	return
32865}
32866
32867// UpdateAuthSettingsV2Preparer prepares the UpdateAuthSettingsV2 request.
32868func (client AppsClient) UpdateAuthSettingsV2Preparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2) (*http.Request, error) {
32869	pathParameters := map[string]interface{}{
32870		"name":              autorest.Encode("path", name),
32871		"resourceGroupName": autorest.Encode("path", resourceGroupName),
32872		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
32873	}
32874
32875	const APIVersion = "2020-09-01"
32876	queryParameters := map[string]interface{}{
32877		"api-version": APIVersion,
32878	}
32879
32880	preparer := autorest.CreatePreparer(
32881		autorest.AsContentType("application/json; charset=utf-8"),
32882		autorest.AsPut(),
32883		autorest.WithBaseURL(client.BaseURI),
32884		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2", pathParameters),
32885		autorest.WithJSON(siteAuthSettingsV2),
32886		autorest.WithQueryParameters(queryParameters))
32887	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32888}
32889
32890// UpdateAuthSettingsV2Sender sends the UpdateAuthSettingsV2 request. The method will close the
32891// http.Response Body if it receives an error.
32892func (client AppsClient) UpdateAuthSettingsV2Sender(req *http.Request) (*http.Response, error) {
32893	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32894}
32895
32896// UpdateAuthSettingsV2Responder handles the response to the UpdateAuthSettingsV2 request. The method always
32897// closes the http.Response Body.
32898func (client AppsClient) UpdateAuthSettingsV2Responder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
32899	err = autorest.Respond(
32900		resp,
32901		azure.WithErrorUnlessStatusCode(http.StatusOK),
32902		autorest.ByUnmarshallingJSON(&result),
32903		autorest.ByClosing())
32904	result.Response = autorest.Response{Response: resp}
32905	return
32906}
32907
32908// UpdateAuthSettingsV2Slot description for Updates site's Authentication / Authorization settings for apps via the V2
32909// format
32910// Parameters:
32911// resourceGroupName - name of the resource group to which the resource belongs.
32912// name - name of web app.
32913// siteAuthSettingsV2 - auth settings associated with web app.
32914// slot - name of web app slot. If not specified then will default to production slot.
32915func (client AppsClient) UpdateAuthSettingsV2Slot(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, slot string) (result SiteAuthSettingsV2, err error) {
32916	if tracing.IsEnabled() {
32917		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAuthSettingsV2Slot")
32918		defer func() {
32919			sc := -1
32920			if result.Response.Response != nil {
32921				sc = result.Response.Response.StatusCode
32922			}
32923			tracing.EndSpan(ctx, sc, err)
32924		}()
32925	}
32926	if err := validation.Validate([]validation.Validation{
32927		{TargetValue: resourceGroupName,
32928			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
32929				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
32930				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
32931		return result, validation.NewError("web.AppsClient", "UpdateAuthSettingsV2Slot", err.Error())
32932	}
32933
32934	req, err := client.UpdateAuthSettingsV2SlotPreparer(ctx, resourceGroupName, name, siteAuthSettingsV2, slot)
32935	if err != nil {
32936		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2Slot", nil, "Failure preparing request")
32937		return
32938	}
32939
32940	resp, err := client.UpdateAuthSettingsV2SlotSender(req)
32941	if err != nil {
32942		result.Response = autorest.Response{Response: resp}
32943		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2Slot", resp, "Failure sending request")
32944		return
32945	}
32946
32947	result, err = client.UpdateAuthSettingsV2SlotResponder(resp)
32948	if err != nil {
32949		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAuthSettingsV2Slot", resp, "Failure responding to request")
32950		return
32951	}
32952
32953	return
32954}
32955
32956// UpdateAuthSettingsV2SlotPreparer prepares the UpdateAuthSettingsV2Slot request.
32957func (client AppsClient) UpdateAuthSettingsV2SlotPreparer(ctx context.Context, resourceGroupName string, name string, siteAuthSettingsV2 SiteAuthSettingsV2, 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 = "2020-09-01"
32966	queryParameters := map[string]interface{}{
32967		"api-version": APIVersion,
32968	}
32969
32970	preparer := autorest.CreatePreparer(
32971		autorest.AsContentType("application/json; charset=utf-8"),
32972		autorest.AsPut(),
32973		autorest.WithBaseURL(client.BaseURI),
32974		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2", pathParameters),
32975		autorest.WithJSON(siteAuthSettingsV2),
32976		autorest.WithQueryParameters(queryParameters))
32977	return preparer.Prepare((&http.Request{}).WithContext(ctx))
32978}
32979
32980// UpdateAuthSettingsV2SlotSender sends the UpdateAuthSettingsV2Slot request. The method will close the
32981// http.Response Body if it receives an error.
32982func (client AppsClient) UpdateAuthSettingsV2SlotSender(req *http.Request) (*http.Response, error) {
32983	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
32984}
32985
32986// UpdateAuthSettingsV2SlotResponder handles the response to the UpdateAuthSettingsV2Slot request. The method always
32987// closes the http.Response Body.
32988func (client AppsClient) UpdateAuthSettingsV2SlotResponder(resp *http.Response) (result SiteAuthSettingsV2, err error) {
32989	err = autorest.Respond(
32990		resp,
32991		azure.WithErrorUnlessStatusCode(http.StatusOK),
32992		autorest.ByUnmarshallingJSON(&result),
32993		autorest.ByClosing())
32994	result.Response = autorest.Response{Response: resp}
32995	return
32996}
32997
32998// UpdateAzureStorageAccounts description for Updates the Azure storage account configurations of an app.
32999// Parameters:
33000// resourceGroupName - name of the resource group to which the resource belongs.
33001// name - name of the app.
33002// azureStorageAccounts - azure storage accounts of the app.
33003func (client AppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (result AzureStoragePropertyDictionaryResource, err error) {
33004	if tracing.IsEnabled() {
33005		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAzureStorageAccounts")
33006		defer func() {
33007			sc := -1
33008			if result.Response.Response != nil {
33009				sc = result.Response.Response.StatusCode
33010			}
33011			tracing.EndSpan(ctx, sc, err)
33012		}()
33013	}
33014	if err := validation.Validate([]validation.Validation{
33015		{TargetValue: resourceGroupName,
33016			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33017				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33018				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33019		return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccounts", err.Error())
33020	}
33021
33022	req, err := client.UpdateAzureStorageAccountsPreparer(ctx, resourceGroupName, name, azureStorageAccounts)
33023	if err != nil {
33024		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", nil, "Failure preparing request")
33025		return
33026	}
33027
33028	resp, err := client.UpdateAzureStorageAccountsSender(req)
33029	if err != nil {
33030		result.Response = autorest.Response{Response: resp}
33031		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure sending request")
33032		return
33033	}
33034
33035	result, err = client.UpdateAzureStorageAccountsResponder(resp)
33036	if err != nil {
33037		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure responding to request")
33038		return
33039	}
33040
33041	return
33042}
33043
33044// UpdateAzureStorageAccountsPreparer prepares the UpdateAzureStorageAccounts request.
33045func (client AppsClient) UpdateAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (*http.Request, error) {
33046	pathParameters := map[string]interface{}{
33047		"name":              autorest.Encode("path", name),
33048		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33049		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33050	}
33051
33052	const APIVersion = "2020-09-01"
33053	queryParameters := map[string]interface{}{
33054		"api-version": APIVersion,
33055	}
33056
33057	preparer := autorest.CreatePreparer(
33058		autorest.AsContentType("application/json; charset=utf-8"),
33059		autorest.AsPut(),
33060		autorest.WithBaseURL(client.BaseURI),
33061		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts", pathParameters),
33062		autorest.WithJSON(azureStorageAccounts),
33063		autorest.WithQueryParameters(queryParameters))
33064	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33065}
33066
33067// UpdateAzureStorageAccountsSender sends the UpdateAzureStorageAccounts request. The method will close the
33068// http.Response Body if it receives an error.
33069func (client AppsClient) UpdateAzureStorageAccountsSender(req *http.Request) (*http.Response, error) {
33070	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33071}
33072
33073// UpdateAzureStorageAccountsResponder handles the response to the UpdateAzureStorageAccounts request. The method always
33074// closes the http.Response Body.
33075func (client AppsClient) UpdateAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
33076	err = autorest.Respond(
33077		resp,
33078		azure.WithErrorUnlessStatusCode(http.StatusOK),
33079		autorest.ByUnmarshallingJSON(&result),
33080		autorest.ByClosing())
33081	result.Response = autorest.Response{Response: resp}
33082	return
33083}
33084
33085// UpdateAzureStorageAccountsSlot description for Updates the Azure storage account configurations of an app.
33086// Parameters:
33087// resourceGroupName - name of the resource group to which the resource belongs.
33088// name - name of the app.
33089// azureStorageAccounts - azure storage accounts of the app.
33090// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage
33091// account configurations for the production slot.
33092func (client AppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (result AzureStoragePropertyDictionaryResource, err error) {
33093	if tracing.IsEnabled() {
33094		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateAzureStorageAccountsSlot")
33095		defer func() {
33096			sc := -1
33097			if result.Response.Response != nil {
33098				sc = result.Response.Response.StatusCode
33099			}
33100			tracing.EndSpan(ctx, sc, err)
33101		}()
33102	}
33103	if err := validation.Validate([]validation.Validation{
33104		{TargetValue: resourceGroupName,
33105			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33106				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33107				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33108		return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccountsSlot", err.Error())
33109	}
33110
33111	req, err := client.UpdateAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, azureStorageAccounts, slot)
33112	if err != nil {
33113		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", nil, "Failure preparing request")
33114		return
33115	}
33116
33117	resp, err := client.UpdateAzureStorageAccountsSlotSender(req)
33118	if err != nil {
33119		result.Response = autorest.Response{Response: resp}
33120		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure sending request")
33121		return
33122	}
33123
33124	result, err = client.UpdateAzureStorageAccountsSlotResponder(resp)
33125	if err != nil {
33126		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure responding to request")
33127		return
33128	}
33129
33130	return
33131}
33132
33133// UpdateAzureStorageAccountsSlotPreparer prepares the UpdateAzureStorageAccountsSlot request.
33134func (client AppsClient) UpdateAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (*http.Request, error) {
33135	pathParameters := map[string]interface{}{
33136		"name":              autorest.Encode("path", name),
33137		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33138		"slot":              autorest.Encode("path", slot),
33139		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33140	}
33141
33142	const APIVersion = "2020-09-01"
33143	queryParameters := map[string]interface{}{
33144		"api-version": APIVersion,
33145	}
33146
33147	preparer := autorest.CreatePreparer(
33148		autorest.AsContentType("application/json; charset=utf-8"),
33149		autorest.AsPut(),
33150		autorest.WithBaseURL(client.BaseURI),
33151		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts", pathParameters),
33152		autorest.WithJSON(azureStorageAccounts),
33153		autorest.WithQueryParameters(queryParameters))
33154	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33155}
33156
33157// UpdateAzureStorageAccountsSlotSender sends the UpdateAzureStorageAccountsSlot request. The method will close the
33158// http.Response Body if it receives an error.
33159func (client AppsClient) UpdateAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) {
33160	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33161}
33162
33163// UpdateAzureStorageAccountsSlotResponder handles the response to the UpdateAzureStorageAccountsSlot request. The method always
33164// closes the http.Response Body.
33165func (client AppsClient) UpdateAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) {
33166	err = autorest.Respond(
33167		resp,
33168		azure.WithErrorUnlessStatusCode(http.StatusOK),
33169		autorest.ByUnmarshallingJSON(&result),
33170		autorest.ByClosing())
33171	result.Response = autorest.Response{Response: resp}
33172	return
33173}
33174
33175// UpdateBackupConfiguration description for Updates the backup configuration of an app.
33176// Parameters:
33177// resourceGroupName - name of the resource group to which the resource belongs.
33178// name - name of the app.
33179// request - edited backup configuration.
33180func (client AppsClient) UpdateBackupConfiguration(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (result BackupRequest, err error) {
33181	if tracing.IsEnabled() {
33182		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateBackupConfiguration")
33183		defer func() {
33184			sc := -1
33185			if result.Response.Response != nil {
33186				sc = result.Response.Response.StatusCode
33187			}
33188			tracing.EndSpan(ctx, sc, err)
33189		}()
33190	}
33191	if err := validation.Validate([]validation.Validation{
33192		{TargetValue: resourceGroupName,
33193			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33194				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33195				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
33196		{TargetValue: request,
33197			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
33198				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
33199					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
33200						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
33201							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
33202							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
33203						}},
33204				}}}}}); err != nil {
33205		return result, validation.NewError("web.AppsClient", "UpdateBackupConfiguration", err.Error())
33206	}
33207
33208	req, err := client.UpdateBackupConfigurationPreparer(ctx, resourceGroupName, name, request)
33209	if err != nil {
33210		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", nil, "Failure preparing request")
33211		return
33212	}
33213
33214	resp, err := client.UpdateBackupConfigurationSender(req)
33215	if err != nil {
33216		result.Response = autorest.Response{Response: resp}
33217		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", resp, "Failure sending request")
33218		return
33219	}
33220
33221	result, err = client.UpdateBackupConfigurationResponder(resp)
33222	if err != nil {
33223		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfiguration", resp, "Failure responding to request")
33224		return
33225	}
33226
33227	return
33228}
33229
33230// UpdateBackupConfigurationPreparer prepares the UpdateBackupConfiguration request.
33231func (client AppsClient) UpdateBackupConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest) (*http.Request, error) {
33232	pathParameters := map[string]interface{}{
33233		"name":              autorest.Encode("path", name),
33234		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33235		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33236	}
33237
33238	const APIVersion = "2020-09-01"
33239	queryParameters := map[string]interface{}{
33240		"api-version": APIVersion,
33241	}
33242
33243	preparer := autorest.CreatePreparer(
33244		autorest.AsContentType("application/json; charset=utf-8"),
33245		autorest.AsPut(),
33246		autorest.WithBaseURL(client.BaseURI),
33247		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup", pathParameters),
33248		autorest.WithJSON(request),
33249		autorest.WithQueryParameters(queryParameters))
33250	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33251}
33252
33253// UpdateBackupConfigurationSender sends the UpdateBackupConfiguration request. The method will close the
33254// http.Response Body if it receives an error.
33255func (client AppsClient) UpdateBackupConfigurationSender(req *http.Request) (*http.Response, error) {
33256	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33257}
33258
33259// UpdateBackupConfigurationResponder handles the response to the UpdateBackupConfiguration request. The method always
33260// closes the http.Response Body.
33261func (client AppsClient) UpdateBackupConfigurationResponder(resp *http.Response) (result BackupRequest, err error) {
33262	err = autorest.Respond(
33263		resp,
33264		azure.WithErrorUnlessStatusCode(http.StatusOK),
33265		autorest.ByUnmarshallingJSON(&result),
33266		autorest.ByClosing())
33267	result.Response = autorest.Response{Response: resp}
33268	return
33269}
33270
33271// UpdateBackupConfigurationSlot description for Updates the backup configuration of an app.
33272// Parameters:
33273// resourceGroupName - name of the resource group to which the resource belongs.
33274// name - name of the app.
33275// request - edited backup configuration.
33276// slot - name of the deployment slot. If a slot is not specified, the API will update the backup configuration
33277// for the production slot.
33278func (client AppsClient) UpdateBackupConfigurationSlot(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (result BackupRequest, err error) {
33279	if tracing.IsEnabled() {
33280		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateBackupConfigurationSlot")
33281		defer func() {
33282			sc := -1
33283			if result.Response.Response != nil {
33284				sc = result.Response.Response.StatusCode
33285			}
33286			tracing.EndSpan(ctx, sc, err)
33287		}()
33288	}
33289	if err := validation.Validate([]validation.Validation{
33290		{TargetValue: resourceGroupName,
33291			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33292				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33293				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
33294		{TargetValue: request,
33295			Constraints: []validation.Constraint{{Target: "request.BackupRequestProperties", Name: validation.Null, Rule: false,
33296				Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.StorageAccountURL", Name: validation.Null, Rule: true, Chain: nil},
33297					{Target: "request.BackupRequestProperties.BackupSchedule", Name: validation.Null, Rule: false,
33298						Chain: []validation.Constraint{{Target: "request.BackupRequestProperties.BackupSchedule.FrequencyInterval", Name: validation.Null, Rule: true, Chain: nil},
33299							{Target: "request.BackupRequestProperties.BackupSchedule.KeepAtLeastOneBackup", Name: validation.Null, Rule: true, Chain: nil},
33300							{Target: "request.BackupRequestProperties.BackupSchedule.RetentionPeriodInDays", Name: validation.Null, Rule: true, Chain: nil},
33301						}},
33302				}}}}}); err != nil {
33303		return result, validation.NewError("web.AppsClient", "UpdateBackupConfigurationSlot", err.Error())
33304	}
33305
33306	req, err := client.UpdateBackupConfigurationSlotPreparer(ctx, resourceGroupName, name, request, slot)
33307	if err != nil {
33308		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", nil, "Failure preparing request")
33309		return
33310	}
33311
33312	resp, err := client.UpdateBackupConfigurationSlotSender(req)
33313	if err != nil {
33314		result.Response = autorest.Response{Response: resp}
33315		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", resp, "Failure sending request")
33316		return
33317	}
33318
33319	result, err = client.UpdateBackupConfigurationSlotResponder(resp)
33320	if err != nil {
33321		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateBackupConfigurationSlot", resp, "Failure responding to request")
33322		return
33323	}
33324
33325	return
33326}
33327
33328// UpdateBackupConfigurationSlotPreparer prepares the UpdateBackupConfigurationSlot request.
33329func (client AppsClient) UpdateBackupConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, request BackupRequest, slot string) (*http.Request, error) {
33330	pathParameters := map[string]interface{}{
33331		"name":              autorest.Encode("path", name),
33332		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33333		"slot":              autorest.Encode("path", slot),
33334		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33335	}
33336
33337	const APIVersion = "2020-09-01"
33338	queryParameters := map[string]interface{}{
33339		"api-version": APIVersion,
33340	}
33341
33342	preparer := autorest.CreatePreparer(
33343		autorest.AsContentType("application/json; charset=utf-8"),
33344		autorest.AsPut(),
33345		autorest.WithBaseURL(client.BaseURI),
33346		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup", pathParameters),
33347		autorest.WithJSON(request),
33348		autorest.WithQueryParameters(queryParameters))
33349	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33350}
33351
33352// UpdateBackupConfigurationSlotSender sends the UpdateBackupConfigurationSlot request. The method will close the
33353// http.Response Body if it receives an error.
33354func (client AppsClient) UpdateBackupConfigurationSlotSender(req *http.Request) (*http.Response, error) {
33355	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33356}
33357
33358// UpdateBackupConfigurationSlotResponder handles the response to the UpdateBackupConfigurationSlot request. The method always
33359// closes the http.Response Body.
33360func (client AppsClient) UpdateBackupConfigurationSlotResponder(resp *http.Response) (result BackupRequest, err error) {
33361	err = autorest.Respond(
33362		resp,
33363		azure.WithErrorUnlessStatusCode(http.StatusOK),
33364		autorest.ByUnmarshallingJSON(&result),
33365		autorest.ByClosing())
33366	result.Response = autorest.Response{Response: resp}
33367	return
33368}
33369
33370// UpdateConfiguration description for Updates the configuration of an app.
33371// Parameters:
33372// resourceGroupName - name of the resource group to which the resource belongs.
33373// name - name of the app.
33374// siteConfig - JSON representation of a SiteConfig object. See example.
33375func (client AppsClient) UpdateConfiguration(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) {
33376	if tracing.IsEnabled() {
33377		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConfiguration")
33378		defer func() {
33379			sc := -1
33380			if result.Response.Response != nil {
33381				sc = result.Response.Response.StatusCode
33382			}
33383			tracing.EndSpan(ctx, sc, err)
33384		}()
33385	}
33386	if err := validation.Validate([]validation.Validation{
33387		{TargetValue: resourceGroupName,
33388			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33389				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33390				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33391		return result, validation.NewError("web.AppsClient", "UpdateConfiguration", err.Error())
33392	}
33393
33394	req, err := client.UpdateConfigurationPreparer(ctx, resourceGroupName, name, siteConfig)
33395	if err != nil {
33396		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", nil, "Failure preparing request")
33397		return
33398	}
33399
33400	resp, err := client.UpdateConfigurationSender(req)
33401	if err != nil {
33402		result.Response = autorest.Response{Response: resp}
33403		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", resp, "Failure sending request")
33404		return
33405	}
33406
33407	result, err = client.UpdateConfigurationResponder(resp)
33408	if err != nil {
33409		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfiguration", resp, "Failure responding to request")
33410		return
33411	}
33412
33413	return
33414}
33415
33416// UpdateConfigurationPreparer prepares the UpdateConfiguration request.
33417func (client AppsClient) UpdateConfigurationPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource) (*http.Request, error) {
33418	pathParameters := map[string]interface{}{
33419		"name":              autorest.Encode("path", name),
33420		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33421		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33422	}
33423
33424	const APIVersion = "2020-09-01"
33425	queryParameters := map[string]interface{}{
33426		"api-version": APIVersion,
33427	}
33428
33429	preparer := autorest.CreatePreparer(
33430		autorest.AsContentType("application/json; charset=utf-8"),
33431		autorest.AsPatch(),
33432		autorest.WithBaseURL(client.BaseURI),
33433		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web", pathParameters),
33434		autorest.WithJSON(siteConfig),
33435		autorest.WithQueryParameters(queryParameters))
33436	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33437}
33438
33439// UpdateConfigurationSender sends the UpdateConfiguration request. The method will close the
33440// http.Response Body if it receives an error.
33441func (client AppsClient) UpdateConfigurationSender(req *http.Request) (*http.Response, error) {
33442	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33443}
33444
33445// UpdateConfigurationResponder handles the response to the UpdateConfiguration request. The method always
33446// closes the http.Response Body.
33447func (client AppsClient) UpdateConfigurationResponder(resp *http.Response) (result SiteConfigResource, err error) {
33448	err = autorest.Respond(
33449		resp,
33450		azure.WithErrorUnlessStatusCode(http.StatusOK),
33451		autorest.ByUnmarshallingJSON(&result),
33452		autorest.ByClosing())
33453	result.Response = autorest.Response{Response: resp}
33454	return
33455}
33456
33457// UpdateConfigurationSlot description for Updates the configuration of an app.
33458// Parameters:
33459// resourceGroupName - name of the resource group to which the resource belongs.
33460// name - name of the app.
33461// siteConfig - JSON representation of a SiteConfig object. See example.
33462// slot - name of the deployment slot. If a slot is not specified, the API will update configuration for the
33463// production slot.
33464func (client AppsClient) UpdateConfigurationSlot(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) {
33465	if tracing.IsEnabled() {
33466		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConfigurationSlot")
33467		defer func() {
33468			sc := -1
33469			if result.Response.Response != nil {
33470				sc = result.Response.Response.StatusCode
33471			}
33472			tracing.EndSpan(ctx, sc, err)
33473		}()
33474	}
33475	if err := validation.Validate([]validation.Validation{
33476		{TargetValue: resourceGroupName,
33477			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33478				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33479				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33480		return result, validation.NewError("web.AppsClient", "UpdateConfigurationSlot", err.Error())
33481	}
33482
33483	req, err := client.UpdateConfigurationSlotPreparer(ctx, resourceGroupName, name, siteConfig, slot)
33484	if err != nil {
33485		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", nil, "Failure preparing request")
33486		return
33487	}
33488
33489	resp, err := client.UpdateConfigurationSlotSender(req)
33490	if err != nil {
33491		result.Response = autorest.Response{Response: resp}
33492		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", resp, "Failure sending request")
33493		return
33494	}
33495
33496	result, err = client.UpdateConfigurationSlotResponder(resp)
33497	if err != nil {
33498		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConfigurationSlot", resp, "Failure responding to request")
33499		return
33500	}
33501
33502	return
33503}
33504
33505// UpdateConfigurationSlotPreparer prepares the UpdateConfigurationSlot request.
33506func (client AppsClient) UpdateConfigurationSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (*http.Request, error) {
33507	pathParameters := map[string]interface{}{
33508		"name":              autorest.Encode("path", name),
33509		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33510		"slot":              autorest.Encode("path", slot),
33511		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33512	}
33513
33514	const APIVersion = "2020-09-01"
33515	queryParameters := map[string]interface{}{
33516		"api-version": APIVersion,
33517	}
33518
33519	preparer := autorest.CreatePreparer(
33520		autorest.AsContentType("application/json; charset=utf-8"),
33521		autorest.AsPatch(),
33522		autorest.WithBaseURL(client.BaseURI),
33523		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web", pathParameters),
33524		autorest.WithJSON(siteConfig),
33525		autorest.WithQueryParameters(queryParameters))
33526	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33527}
33528
33529// UpdateConfigurationSlotSender sends the UpdateConfigurationSlot request. The method will close the
33530// http.Response Body if it receives an error.
33531func (client AppsClient) UpdateConfigurationSlotSender(req *http.Request) (*http.Response, error) {
33532	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33533}
33534
33535// UpdateConfigurationSlotResponder handles the response to the UpdateConfigurationSlot request. The method always
33536// closes the http.Response Body.
33537func (client AppsClient) UpdateConfigurationSlotResponder(resp *http.Response) (result SiteConfigResource, err error) {
33538	err = autorest.Respond(
33539		resp,
33540		azure.WithErrorUnlessStatusCode(http.StatusOK),
33541		autorest.ByUnmarshallingJSON(&result),
33542		autorest.ByClosing())
33543	result.Response = autorest.Response{Response: resp}
33544	return
33545}
33546
33547// UpdateConnectionStrings description for Replaces the connection strings of an app.
33548// Parameters:
33549// resourceGroupName - name of the resource group to which the resource belongs.
33550// name - name of the app.
33551// connectionStrings - connection strings of the app or deployment slot. See example.
33552func (client AppsClient) UpdateConnectionStrings(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (result ConnectionStringDictionary, err error) {
33553	if tracing.IsEnabled() {
33554		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConnectionStrings")
33555		defer func() {
33556			sc := -1
33557			if result.Response.Response != nil {
33558				sc = result.Response.Response.StatusCode
33559			}
33560			tracing.EndSpan(ctx, sc, err)
33561		}()
33562	}
33563	if err := validation.Validate([]validation.Validation{
33564		{TargetValue: resourceGroupName,
33565			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33566				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33567				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33568		return result, validation.NewError("web.AppsClient", "UpdateConnectionStrings", err.Error())
33569	}
33570
33571	req, err := client.UpdateConnectionStringsPreparer(ctx, resourceGroupName, name, connectionStrings)
33572	if err != nil {
33573		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", nil, "Failure preparing request")
33574		return
33575	}
33576
33577	resp, err := client.UpdateConnectionStringsSender(req)
33578	if err != nil {
33579		result.Response = autorest.Response{Response: resp}
33580		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", resp, "Failure sending request")
33581		return
33582	}
33583
33584	result, err = client.UpdateConnectionStringsResponder(resp)
33585	if err != nil {
33586		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStrings", resp, "Failure responding to request")
33587		return
33588	}
33589
33590	return
33591}
33592
33593// UpdateConnectionStringsPreparer prepares the UpdateConnectionStrings request.
33594func (client AppsClient) UpdateConnectionStringsPreparer(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (*http.Request, error) {
33595	pathParameters := map[string]interface{}{
33596		"name":              autorest.Encode("path", name),
33597		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33598		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33599	}
33600
33601	const APIVersion = "2020-09-01"
33602	queryParameters := map[string]interface{}{
33603		"api-version": APIVersion,
33604	}
33605
33606	preparer := autorest.CreatePreparer(
33607		autorest.AsContentType("application/json; charset=utf-8"),
33608		autorest.AsPut(),
33609		autorest.WithBaseURL(client.BaseURI),
33610		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings", pathParameters),
33611		autorest.WithJSON(connectionStrings),
33612		autorest.WithQueryParameters(queryParameters))
33613	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33614}
33615
33616// UpdateConnectionStringsSender sends the UpdateConnectionStrings request. The method will close the
33617// http.Response Body if it receives an error.
33618func (client AppsClient) UpdateConnectionStringsSender(req *http.Request) (*http.Response, error) {
33619	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33620}
33621
33622// UpdateConnectionStringsResponder handles the response to the UpdateConnectionStrings request. The method always
33623// closes the http.Response Body.
33624func (client AppsClient) UpdateConnectionStringsResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
33625	err = autorest.Respond(
33626		resp,
33627		azure.WithErrorUnlessStatusCode(http.StatusOK),
33628		autorest.ByUnmarshallingJSON(&result),
33629		autorest.ByClosing())
33630	result.Response = autorest.Response{Response: resp}
33631	return
33632}
33633
33634// UpdateConnectionStringsSlot description for Replaces the connection strings of an app.
33635// Parameters:
33636// resourceGroupName - name of the resource group to which the resource belongs.
33637// name - name of the app.
33638// connectionStrings - connection strings of the app or deployment slot. See example.
33639// slot - name of the deployment slot. If a slot is not specified, the API will update the connection settings
33640// for the production slot.
33641func (client AppsClient) UpdateConnectionStringsSlot(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (result ConnectionStringDictionary, err error) {
33642	if tracing.IsEnabled() {
33643		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateConnectionStringsSlot")
33644		defer func() {
33645			sc := -1
33646			if result.Response.Response != nil {
33647				sc = result.Response.Response.StatusCode
33648			}
33649			tracing.EndSpan(ctx, sc, err)
33650		}()
33651	}
33652	if err := validation.Validate([]validation.Validation{
33653		{TargetValue: resourceGroupName,
33654			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33655				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33656				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33657		return result, validation.NewError("web.AppsClient", "UpdateConnectionStringsSlot", err.Error())
33658	}
33659
33660	req, err := client.UpdateConnectionStringsSlotPreparer(ctx, resourceGroupName, name, connectionStrings, slot)
33661	if err != nil {
33662		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", nil, "Failure preparing request")
33663		return
33664	}
33665
33666	resp, err := client.UpdateConnectionStringsSlotSender(req)
33667	if err != nil {
33668		result.Response = autorest.Response{Response: resp}
33669		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", resp, "Failure sending request")
33670		return
33671	}
33672
33673	result, err = client.UpdateConnectionStringsSlotResponder(resp)
33674	if err != nil {
33675		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateConnectionStringsSlot", resp, "Failure responding to request")
33676		return
33677	}
33678
33679	return
33680}
33681
33682// UpdateConnectionStringsSlotPreparer prepares the UpdateConnectionStringsSlot request.
33683func (client AppsClient) UpdateConnectionStringsSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (*http.Request, error) {
33684	pathParameters := map[string]interface{}{
33685		"name":              autorest.Encode("path", name),
33686		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33687		"slot":              autorest.Encode("path", slot),
33688		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33689	}
33690
33691	const APIVersion = "2020-09-01"
33692	queryParameters := map[string]interface{}{
33693		"api-version": APIVersion,
33694	}
33695
33696	preparer := autorest.CreatePreparer(
33697		autorest.AsContentType("application/json; charset=utf-8"),
33698		autorest.AsPut(),
33699		autorest.WithBaseURL(client.BaseURI),
33700		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings", pathParameters),
33701		autorest.WithJSON(connectionStrings),
33702		autorest.WithQueryParameters(queryParameters))
33703	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33704}
33705
33706// UpdateConnectionStringsSlotSender sends the UpdateConnectionStringsSlot request. The method will close the
33707// http.Response Body if it receives an error.
33708func (client AppsClient) UpdateConnectionStringsSlotSender(req *http.Request) (*http.Response, error) {
33709	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33710}
33711
33712// UpdateConnectionStringsSlotResponder handles the response to the UpdateConnectionStringsSlot request. The method always
33713// closes the http.Response Body.
33714func (client AppsClient) UpdateConnectionStringsSlotResponder(resp *http.Response) (result ConnectionStringDictionary, err error) {
33715	err = autorest.Respond(
33716		resp,
33717		azure.WithErrorUnlessStatusCode(http.StatusOK),
33718		autorest.ByUnmarshallingJSON(&result),
33719		autorest.ByClosing())
33720	result.Response = autorest.Response{Response: resp}
33721	return
33722}
33723
33724// UpdateDiagnosticLogsConfig description for Updates the logging configuration of an app.
33725// Parameters:
33726// resourceGroupName - name of the resource group to which the resource belongs.
33727// name - name of the app.
33728// siteLogsConfig - a SiteLogsConfig JSON object that contains the logging configuration to change in the
33729// "properties" property.
33730func (client AppsClient) UpdateDiagnosticLogsConfig(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (result SiteLogsConfig, err error) {
33731	if tracing.IsEnabled() {
33732		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDiagnosticLogsConfig")
33733		defer func() {
33734			sc := -1
33735			if result.Response.Response != nil {
33736				sc = result.Response.Response.StatusCode
33737			}
33738			tracing.EndSpan(ctx, sc, err)
33739		}()
33740	}
33741	if err := validation.Validate([]validation.Validation{
33742		{TargetValue: resourceGroupName,
33743			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33744				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33745				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
33746		{TargetValue: siteLogsConfig,
33747			Constraints: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties", Name: validation.Null, Rule: false,
33748				Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs", Name: validation.Null, Rule: false,
33749					Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage", Name: validation.Null, Rule: false,
33750						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage.SasURL", Name: validation.Null, Rule: true, Chain: nil}}},
33751					}},
33752					{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false,
33753						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false,
33754							Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false,
33755								Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
33756									{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil},
33757								}},
33758							}},
33759						}},
33760				}}}}}); err != nil {
33761		return result, validation.NewError("web.AppsClient", "UpdateDiagnosticLogsConfig", err.Error())
33762	}
33763
33764	req, err := client.UpdateDiagnosticLogsConfigPreparer(ctx, resourceGroupName, name, siteLogsConfig)
33765	if err != nil {
33766		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", nil, "Failure preparing request")
33767		return
33768	}
33769
33770	resp, err := client.UpdateDiagnosticLogsConfigSender(req)
33771	if err != nil {
33772		result.Response = autorest.Response{Response: resp}
33773		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", resp, "Failure sending request")
33774		return
33775	}
33776
33777	result, err = client.UpdateDiagnosticLogsConfigResponder(resp)
33778	if err != nil {
33779		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfig", resp, "Failure responding to request")
33780		return
33781	}
33782
33783	return
33784}
33785
33786// UpdateDiagnosticLogsConfigPreparer prepares the UpdateDiagnosticLogsConfig request.
33787func (client AppsClient) UpdateDiagnosticLogsConfigPreparer(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (*http.Request, error) {
33788	pathParameters := map[string]interface{}{
33789		"name":              autorest.Encode("path", name),
33790		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33791		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33792	}
33793
33794	const APIVersion = "2020-09-01"
33795	queryParameters := map[string]interface{}{
33796		"api-version": APIVersion,
33797	}
33798
33799	preparer := autorest.CreatePreparer(
33800		autorest.AsContentType("application/json; charset=utf-8"),
33801		autorest.AsPut(),
33802		autorest.WithBaseURL(client.BaseURI),
33803		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs", pathParameters),
33804		autorest.WithJSON(siteLogsConfig),
33805		autorest.WithQueryParameters(queryParameters))
33806	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33807}
33808
33809// UpdateDiagnosticLogsConfigSender sends the UpdateDiagnosticLogsConfig request. The method will close the
33810// http.Response Body if it receives an error.
33811func (client AppsClient) UpdateDiagnosticLogsConfigSender(req *http.Request) (*http.Response, error) {
33812	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33813}
33814
33815// UpdateDiagnosticLogsConfigResponder handles the response to the UpdateDiagnosticLogsConfig request. The method always
33816// closes the http.Response Body.
33817func (client AppsClient) UpdateDiagnosticLogsConfigResponder(resp *http.Response) (result SiteLogsConfig, err error) {
33818	err = autorest.Respond(
33819		resp,
33820		azure.WithErrorUnlessStatusCode(http.StatusOK),
33821		autorest.ByUnmarshallingJSON(&result),
33822		autorest.ByClosing())
33823	result.Response = autorest.Response{Response: resp}
33824	return
33825}
33826
33827// UpdateDiagnosticLogsConfigSlot description for Updates the logging configuration of an app.
33828// Parameters:
33829// resourceGroupName - name of the resource group to which the resource belongs.
33830// name - name of the app.
33831// siteLogsConfig - a SiteLogsConfig JSON object that contains the logging configuration to change in the
33832// "properties" property.
33833// slot - name of the deployment slot. If a slot is not specified, the API will update the logging
33834// configuration for the production slot.
33835func (client AppsClient) UpdateDiagnosticLogsConfigSlot(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (result SiteLogsConfig, err error) {
33836	if tracing.IsEnabled() {
33837		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDiagnosticLogsConfigSlot")
33838		defer func() {
33839			sc := -1
33840			if result.Response.Response != nil {
33841				sc = result.Response.Response.StatusCode
33842			}
33843			tracing.EndSpan(ctx, sc, err)
33844		}()
33845	}
33846	if err := validation.Validate([]validation.Validation{
33847		{TargetValue: resourceGroupName,
33848			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33849				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33850				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
33851		{TargetValue: siteLogsConfig,
33852			Constraints: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties", Name: validation.Null, Rule: false,
33853				Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs", Name: validation.Null, Rule: false,
33854					Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage", Name: validation.Null, Rule: false,
33855						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.ApplicationLogs.AzureTableStorage.SasURL", Name: validation.Null, Rule: true, Chain: nil}}},
33856					}},
33857					{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs", Name: validation.Null, Rule: false,
33858						Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem", Name: validation.Null, Rule: false,
33859							Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.Null, Rule: false,
33860								Chain: []validation.Constraint{{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
33861									{Target: "siteLogsConfig.SiteLogsConfigProperties.HTTPLogs.FileSystem.RetentionInMb", Name: validation.InclusiveMinimum, Rule: int64(25), Chain: nil},
33862								}},
33863							}},
33864						}},
33865				}}}}}); err != nil {
33866		return result, validation.NewError("web.AppsClient", "UpdateDiagnosticLogsConfigSlot", err.Error())
33867	}
33868
33869	req, err := client.UpdateDiagnosticLogsConfigSlotPreparer(ctx, resourceGroupName, name, siteLogsConfig, slot)
33870	if err != nil {
33871		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", nil, "Failure preparing request")
33872		return
33873	}
33874
33875	resp, err := client.UpdateDiagnosticLogsConfigSlotSender(req)
33876	if err != nil {
33877		result.Response = autorest.Response{Response: resp}
33878		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", resp, "Failure sending request")
33879		return
33880	}
33881
33882	result, err = client.UpdateDiagnosticLogsConfigSlotResponder(resp)
33883	if err != nil {
33884		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDiagnosticLogsConfigSlot", resp, "Failure responding to request")
33885		return
33886	}
33887
33888	return
33889}
33890
33891// UpdateDiagnosticLogsConfigSlotPreparer prepares the UpdateDiagnosticLogsConfigSlot request.
33892func (client AppsClient) UpdateDiagnosticLogsConfigSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (*http.Request, error) {
33893	pathParameters := map[string]interface{}{
33894		"name":              autorest.Encode("path", name),
33895		"resourceGroupName": autorest.Encode("path", resourceGroupName),
33896		"slot":              autorest.Encode("path", slot),
33897		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
33898	}
33899
33900	const APIVersion = "2020-09-01"
33901	queryParameters := map[string]interface{}{
33902		"api-version": APIVersion,
33903	}
33904
33905	preparer := autorest.CreatePreparer(
33906		autorest.AsContentType("application/json; charset=utf-8"),
33907		autorest.AsPut(),
33908		autorest.WithBaseURL(client.BaseURI),
33909		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs", pathParameters),
33910		autorest.WithJSON(siteLogsConfig),
33911		autorest.WithQueryParameters(queryParameters))
33912	return preparer.Prepare((&http.Request{}).WithContext(ctx))
33913}
33914
33915// UpdateDiagnosticLogsConfigSlotSender sends the UpdateDiagnosticLogsConfigSlot request. The method will close the
33916// http.Response Body if it receives an error.
33917func (client AppsClient) UpdateDiagnosticLogsConfigSlotSender(req *http.Request) (*http.Response, error) {
33918	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
33919}
33920
33921// UpdateDiagnosticLogsConfigSlotResponder handles the response to the UpdateDiagnosticLogsConfigSlot request. The method always
33922// closes the http.Response Body.
33923func (client AppsClient) UpdateDiagnosticLogsConfigSlotResponder(resp *http.Response) (result SiteLogsConfig, err error) {
33924	err = autorest.Respond(
33925		resp,
33926		azure.WithErrorUnlessStatusCode(http.StatusOK),
33927		autorest.ByUnmarshallingJSON(&result),
33928		autorest.ByClosing())
33929	result.Response = autorest.Response{Response: resp}
33930	return
33931}
33932
33933// UpdateDomainOwnershipIdentifier description for Creates a domain ownership identifier for web app, or updates an
33934// existing ownership identifier.
33935// Parameters:
33936// resourceGroupName - name of the resource group to which the resource belongs.
33937// name - name of the app.
33938// domainOwnershipIdentifierName - name of domain ownership identifier.
33939// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
33940func (client AppsClient) UpdateDomainOwnershipIdentifier(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) {
33941	if tracing.IsEnabled() {
33942		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDomainOwnershipIdentifier")
33943		defer func() {
33944			sc := -1
33945			if result.Response.Response != nil {
33946				sc = result.Response.Response.StatusCode
33947			}
33948			tracing.EndSpan(ctx, sc, err)
33949		}()
33950	}
33951	if err := validation.Validate([]validation.Validation{
33952		{TargetValue: resourceGroupName,
33953			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
33954				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
33955				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
33956		return result, validation.NewError("web.AppsClient", "UpdateDomainOwnershipIdentifier", err.Error())
33957	}
33958
33959	req, err := client.UpdateDomainOwnershipIdentifierPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier)
33960	if err != nil {
33961		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", nil, "Failure preparing request")
33962		return
33963	}
33964
33965	resp, err := client.UpdateDomainOwnershipIdentifierSender(req)
33966	if err != nil {
33967		result.Response = autorest.Response{Response: resp}
33968		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", resp, "Failure sending request")
33969		return
33970	}
33971
33972	result, err = client.UpdateDomainOwnershipIdentifierResponder(resp)
33973	if err != nil {
33974		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifier", resp, "Failure responding to request")
33975		return
33976	}
33977
33978	return
33979}
33980
33981// UpdateDomainOwnershipIdentifierPreparer prepares the UpdateDomainOwnershipIdentifier request.
33982func (client AppsClient) UpdateDomainOwnershipIdentifierPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (*http.Request, error) {
33983	pathParameters := map[string]interface{}{
33984		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
33985		"name":                          autorest.Encode("path", name),
33986		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
33987		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
33988	}
33989
33990	const APIVersion = "2020-09-01"
33991	queryParameters := map[string]interface{}{
33992		"api-version": APIVersion,
33993	}
33994
33995	preparer := autorest.CreatePreparer(
33996		autorest.AsContentType("application/json; charset=utf-8"),
33997		autorest.AsPatch(),
33998		autorest.WithBaseURL(client.BaseURI),
33999		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
34000		autorest.WithJSON(domainOwnershipIdentifier),
34001		autorest.WithQueryParameters(queryParameters))
34002	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34003}
34004
34005// UpdateDomainOwnershipIdentifierSender sends the UpdateDomainOwnershipIdentifier request. The method will close the
34006// http.Response Body if it receives an error.
34007func (client AppsClient) UpdateDomainOwnershipIdentifierSender(req *http.Request) (*http.Response, error) {
34008	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34009}
34010
34011// UpdateDomainOwnershipIdentifierResponder handles the response to the UpdateDomainOwnershipIdentifier request. The method always
34012// closes the http.Response Body.
34013func (client AppsClient) UpdateDomainOwnershipIdentifierResponder(resp *http.Response) (result Identifier, err error) {
34014	err = autorest.Respond(
34015		resp,
34016		azure.WithErrorUnlessStatusCode(http.StatusOK),
34017		autorest.ByUnmarshallingJSON(&result),
34018		autorest.ByClosing())
34019	result.Response = autorest.Response{Response: resp}
34020	return
34021}
34022
34023// UpdateDomainOwnershipIdentifierSlot description for Creates a domain ownership identifier for web app, or updates an
34024// existing ownership identifier.
34025// Parameters:
34026// resourceGroupName - name of the resource group to which the resource belongs.
34027// name - name of the app.
34028// domainOwnershipIdentifierName - name of domain ownership identifier.
34029// domainOwnershipIdentifier - a JSON representation of the domain ownership properties.
34030// slot - name of the deployment slot. If a slot is not specified, the API will delete the binding for the
34031// production slot.
34032func (client AppsClient) UpdateDomainOwnershipIdentifierSlot(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) {
34033	if tracing.IsEnabled() {
34034		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateDomainOwnershipIdentifierSlot")
34035		defer func() {
34036			sc := -1
34037			if result.Response.Response != nil {
34038				sc = result.Response.Response.StatusCode
34039			}
34040			tracing.EndSpan(ctx, sc, err)
34041		}()
34042	}
34043	if err := validation.Validate([]validation.Validation{
34044		{TargetValue: resourceGroupName,
34045			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34046				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34047				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34048		return result, validation.NewError("web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", err.Error())
34049	}
34050
34051	req, err := client.UpdateDomainOwnershipIdentifierSlotPreparer(ctx, resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot)
34052	if err != nil {
34053		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", nil, "Failure preparing request")
34054		return
34055	}
34056
34057	resp, err := client.UpdateDomainOwnershipIdentifierSlotSender(req)
34058	if err != nil {
34059		result.Response = autorest.Response{Response: resp}
34060		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", resp, "Failure sending request")
34061		return
34062	}
34063
34064	result, err = client.UpdateDomainOwnershipIdentifierSlotResponder(resp)
34065	if err != nil {
34066		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateDomainOwnershipIdentifierSlot", resp, "Failure responding to request")
34067		return
34068	}
34069
34070	return
34071}
34072
34073// UpdateDomainOwnershipIdentifierSlotPreparer prepares the UpdateDomainOwnershipIdentifierSlot request.
34074func (client AppsClient) UpdateDomainOwnershipIdentifierSlotPreparer(ctx context.Context, resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (*http.Request, error) {
34075	pathParameters := map[string]interface{}{
34076		"domainOwnershipIdentifierName": autorest.Encode("path", domainOwnershipIdentifierName),
34077		"name":                          autorest.Encode("path", name),
34078		"resourceGroupName":             autorest.Encode("path", resourceGroupName),
34079		"slot":                          autorest.Encode("path", slot),
34080		"subscriptionId":                autorest.Encode("path", client.SubscriptionID),
34081	}
34082
34083	const APIVersion = "2020-09-01"
34084	queryParameters := map[string]interface{}{
34085		"api-version": APIVersion,
34086	}
34087
34088	preparer := autorest.CreatePreparer(
34089		autorest.AsContentType("application/json; charset=utf-8"),
34090		autorest.AsPatch(),
34091		autorest.WithBaseURL(client.BaseURI),
34092		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}", pathParameters),
34093		autorest.WithJSON(domainOwnershipIdentifier),
34094		autorest.WithQueryParameters(queryParameters))
34095	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34096}
34097
34098// UpdateDomainOwnershipIdentifierSlotSender sends the UpdateDomainOwnershipIdentifierSlot request. The method will close the
34099// http.Response Body if it receives an error.
34100func (client AppsClient) UpdateDomainOwnershipIdentifierSlotSender(req *http.Request) (*http.Response, error) {
34101	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34102}
34103
34104// UpdateDomainOwnershipIdentifierSlotResponder handles the response to the UpdateDomainOwnershipIdentifierSlot request. The method always
34105// closes the http.Response Body.
34106func (client AppsClient) UpdateDomainOwnershipIdentifierSlotResponder(resp *http.Response) (result Identifier, err error) {
34107	err = autorest.Respond(
34108		resp,
34109		azure.WithErrorUnlessStatusCode(http.StatusOK),
34110		autorest.ByUnmarshallingJSON(&result),
34111		autorest.ByClosing())
34112	result.Response = autorest.Response{Response: resp}
34113	return
34114}
34115
34116// UpdateFtpAllowed description for Updates whether FTP is allowed on the site or not.
34117// Parameters:
34118// resourceGroupName - name of the resource group to which the resource belongs.
34119// name - name of the app.
34120func (client AppsClient) UpdateFtpAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (result CsmPublishingCredentialsPoliciesEntity, err error) {
34121	if tracing.IsEnabled() {
34122		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateFtpAllowed")
34123		defer func() {
34124			sc := -1
34125			if result.Response.Response != nil {
34126				sc = result.Response.Response.StatusCode
34127			}
34128			tracing.EndSpan(ctx, sc, err)
34129		}()
34130	}
34131	if err := validation.Validate([]validation.Validation{
34132		{TargetValue: resourceGroupName,
34133			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34134				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34135				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
34136		{TargetValue: csmPublishingAccessPoliciesEntity,
34137			Constraints: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties", Name: validation.Null, Rule: false,
34138				Chain: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties.Allow", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
34139		return result, validation.NewError("web.AppsClient", "UpdateFtpAllowed", err.Error())
34140	}
34141
34142	req, err := client.UpdateFtpAllowedPreparer(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity)
34143	if err != nil {
34144		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowed", nil, "Failure preparing request")
34145		return
34146	}
34147
34148	resp, err := client.UpdateFtpAllowedSender(req)
34149	if err != nil {
34150		result.Response = autorest.Response{Response: resp}
34151		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowed", resp, "Failure sending request")
34152		return
34153	}
34154
34155	result, err = client.UpdateFtpAllowedResponder(resp)
34156	if err != nil {
34157		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateFtpAllowed", resp, "Failure responding to request")
34158		return
34159	}
34160
34161	return
34162}
34163
34164// UpdateFtpAllowedPreparer prepares the UpdateFtpAllowed request.
34165func (client AppsClient) UpdateFtpAllowedPreparer(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (*http.Request, error) {
34166	pathParameters := map[string]interface{}{
34167		"name":              autorest.Encode("path", name),
34168		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34169		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34170	}
34171
34172	const APIVersion = "2020-09-01"
34173	queryParameters := map[string]interface{}{
34174		"api-version": APIVersion,
34175	}
34176
34177	preparer := autorest.CreatePreparer(
34178		autorest.AsContentType("application/json; charset=utf-8"),
34179		autorest.AsPut(),
34180		autorest.WithBaseURL(client.BaseURI),
34181		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp", pathParameters),
34182		autorest.WithJSON(csmPublishingAccessPoliciesEntity),
34183		autorest.WithQueryParameters(queryParameters))
34184	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34185}
34186
34187// UpdateFtpAllowedSender sends the UpdateFtpAllowed request. The method will close the
34188// http.Response Body if it receives an error.
34189func (client AppsClient) UpdateFtpAllowedSender(req *http.Request) (*http.Response, error) {
34190	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34191}
34192
34193// UpdateFtpAllowedResponder handles the response to the UpdateFtpAllowed request. The method always
34194// closes the http.Response Body.
34195func (client AppsClient) UpdateFtpAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
34196	err = autorest.Respond(
34197		resp,
34198		azure.WithErrorUnlessStatusCode(http.StatusOK),
34199		autorest.ByUnmarshallingJSON(&result),
34200		autorest.ByClosing())
34201	result.Response = autorest.Response{Response: resp}
34202	return
34203}
34204
34205// UpdateHybridConnection description for Creates a new Hybrid Connection using a Service Bus relay.
34206// Parameters:
34207// resourceGroupName - name of the resource group to which the resource belongs.
34208// name - the name of the web app.
34209// namespaceName - the namespace for this hybrid connection.
34210// relayName - the relay name for this hybrid connection.
34211// connectionEnvelope - the details of the hybrid connection.
34212func (client AppsClient) UpdateHybridConnection(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) {
34213	if tracing.IsEnabled() {
34214		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateHybridConnection")
34215		defer func() {
34216			sc := -1
34217			if result.Response.Response != nil {
34218				sc = result.Response.Response.StatusCode
34219			}
34220			tracing.EndSpan(ctx, sc, err)
34221		}()
34222	}
34223	if err := validation.Validate([]validation.Validation{
34224		{TargetValue: resourceGroupName,
34225			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34226				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34227				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34228		return result, validation.NewError("web.AppsClient", "UpdateHybridConnection", err.Error())
34229	}
34230
34231	req, err := client.UpdateHybridConnectionPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope)
34232	if err != nil {
34233		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", nil, "Failure preparing request")
34234		return
34235	}
34236
34237	resp, err := client.UpdateHybridConnectionSender(req)
34238	if err != nil {
34239		result.Response = autorest.Response{Response: resp}
34240		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", resp, "Failure sending request")
34241		return
34242	}
34243
34244	result, err = client.UpdateHybridConnectionResponder(resp)
34245	if err != nil {
34246		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnection", resp, "Failure responding to request")
34247		return
34248	}
34249
34250	return
34251}
34252
34253// UpdateHybridConnectionPreparer prepares the UpdateHybridConnection request.
34254func (client AppsClient) UpdateHybridConnectionPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (*http.Request, error) {
34255	pathParameters := map[string]interface{}{
34256		"name":              autorest.Encode("path", name),
34257		"namespaceName":     autorest.Encode("path", namespaceName),
34258		"relayName":         autorest.Encode("path", relayName),
34259		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34260		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34261	}
34262
34263	const APIVersion = "2020-09-01"
34264	queryParameters := map[string]interface{}{
34265		"api-version": APIVersion,
34266	}
34267
34268	preparer := autorest.CreatePreparer(
34269		autorest.AsContentType("application/json; charset=utf-8"),
34270		autorest.AsPatch(),
34271		autorest.WithBaseURL(client.BaseURI),
34272		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
34273		autorest.WithJSON(connectionEnvelope),
34274		autorest.WithQueryParameters(queryParameters))
34275	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34276}
34277
34278// UpdateHybridConnectionSender sends the UpdateHybridConnection request. The method will close the
34279// http.Response Body if it receives an error.
34280func (client AppsClient) UpdateHybridConnectionSender(req *http.Request) (*http.Response, error) {
34281	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34282}
34283
34284// UpdateHybridConnectionResponder handles the response to the UpdateHybridConnection request. The method always
34285// closes the http.Response Body.
34286func (client AppsClient) UpdateHybridConnectionResponder(resp *http.Response) (result HybridConnection, err error) {
34287	err = autorest.Respond(
34288		resp,
34289		azure.WithErrorUnlessStatusCode(http.StatusOK),
34290		autorest.ByUnmarshallingJSON(&result),
34291		autorest.ByClosing())
34292	result.Response = autorest.Response{Response: resp}
34293	return
34294}
34295
34296// UpdateHybridConnectionSlot description for Creates a new Hybrid Connection using a Service Bus relay.
34297// Parameters:
34298// resourceGroupName - name of the resource group to which the resource belongs.
34299// name - the name of the web app.
34300// namespaceName - the namespace for this hybrid connection.
34301// relayName - the relay name for this hybrid connection.
34302// connectionEnvelope - the details of the hybrid connection.
34303// slot - the name of the slot for the web app.
34304func (client AppsClient) UpdateHybridConnectionSlot(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) {
34305	if tracing.IsEnabled() {
34306		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateHybridConnectionSlot")
34307		defer func() {
34308			sc := -1
34309			if result.Response.Response != nil {
34310				sc = result.Response.Response.StatusCode
34311			}
34312			tracing.EndSpan(ctx, sc, err)
34313		}()
34314	}
34315	if err := validation.Validate([]validation.Validation{
34316		{TargetValue: resourceGroupName,
34317			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34318				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34319				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34320		return result, validation.NewError("web.AppsClient", "UpdateHybridConnectionSlot", err.Error())
34321	}
34322
34323	req, err := client.UpdateHybridConnectionSlotPreparer(ctx, resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot)
34324	if err != nil {
34325		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", nil, "Failure preparing request")
34326		return
34327	}
34328
34329	resp, err := client.UpdateHybridConnectionSlotSender(req)
34330	if err != nil {
34331		result.Response = autorest.Response{Response: resp}
34332		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", resp, "Failure sending request")
34333		return
34334	}
34335
34336	result, err = client.UpdateHybridConnectionSlotResponder(resp)
34337	if err != nil {
34338		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateHybridConnectionSlot", resp, "Failure responding to request")
34339		return
34340	}
34341
34342	return
34343}
34344
34345// UpdateHybridConnectionSlotPreparer prepares the UpdateHybridConnectionSlot request.
34346func (client AppsClient) UpdateHybridConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (*http.Request, error) {
34347	pathParameters := map[string]interface{}{
34348		"name":              autorest.Encode("path", name),
34349		"namespaceName":     autorest.Encode("path", namespaceName),
34350		"relayName":         autorest.Encode("path", relayName),
34351		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34352		"slot":              autorest.Encode("path", slot),
34353		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34354	}
34355
34356	const APIVersion = "2020-09-01"
34357	queryParameters := map[string]interface{}{
34358		"api-version": APIVersion,
34359	}
34360
34361	preparer := autorest.CreatePreparer(
34362		autorest.AsContentType("application/json; charset=utf-8"),
34363		autorest.AsPatch(),
34364		autorest.WithBaseURL(client.BaseURI),
34365		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}", pathParameters),
34366		autorest.WithJSON(connectionEnvelope),
34367		autorest.WithQueryParameters(queryParameters))
34368	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34369}
34370
34371// UpdateHybridConnectionSlotSender sends the UpdateHybridConnectionSlot request. The method will close the
34372// http.Response Body if it receives an error.
34373func (client AppsClient) UpdateHybridConnectionSlotSender(req *http.Request) (*http.Response, error) {
34374	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34375}
34376
34377// UpdateHybridConnectionSlotResponder handles the response to the UpdateHybridConnectionSlot request. The method always
34378// closes the http.Response Body.
34379func (client AppsClient) UpdateHybridConnectionSlotResponder(resp *http.Response) (result HybridConnection, err error) {
34380	err = autorest.Respond(
34381		resp,
34382		azure.WithErrorUnlessStatusCode(http.StatusOK),
34383		autorest.ByUnmarshallingJSON(&result),
34384		autorest.ByClosing())
34385	result.Response = autorest.Response{Response: resp}
34386	return
34387}
34388
34389// UpdateMetadata description for Replaces the metadata of an app.
34390// Parameters:
34391// resourceGroupName - name of the resource group to which the resource belongs.
34392// name - name of the app.
34393// metadata - edited metadata of the app or deployment slot. See example.
34394func (client AppsClient) UpdateMetadata(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary) (result StringDictionary, err error) {
34395	if tracing.IsEnabled() {
34396		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateMetadata")
34397		defer func() {
34398			sc := -1
34399			if result.Response.Response != nil {
34400				sc = result.Response.Response.StatusCode
34401			}
34402			tracing.EndSpan(ctx, sc, err)
34403		}()
34404	}
34405	if err := validation.Validate([]validation.Validation{
34406		{TargetValue: resourceGroupName,
34407			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34408				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34409				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34410		return result, validation.NewError("web.AppsClient", "UpdateMetadata", err.Error())
34411	}
34412
34413	req, err := client.UpdateMetadataPreparer(ctx, resourceGroupName, name, metadata)
34414	if err != nil {
34415		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", nil, "Failure preparing request")
34416		return
34417	}
34418
34419	resp, err := client.UpdateMetadataSender(req)
34420	if err != nil {
34421		result.Response = autorest.Response{Response: resp}
34422		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", resp, "Failure sending request")
34423		return
34424	}
34425
34426	result, err = client.UpdateMetadataResponder(resp)
34427	if err != nil {
34428		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadata", resp, "Failure responding to request")
34429		return
34430	}
34431
34432	return
34433}
34434
34435// UpdateMetadataPreparer prepares the UpdateMetadata request.
34436func (client AppsClient) UpdateMetadataPreparer(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary) (*http.Request, error) {
34437	pathParameters := map[string]interface{}{
34438		"name":              autorest.Encode("path", name),
34439		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34440		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34441	}
34442
34443	const APIVersion = "2020-09-01"
34444	queryParameters := map[string]interface{}{
34445		"api-version": APIVersion,
34446	}
34447
34448	preparer := autorest.CreatePreparer(
34449		autorest.AsContentType("application/json; charset=utf-8"),
34450		autorest.AsPut(),
34451		autorest.WithBaseURL(client.BaseURI),
34452		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata", pathParameters),
34453		autorest.WithJSON(metadata),
34454		autorest.WithQueryParameters(queryParameters))
34455	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34456}
34457
34458// UpdateMetadataSender sends the UpdateMetadata request. The method will close the
34459// http.Response Body if it receives an error.
34460func (client AppsClient) UpdateMetadataSender(req *http.Request) (*http.Response, error) {
34461	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34462}
34463
34464// UpdateMetadataResponder handles the response to the UpdateMetadata request. The method always
34465// closes the http.Response Body.
34466func (client AppsClient) UpdateMetadataResponder(resp *http.Response) (result StringDictionary, err error) {
34467	err = autorest.Respond(
34468		resp,
34469		azure.WithErrorUnlessStatusCode(http.StatusOK),
34470		autorest.ByUnmarshallingJSON(&result),
34471		autorest.ByClosing())
34472	result.Response = autorest.Response{Response: resp}
34473	return
34474}
34475
34476// UpdateMetadataSlot description for Replaces the metadata of an app.
34477// Parameters:
34478// resourceGroupName - name of the resource group to which the resource belongs.
34479// name - name of the app.
34480// metadata - edited metadata of the app or deployment slot. See example.
34481// slot - name of the deployment slot. If a slot is not specified, the API will update the metadata for the
34482// production slot.
34483func (client AppsClient) UpdateMetadataSlot(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, slot string) (result StringDictionary, err error) {
34484	if tracing.IsEnabled() {
34485		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateMetadataSlot")
34486		defer func() {
34487			sc := -1
34488			if result.Response.Response != nil {
34489				sc = result.Response.Response.StatusCode
34490			}
34491			tracing.EndSpan(ctx, sc, err)
34492		}()
34493	}
34494	if err := validation.Validate([]validation.Validation{
34495		{TargetValue: resourceGroupName,
34496			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34497				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34498				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34499		return result, validation.NewError("web.AppsClient", "UpdateMetadataSlot", err.Error())
34500	}
34501
34502	req, err := client.UpdateMetadataSlotPreparer(ctx, resourceGroupName, name, metadata, slot)
34503	if err != nil {
34504		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", nil, "Failure preparing request")
34505		return
34506	}
34507
34508	resp, err := client.UpdateMetadataSlotSender(req)
34509	if err != nil {
34510		result.Response = autorest.Response{Response: resp}
34511		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", resp, "Failure sending request")
34512		return
34513	}
34514
34515	result, err = client.UpdateMetadataSlotResponder(resp)
34516	if err != nil {
34517		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateMetadataSlot", resp, "Failure responding to request")
34518		return
34519	}
34520
34521	return
34522}
34523
34524// UpdateMetadataSlotPreparer prepares the UpdateMetadataSlot request.
34525func (client AppsClient) UpdateMetadataSlotPreparer(ctx context.Context, resourceGroupName string, name string, metadata StringDictionary, slot string) (*http.Request, error) {
34526	pathParameters := map[string]interface{}{
34527		"name":              autorest.Encode("path", name),
34528		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34529		"slot":              autorest.Encode("path", slot),
34530		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34531	}
34532
34533	const APIVersion = "2020-09-01"
34534	queryParameters := map[string]interface{}{
34535		"api-version": APIVersion,
34536	}
34537
34538	preparer := autorest.CreatePreparer(
34539		autorest.AsContentType("application/json; charset=utf-8"),
34540		autorest.AsPut(),
34541		autorest.WithBaseURL(client.BaseURI),
34542		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata", pathParameters),
34543		autorest.WithJSON(metadata),
34544		autorest.WithQueryParameters(queryParameters))
34545	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34546}
34547
34548// UpdateMetadataSlotSender sends the UpdateMetadataSlot request. The method will close the
34549// http.Response Body if it receives an error.
34550func (client AppsClient) UpdateMetadataSlotSender(req *http.Request) (*http.Response, error) {
34551	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34552}
34553
34554// UpdateMetadataSlotResponder handles the response to the UpdateMetadataSlot request. The method always
34555// closes the http.Response Body.
34556func (client AppsClient) UpdateMetadataSlotResponder(resp *http.Response) (result StringDictionary, err error) {
34557	err = autorest.Respond(
34558		resp,
34559		azure.WithErrorUnlessStatusCode(http.StatusOK),
34560		autorest.ByUnmarshallingJSON(&result),
34561		autorest.ByClosing())
34562	result.Response = autorest.Response{Response: resp}
34563	return
34564}
34565
34566// UpdatePremierAddOn description for Updates a named add-on of an app.
34567// Parameters:
34568// resourceGroupName - name of the resource group to which the resource belongs.
34569// name - name of the app.
34570// premierAddOnName - add-on name.
34571// premierAddOn - a JSON representation of the edited premier add-on.
34572func (client AppsClient) UpdatePremierAddOn(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource) (result PremierAddOn, err error) {
34573	if tracing.IsEnabled() {
34574		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePremierAddOn")
34575		defer func() {
34576			sc := -1
34577			if result.Response.Response != nil {
34578				sc = result.Response.Response.StatusCode
34579			}
34580			tracing.EndSpan(ctx, sc, err)
34581		}()
34582	}
34583	if err := validation.Validate([]validation.Validation{
34584		{TargetValue: resourceGroupName,
34585			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34586				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34587				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34588		return result, validation.NewError("web.AppsClient", "UpdatePremierAddOn", err.Error())
34589	}
34590
34591	req, err := client.UpdatePremierAddOnPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn)
34592	if err != nil {
34593		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", nil, "Failure preparing request")
34594		return
34595	}
34596
34597	resp, err := client.UpdatePremierAddOnSender(req)
34598	if err != nil {
34599		result.Response = autorest.Response{Response: resp}
34600		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", resp, "Failure sending request")
34601		return
34602	}
34603
34604	result, err = client.UpdatePremierAddOnResponder(resp)
34605	if err != nil {
34606		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOn", resp, "Failure responding to request")
34607		return
34608	}
34609
34610	return
34611}
34612
34613// UpdatePremierAddOnPreparer prepares the UpdatePremierAddOn request.
34614func (client AppsClient) UpdatePremierAddOnPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource) (*http.Request, error) {
34615	pathParameters := map[string]interface{}{
34616		"name":              autorest.Encode("path", name),
34617		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
34618		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34619		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34620	}
34621
34622	const APIVersion = "2020-09-01"
34623	queryParameters := map[string]interface{}{
34624		"api-version": APIVersion,
34625	}
34626
34627	preparer := autorest.CreatePreparer(
34628		autorest.AsContentType("application/json; charset=utf-8"),
34629		autorest.AsPatch(),
34630		autorest.WithBaseURL(client.BaseURI),
34631		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}", pathParameters),
34632		autorest.WithJSON(premierAddOn),
34633		autorest.WithQueryParameters(queryParameters))
34634	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34635}
34636
34637// UpdatePremierAddOnSender sends the UpdatePremierAddOn request. The method will close the
34638// http.Response Body if it receives an error.
34639func (client AppsClient) UpdatePremierAddOnSender(req *http.Request) (*http.Response, error) {
34640	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34641}
34642
34643// UpdatePremierAddOnResponder handles the response to the UpdatePremierAddOn request. The method always
34644// closes the http.Response Body.
34645func (client AppsClient) UpdatePremierAddOnResponder(resp *http.Response) (result PremierAddOn, err error) {
34646	err = autorest.Respond(
34647		resp,
34648		azure.WithErrorUnlessStatusCode(http.StatusOK),
34649		autorest.ByUnmarshallingJSON(&result),
34650		autorest.ByClosing())
34651	result.Response = autorest.Response{Response: resp}
34652	return
34653}
34654
34655// UpdatePremierAddOnSlot description for Updates a named add-on of an app.
34656// Parameters:
34657// resourceGroupName - name of the resource group to which the resource belongs.
34658// name - name of the app.
34659// premierAddOnName - add-on name.
34660// premierAddOn - a JSON representation of the edited premier add-on.
34661// slot - name of the deployment slot. If a slot is not specified, the API will update the named add-on for the
34662// production slot.
34663func (client AppsClient) UpdatePremierAddOnSlot(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, slot string) (result PremierAddOn, err error) {
34664	if tracing.IsEnabled() {
34665		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdatePremierAddOnSlot")
34666		defer func() {
34667			sc := -1
34668			if result.Response.Response != nil {
34669				sc = result.Response.Response.StatusCode
34670			}
34671			tracing.EndSpan(ctx, sc, err)
34672		}()
34673	}
34674	if err := validation.Validate([]validation.Validation{
34675		{TargetValue: resourceGroupName,
34676			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34677				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34678				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34679		return result, validation.NewError("web.AppsClient", "UpdatePremierAddOnSlot", err.Error())
34680	}
34681
34682	req, err := client.UpdatePremierAddOnSlotPreparer(ctx, resourceGroupName, name, premierAddOnName, premierAddOn, slot)
34683	if err != nil {
34684		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", nil, "Failure preparing request")
34685		return
34686	}
34687
34688	resp, err := client.UpdatePremierAddOnSlotSender(req)
34689	if err != nil {
34690		result.Response = autorest.Response{Response: resp}
34691		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", resp, "Failure sending request")
34692		return
34693	}
34694
34695	result, err = client.UpdatePremierAddOnSlotResponder(resp)
34696	if err != nil {
34697		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdatePremierAddOnSlot", resp, "Failure responding to request")
34698		return
34699	}
34700
34701	return
34702}
34703
34704// UpdatePremierAddOnSlotPreparer prepares the UpdatePremierAddOnSlot request.
34705func (client AppsClient) UpdatePremierAddOnSlotPreparer(ctx context.Context, resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOnPatchResource, slot string) (*http.Request, error) {
34706	pathParameters := map[string]interface{}{
34707		"name":              autorest.Encode("path", name),
34708		"premierAddOnName":  autorest.Encode("path", premierAddOnName),
34709		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34710		"slot":              autorest.Encode("path", slot),
34711		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34712	}
34713
34714	const APIVersion = "2020-09-01"
34715	queryParameters := map[string]interface{}{
34716		"api-version": APIVersion,
34717	}
34718
34719	preparer := autorest.CreatePreparer(
34720		autorest.AsContentType("application/json; charset=utf-8"),
34721		autorest.AsPatch(),
34722		autorest.WithBaseURL(client.BaseURI),
34723		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}", pathParameters),
34724		autorest.WithJSON(premierAddOn),
34725		autorest.WithQueryParameters(queryParameters))
34726	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34727}
34728
34729// UpdatePremierAddOnSlotSender sends the UpdatePremierAddOnSlot request. The method will close the
34730// http.Response Body if it receives an error.
34731func (client AppsClient) UpdatePremierAddOnSlotSender(req *http.Request) (*http.Response, error) {
34732	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34733}
34734
34735// UpdatePremierAddOnSlotResponder handles the response to the UpdatePremierAddOnSlot request. The method always
34736// closes the http.Response Body.
34737func (client AppsClient) UpdatePremierAddOnSlotResponder(resp *http.Response) (result PremierAddOn, err error) {
34738	err = autorest.Respond(
34739		resp,
34740		azure.WithErrorUnlessStatusCode(http.StatusOK),
34741		autorest.ByUnmarshallingJSON(&result),
34742		autorest.ByClosing())
34743	result.Response = autorest.Response{Response: resp}
34744	return
34745}
34746
34747// UpdateRelayServiceConnection description for Creates a new hybrid connection configuration (PUT), or updates an
34748// existing one (PATCH).
34749// Parameters:
34750// resourceGroupName - name of the resource group to which the resource belongs.
34751// name - name of the app.
34752// entityName - name of the hybrid connection configuration.
34753// connectionEnvelope - details of the hybrid connection configuration.
34754func (client AppsClient) UpdateRelayServiceConnection(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) {
34755	if tracing.IsEnabled() {
34756		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateRelayServiceConnection")
34757		defer func() {
34758			sc := -1
34759			if result.Response.Response != nil {
34760				sc = result.Response.Response.StatusCode
34761			}
34762			tracing.EndSpan(ctx, sc, err)
34763		}()
34764	}
34765	if err := validation.Validate([]validation.Validation{
34766		{TargetValue: resourceGroupName,
34767			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34768				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34769				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34770		return result, validation.NewError("web.AppsClient", "UpdateRelayServiceConnection", err.Error())
34771	}
34772
34773	req, err := client.UpdateRelayServiceConnectionPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope)
34774	if err != nil {
34775		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", nil, "Failure preparing request")
34776		return
34777	}
34778
34779	resp, err := client.UpdateRelayServiceConnectionSender(req)
34780	if err != nil {
34781		result.Response = autorest.Response{Response: resp}
34782		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", resp, "Failure sending request")
34783		return
34784	}
34785
34786	result, err = client.UpdateRelayServiceConnectionResponder(resp)
34787	if err != nil {
34788		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnection", resp, "Failure responding to request")
34789		return
34790	}
34791
34792	return
34793}
34794
34795// UpdateRelayServiceConnectionPreparer prepares the UpdateRelayServiceConnection request.
34796func (client AppsClient) UpdateRelayServiceConnectionPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (*http.Request, error) {
34797	pathParameters := map[string]interface{}{
34798		"entityName":        autorest.Encode("path", entityName),
34799		"name":              autorest.Encode("path", name),
34800		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34801		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34802	}
34803
34804	const APIVersion = "2020-09-01"
34805	queryParameters := map[string]interface{}{
34806		"api-version": APIVersion,
34807	}
34808
34809	preparer := autorest.CreatePreparer(
34810		autorest.AsContentType("application/json; charset=utf-8"),
34811		autorest.AsPatch(),
34812		autorest.WithBaseURL(client.BaseURI),
34813		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}", pathParameters),
34814		autorest.WithJSON(connectionEnvelope),
34815		autorest.WithQueryParameters(queryParameters))
34816	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34817}
34818
34819// UpdateRelayServiceConnectionSender sends the UpdateRelayServiceConnection request. The method will close the
34820// http.Response Body if it receives an error.
34821func (client AppsClient) UpdateRelayServiceConnectionSender(req *http.Request) (*http.Response, error) {
34822	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34823}
34824
34825// UpdateRelayServiceConnectionResponder handles the response to the UpdateRelayServiceConnection request. The method always
34826// closes the http.Response Body.
34827func (client AppsClient) UpdateRelayServiceConnectionResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
34828	err = autorest.Respond(
34829		resp,
34830		azure.WithErrorUnlessStatusCode(http.StatusOK),
34831		autorest.ByUnmarshallingJSON(&result),
34832		autorest.ByClosing())
34833	result.Response = autorest.Response{Response: resp}
34834	return
34835}
34836
34837// UpdateRelayServiceConnectionSlot description for Creates a new hybrid connection configuration (PUT), or updates an
34838// existing one (PATCH).
34839// Parameters:
34840// resourceGroupName - name of the resource group to which the resource belongs.
34841// name - name of the app.
34842// entityName - name of the hybrid connection configuration.
34843// connectionEnvelope - details of the hybrid connection configuration.
34844// slot - name of the deployment slot. If a slot is not specified, the API will create or update a hybrid
34845// connection for the production slot.
34846func (client AppsClient) UpdateRelayServiceConnectionSlot(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) {
34847	if tracing.IsEnabled() {
34848		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateRelayServiceConnectionSlot")
34849		defer func() {
34850			sc := -1
34851			if result.Response.Response != nil {
34852				sc = result.Response.Response.StatusCode
34853			}
34854			tracing.EndSpan(ctx, sc, err)
34855		}()
34856	}
34857	if err := validation.Validate([]validation.Validation{
34858		{TargetValue: resourceGroupName,
34859			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34860				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34861				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
34862		return result, validation.NewError("web.AppsClient", "UpdateRelayServiceConnectionSlot", err.Error())
34863	}
34864
34865	req, err := client.UpdateRelayServiceConnectionSlotPreparer(ctx, resourceGroupName, name, entityName, connectionEnvelope, slot)
34866	if err != nil {
34867		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", nil, "Failure preparing request")
34868		return
34869	}
34870
34871	resp, err := client.UpdateRelayServiceConnectionSlotSender(req)
34872	if err != nil {
34873		result.Response = autorest.Response{Response: resp}
34874		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", resp, "Failure sending request")
34875		return
34876	}
34877
34878	result, err = client.UpdateRelayServiceConnectionSlotResponder(resp)
34879	if err != nil {
34880		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateRelayServiceConnectionSlot", resp, "Failure responding to request")
34881		return
34882	}
34883
34884	return
34885}
34886
34887// UpdateRelayServiceConnectionSlotPreparer prepares the UpdateRelayServiceConnectionSlot request.
34888func (client AppsClient) UpdateRelayServiceConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (*http.Request, error) {
34889	pathParameters := map[string]interface{}{
34890		"entityName":        autorest.Encode("path", entityName),
34891		"name":              autorest.Encode("path", name),
34892		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34893		"slot":              autorest.Encode("path", slot),
34894		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34895	}
34896
34897	const APIVersion = "2020-09-01"
34898	queryParameters := map[string]interface{}{
34899		"api-version": APIVersion,
34900	}
34901
34902	preparer := autorest.CreatePreparer(
34903		autorest.AsContentType("application/json; charset=utf-8"),
34904		autorest.AsPatch(),
34905		autorest.WithBaseURL(client.BaseURI),
34906		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}", pathParameters),
34907		autorest.WithJSON(connectionEnvelope),
34908		autorest.WithQueryParameters(queryParameters))
34909	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34910}
34911
34912// UpdateRelayServiceConnectionSlotSender sends the UpdateRelayServiceConnectionSlot request. The method will close the
34913// http.Response Body if it receives an error.
34914func (client AppsClient) UpdateRelayServiceConnectionSlotSender(req *http.Request) (*http.Response, error) {
34915	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
34916}
34917
34918// UpdateRelayServiceConnectionSlotResponder handles the response to the UpdateRelayServiceConnectionSlot request. The method always
34919// closes the http.Response Body.
34920func (client AppsClient) UpdateRelayServiceConnectionSlotResponder(resp *http.Response) (result RelayServiceConnectionEntity, err error) {
34921	err = autorest.Respond(
34922		resp,
34923		azure.WithErrorUnlessStatusCode(http.StatusOK),
34924		autorest.ByUnmarshallingJSON(&result),
34925		autorest.ByClosing())
34926	result.Response = autorest.Response{Response: resp}
34927	return
34928}
34929
34930// UpdateScmAllowed description for Updates whether user publishing credentials are allowed on the site or not.
34931// Parameters:
34932// resourceGroupName - name of the resource group to which the resource belongs.
34933// name - name of the app.
34934func (client AppsClient) UpdateScmAllowed(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (result CsmPublishingCredentialsPoliciesEntity, err error) {
34935	if tracing.IsEnabled() {
34936		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateScmAllowed")
34937		defer func() {
34938			sc := -1
34939			if result.Response.Response != nil {
34940				sc = result.Response.Response.StatusCode
34941			}
34942			tracing.EndSpan(ctx, sc, err)
34943		}()
34944	}
34945	if err := validation.Validate([]validation.Validation{
34946		{TargetValue: resourceGroupName,
34947			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
34948				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
34949				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
34950		{TargetValue: csmPublishingAccessPoliciesEntity,
34951			Constraints: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties", Name: validation.Null, Rule: false,
34952				Chain: []validation.Constraint{{Target: "csmPublishingAccessPoliciesEntity.CsmPublishingCredentialsPoliciesEntityProperties.Allow", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
34953		return result, validation.NewError("web.AppsClient", "UpdateScmAllowed", err.Error())
34954	}
34955
34956	req, err := client.UpdateScmAllowedPreparer(ctx, resourceGroupName, name, csmPublishingAccessPoliciesEntity)
34957	if err != nil {
34958		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowed", nil, "Failure preparing request")
34959		return
34960	}
34961
34962	resp, err := client.UpdateScmAllowedSender(req)
34963	if err != nil {
34964		result.Response = autorest.Response{Response: resp}
34965		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowed", resp, "Failure sending request")
34966		return
34967	}
34968
34969	result, err = client.UpdateScmAllowedResponder(resp)
34970	if err != nil {
34971		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateScmAllowed", resp, "Failure responding to request")
34972		return
34973	}
34974
34975	return
34976}
34977
34978// UpdateScmAllowedPreparer prepares the UpdateScmAllowed request.
34979func (client AppsClient) UpdateScmAllowedPreparer(ctx context.Context, resourceGroupName string, name string, csmPublishingAccessPoliciesEntity CsmPublishingCredentialsPoliciesEntity) (*http.Request, error) {
34980	pathParameters := map[string]interface{}{
34981		"name":              autorest.Encode("path", name),
34982		"resourceGroupName": autorest.Encode("path", resourceGroupName),
34983		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
34984	}
34985
34986	const APIVersion = "2020-09-01"
34987	queryParameters := map[string]interface{}{
34988		"api-version": APIVersion,
34989	}
34990
34991	preparer := autorest.CreatePreparer(
34992		autorest.AsContentType("application/json; charset=utf-8"),
34993		autorest.AsPut(),
34994		autorest.WithBaseURL(client.BaseURI),
34995		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm", pathParameters),
34996		autorest.WithJSON(csmPublishingAccessPoliciesEntity),
34997		autorest.WithQueryParameters(queryParameters))
34998	return preparer.Prepare((&http.Request{}).WithContext(ctx))
34999}
35000
35001// UpdateScmAllowedSender sends the UpdateScmAllowed request. The method will close the
35002// http.Response Body if it receives an error.
35003func (client AppsClient) UpdateScmAllowedSender(req *http.Request) (*http.Response, error) {
35004	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35005}
35006
35007// UpdateScmAllowedResponder handles the response to the UpdateScmAllowed request. The method always
35008// closes the http.Response Body.
35009func (client AppsClient) UpdateScmAllowedResponder(resp *http.Response) (result CsmPublishingCredentialsPoliciesEntity, err error) {
35010	err = autorest.Respond(
35011		resp,
35012		azure.WithErrorUnlessStatusCode(http.StatusOK),
35013		autorest.ByUnmarshallingJSON(&result),
35014		autorest.ByClosing())
35015	result.Response = autorest.Response{Response: resp}
35016	return
35017}
35018
35019// UpdateSitePushSettings description for Updates the Push settings associated with web app.
35020// Parameters:
35021// resourceGroupName - name of the resource group to which the resource belongs.
35022// name - name of web app.
35023// pushSettings - push settings associated with web app.
35024func (client AppsClient) UpdateSitePushSettings(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings) (result PushSettings, err error) {
35025	if tracing.IsEnabled() {
35026		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSitePushSettings")
35027		defer func() {
35028			sc := -1
35029			if result.Response.Response != nil {
35030				sc = result.Response.Response.StatusCode
35031			}
35032			tracing.EndSpan(ctx, sc, err)
35033		}()
35034	}
35035	if err := validation.Validate([]validation.Validation{
35036		{TargetValue: resourceGroupName,
35037			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35038				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35039				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
35040		{TargetValue: pushSettings,
35041			Constraints: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties", Name: validation.Null, Rule: false,
35042				Chain: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
35043		return result, validation.NewError("web.AppsClient", "UpdateSitePushSettings", err.Error())
35044	}
35045
35046	req, err := client.UpdateSitePushSettingsPreparer(ctx, resourceGroupName, name, pushSettings)
35047	if err != nil {
35048		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", nil, "Failure preparing request")
35049		return
35050	}
35051
35052	resp, err := client.UpdateSitePushSettingsSender(req)
35053	if err != nil {
35054		result.Response = autorest.Response{Response: resp}
35055		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", resp, "Failure sending request")
35056		return
35057	}
35058
35059	result, err = client.UpdateSitePushSettingsResponder(resp)
35060	if err != nil {
35061		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettings", resp, "Failure responding to request")
35062		return
35063	}
35064
35065	return
35066}
35067
35068// UpdateSitePushSettingsPreparer prepares the UpdateSitePushSettings request.
35069func (client AppsClient) UpdateSitePushSettingsPreparer(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings) (*http.Request, error) {
35070	pathParameters := map[string]interface{}{
35071		"name":              autorest.Encode("path", name),
35072		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35073		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35074	}
35075
35076	const APIVersion = "2020-09-01"
35077	queryParameters := map[string]interface{}{
35078		"api-version": APIVersion,
35079	}
35080
35081	preparer := autorest.CreatePreparer(
35082		autorest.AsContentType("application/json; charset=utf-8"),
35083		autorest.AsPut(),
35084		autorest.WithBaseURL(client.BaseURI),
35085		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings", pathParameters),
35086		autorest.WithJSON(pushSettings),
35087		autorest.WithQueryParameters(queryParameters))
35088	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35089}
35090
35091// UpdateSitePushSettingsSender sends the UpdateSitePushSettings request. The method will close the
35092// http.Response Body if it receives an error.
35093func (client AppsClient) UpdateSitePushSettingsSender(req *http.Request) (*http.Response, error) {
35094	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35095}
35096
35097// UpdateSitePushSettingsResponder handles the response to the UpdateSitePushSettings request. The method always
35098// closes the http.Response Body.
35099func (client AppsClient) UpdateSitePushSettingsResponder(resp *http.Response) (result PushSettings, err error) {
35100	err = autorest.Respond(
35101		resp,
35102		azure.WithErrorUnlessStatusCode(http.StatusOK),
35103		autorest.ByUnmarshallingJSON(&result),
35104		autorest.ByClosing())
35105	result.Response = autorest.Response{Response: resp}
35106	return
35107}
35108
35109// UpdateSitePushSettingsSlot description for Updates the Push settings associated with web app.
35110// Parameters:
35111// resourceGroupName - name of the resource group to which the resource belongs.
35112// name - name of web app.
35113// pushSettings - push settings associated with web app.
35114// slot - name of web app slot. If not specified then will default to production slot.
35115func (client AppsClient) UpdateSitePushSettingsSlot(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, slot string) (result PushSettings, err error) {
35116	if tracing.IsEnabled() {
35117		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSitePushSettingsSlot")
35118		defer func() {
35119			sc := -1
35120			if result.Response.Response != nil {
35121				sc = result.Response.Response.StatusCode
35122			}
35123			tracing.EndSpan(ctx, sc, err)
35124		}()
35125	}
35126	if err := validation.Validate([]validation.Validation{
35127		{TargetValue: resourceGroupName,
35128			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35129				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35130				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}},
35131		{TargetValue: pushSettings,
35132			Constraints: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties", Name: validation.Null, Rule: false,
35133				Chain: []validation.Constraint{{Target: "pushSettings.PushSettingsProperties.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
35134		return result, validation.NewError("web.AppsClient", "UpdateSitePushSettingsSlot", err.Error())
35135	}
35136
35137	req, err := client.UpdateSitePushSettingsSlotPreparer(ctx, resourceGroupName, name, pushSettings, slot)
35138	if err != nil {
35139		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", nil, "Failure preparing request")
35140		return
35141	}
35142
35143	resp, err := client.UpdateSitePushSettingsSlotSender(req)
35144	if err != nil {
35145		result.Response = autorest.Response{Response: resp}
35146		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", resp, "Failure sending request")
35147		return
35148	}
35149
35150	result, err = client.UpdateSitePushSettingsSlotResponder(resp)
35151	if err != nil {
35152		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSitePushSettingsSlot", resp, "Failure responding to request")
35153		return
35154	}
35155
35156	return
35157}
35158
35159// UpdateSitePushSettingsSlotPreparer prepares the UpdateSitePushSettingsSlot request.
35160func (client AppsClient) UpdateSitePushSettingsSlotPreparer(ctx context.Context, resourceGroupName string, name string, pushSettings PushSettings, slot string) (*http.Request, error) {
35161	pathParameters := map[string]interface{}{
35162		"name":              autorest.Encode("path", name),
35163		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35164		"slot":              autorest.Encode("path", slot),
35165		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35166	}
35167
35168	const APIVersion = "2020-09-01"
35169	queryParameters := map[string]interface{}{
35170		"api-version": APIVersion,
35171	}
35172
35173	preparer := autorest.CreatePreparer(
35174		autorest.AsContentType("application/json; charset=utf-8"),
35175		autorest.AsPut(),
35176		autorest.WithBaseURL(client.BaseURI),
35177		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings", pathParameters),
35178		autorest.WithJSON(pushSettings),
35179		autorest.WithQueryParameters(queryParameters))
35180	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35181}
35182
35183// UpdateSitePushSettingsSlotSender sends the UpdateSitePushSettingsSlot request. The method will close the
35184// http.Response Body if it receives an error.
35185func (client AppsClient) UpdateSitePushSettingsSlotSender(req *http.Request) (*http.Response, error) {
35186	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35187}
35188
35189// UpdateSitePushSettingsSlotResponder handles the response to the UpdateSitePushSettingsSlot request. The method always
35190// closes the http.Response Body.
35191func (client AppsClient) UpdateSitePushSettingsSlotResponder(resp *http.Response) (result PushSettings, err error) {
35192	err = autorest.Respond(
35193		resp,
35194		azure.WithErrorUnlessStatusCode(http.StatusOK),
35195		autorest.ByUnmarshallingJSON(&result),
35196		autorest.ByClosing())
35197	result.Response = autorest.Response{Response: resp}
35198	return
35199}
35200
35201// UpdateSlot description for Creates a new web, mobile, or API app in an existing resource group, or updates an
35202// existing app.
35203// Parameters:
35204// resourceGroupName - name of the resource group to which the resource belongs.
35205// name - unique name of the app to create or update. To create or update a deployment slot, use the {slot}
35206// parameter.
35207// siteEnvelope - a JSON representation of the app properties. See example.
35208// slot - name of the deployment slot to create or update. By default, this API attempts to create or modify
35209// the production slot.
35210func (client AppsClient) UpdateSlot(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, slot string) (result Site, err error) {
35211	if tracing.IsEnabled() {
35212		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSlot")
35213		defer func() {
35214			sc := -1
35215			if result.Response.Response != nil {
35216				sc = result.Response.Response.StatusCode
35217			}
35218			tracing.EndSpan(ctx, sc, err)
35219		}()
35220	}
35221	if err := validation.Validate([]validation.Validation{
35222		{TargetValue: resourceGroupName,
35223			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35224				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35225				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35226		return result, validation.NewError("web.AppsClient", "UpdateSlot", err.Error())
35227	}
35228
35229	req, err := client.UpdateSlotPreparer(ctx, resourceGroupName, name, siteEnvelope, slot)
35230	if err != nil {
35231		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", nil, "Failure preparing request")
35232		return
35233	}
35234
35235	resp, err := client.UpdateSlotSender(req)
35236	if err != nil {
35237		result.Response = autorest.Response{Response: resp}
35238		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", resp, "Failure sending request")
35239		return
35240	}
35241
35242	result, err = client.UpdateSlotResponder(resp)
35243	if err != nil {
35244		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlot", resp, "Failure responding to request")
35245		return
35246	}
35247
35248	return
35249}
35250
35251// UpdateSlotPreparer prepares the UpdateSlot request.
35252func (client AppsClient) UpdateSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteEnvelope SitePatchResource, slot string) (*http.Request, error) {
35253	pathParameters := map[string]interface{}{
35254		"name":              autorest.Encode("path", name),
35255		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35256		"slot":              autorest.Encode("path", slot),
35257		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35258	}
35259
35260	const APIVersion = "2020-09-01"
35261	queryParameters := map[string]interface{}{
35262		"api-version": APIVersion,
35263	}
35264
35265	preparer := autorest.CreatePreparer(
35266		autorest.AsContentType("application/json; charset=utf-8"),
35267		autorest.AsPatch(),
35268		autorest.WithBaseURL(client.BaseURI),
35269		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}", pathParameters),
35270		autorest.WithJSON(siteEnvelope),
35271		autorest.WithQueryParameters(queryParameters))
35272	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35273}
35274
35275// UpdateSlotSender sends the UpdateSlot request. The method will close the
35276// http.Response Body if it receives an error.
35277func (client AppsClient) UpdateSlotSender(req *http.Request) (*http.Response, error) {
35278	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35279}
35280
35281// UpdateSlotResponder handles the response to the UpdateSlot request. The method always
35282// closes the http.Response Body.
35283func (client AppsClient) UpdateSlotResponder(resp *http.Response) (result Site, err error) {
35284	err = autorest.Respond(
35285		resp,
35286		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
35287		autorest.ByUnmarshallingJSON(&result),
35288		autorest.ByClosing())
35289	result.Response = autorest.Response{Response: resp}
35290	return
35291}
35292
35293// UpdateSlotConfigurationNames description for Updates the names of application settings and connection string that
35294// remain with the slot during swap operation.
35295// Parameters:
35296// resourceGroupName - name of the resource group to which the resource belongs.
35297// name - name of the app.
35298// slotConfigNames - names of application settings and connection strings. See example.
35299func (client AppsClient) UpdateSlotConfigurationNames(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (result SlotConfigNamesResource, err error) {
35300	if tracing.IsEnabled() {
35301		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSlotConfigurationNames")
35302		defer func() {
35303			sc := -1
35304			if result.Response.Response != nil {
35305				sc = result.Response.Response.StatusCode
35306			}
35307			tracing.EndSpan(ctx, sc, err)
35308		}()
35309	}
35310	if err := validation.Validate([]validation.Validation{
35311		{TargetValue: resourceGroupName,
35312			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35313				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35314				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35315		return result, validation.NewError("web.AppsClient", "UpdateSlotConfigurationNames", err.Error())
35316	}
35317
35318	req, err := client.UpdateSlotConfigurationNamesPreparer(ctx, resourceGroupName, name, slotConfigNames)
35319	if err != nil {
35320		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", nil, "Failure preparing request")
35321		return
35322	}
35323
35324	resp, err := client.UpdateSlotConfigurationNamesSender(req)
35325	if err != nil {
35326		result.Response = autorest.Response{Response: resp}
35327		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", resp, "Failure sending request")
35328		return
35329	}
35330
35331	result, err = client.UpdateSlotConfigurationNamesResponder(resp)
35332	if err != nil {
35333		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSlotConfigurationNames", resp, "Failure responding to request")
35334		return
35335	}
35336
35337	return
35338}
35339
35340// UpdateSlotConfigurationNamesPreparer prepares the UpdateSlotConfigurationNames request.
35341func (client AppsClient) UpdateSlotConfigurationNamesPreparer(ctx context.Context, resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (*http.Request, error) {
35342	pathParameters := map[string]interface{}{
35343		"name":              autorest.Encode("path", name),
35344		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35345		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35346	}
35347
35348	const APIVersion = "2020-09-01"
35349	queryParameters := map[string]interface{}{
35350		"api-version": APIVersion,
35351	}
35352
35353	preparer := autorest.CreatePreparer(
35354		autorest.AsContentType("application/json; charset=utf-8"),
35355		autorest.AsPut(),
35356		autorest.WithBaseURL(client.BaseURI),
35357		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames", pathParameters),
35358		autorest.WithJSON(slotConfigNames),
35359		autorest.WithQueryParameters(queryParameters))
35360	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35361}
35362
35363// UpdateSlotConfigurationNamesSender sends the UpdateSlotConfigurationNames request. The method will close the
35364// http.Response Body if it receives an error.
35365func (client AppsClient) UpdateSlotConfigurationNamesSender(req *http.Request) (*http.Response, error) {
35366	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35367}
35368
35369// UpdateSlotConfigurationNamesResponder handles the response to the UpdateSlotConfigurationNames request. The method always
35370// closes the http.Response Body.
35371func (client AppsClient) UpdateSlotConfigurationNamesResponder(resp *http.Response) (result SlotConfigNamesResource, err error) {
35372	err = autorest.Respond(
35373		resp,
35374		azure.WithErrorUnlessStatusCode(http.StatusOK),
35375		autorest.ByUnmarshallingJSON(&result),
35376		autorest.ByClosing())
35377	result.Response = autorest.Response{Response: resp}
35378	return
35379}
35380
35381// UpdateSourceControl description for Updates the source control configuration of an app.
35382// Parameters:
35383// resourceGroupName - name of the resource group to which the resource belongs.
35384// name - name of the app.
35385// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
35386func (client AppsClient) UpdateSourceControl(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (result SiteSourceControl, err error) {
35387	if tracing.IsEnabled() {
35388		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSourceControl")
35389		defer func() {
35390			sc := -1
35391			if result.Response.Response != nil {
35392				sc = result.Response.Response.StatusCode
35393			}
35394			tracing.EndSpan(ctx, sc, err)
35395		}()
35396	}
35397	if err := validation.Validate([]validation.Validation{
35398		{TargetValue: resourceGroupName,
35399			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35400				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35401				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35402		return result, validation.NewError("web.AppsClient", "UpdateSourceControl", err.Error())
35403	}
35404
35405	req, err := client.UpdateSourceControlPreparer(ctx, resourceGroupName, name, siteSourceControl)
35406	if err != nil {
35407		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", nil, "Failure preparing request")
35408		return
35409	}
35410
35411	resp, err := client.UpdateSourceControlSender(req)
35412	if err != nil {
35413		result.Response = autorest.Response{Response: resp}
35414		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", resp, "Failure sending request")
35415		return
35416	}
35417
35418	result, err = client.UpdateSourceControlResponder(resp)
35419	if err != nil {
35420		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControl", resp, "Failure responding to request")
35421		return
35422	}
35423
35424	return
35425}
35426
35427// UpdateSourceControlPreparer prepares the UpdateSourceControl request.
35428func (client AppsClient) UpdateSourceControlPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl) (*http.Request, error) {
35429	pathParameters := map[string]interface{}{
35430		"name":              autorest.Encode("path", name),
35431		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35432		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35433	}
35434
35435	const APIVersion = "2020-09-01"
35436	queryParameters := map[string]interface{}{
35437		"api-version": APIVersion,
35438	}
35439
35440	preparer := autorest.CreatePreparer(
35441		autorest.AsContentType("application/json; charset=utf-8"),
35442		autorest.AsPatch(),
35443		autorest.WithBaseURL(client.BaseURI),
35444		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", pathParameters),
35445		autorest.WithJSON(siteSourceControl),
35446		autorest.WithQueryParameters(queryParameters))
35447	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35448}
35449
35450// UpdateSourceControlSender sends the UpdateSourceControl request. The method will close the
35451// http.Response Body if it receives an error.
35452func (client AppsClient) UpdateSourceControlSender(req *http.Request) (*http.Response, error) {
35453	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35454}
35455
35456// UpdateSourceControlResponder handles the response to the UpdateSourceControl request. The method always
35457// closes the http.Response Body.
35458func (client AppsClient) UpdateSourceControlResponder(resp *http.Response) (result SiteSourceControl, err error) {
35459	err = autorest.Respond(
35460		resp,
35461		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
35462		autorest.ByUnmarshallingJSON(&result),
35463		autorest.ByClosing())
35464	result.Response = autorest.Response{Response: resp}
35465	return
35466}
35467
35468// UpdateSourceControlSlot description for Updates the source control configuration of an app.
35469// Parameters:
35470// resourceGroupName - name of the resource group to which the resource belongs.
35471// name - name of the app.
35472// siteSourceControl - JSON representation of a SiteSourceControl object. See example.
35473// slot - name of the deployment slot. If a slot is not specified, the API will update the source control
35474// configuration for the production slot.
35475func (client AppsClient) UpdateSourceControlSlot(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (result SiteSourceControl, err error) {
35476	if tracing.IsEnabled() {
35477		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSourceControlSlot")
35478		defer func() {
35479			sc := -1
35480			if result.Response.Response != nil {
35481				sc = result.Response.Response.StatusCode
35482			}
35483			tracing.EndSpan(ctx, sc, err)
35484		}()
35485	}
35486	if err := validation.Validate([]validation.Validation{
35487		{TargetValue: resourceGroupName,
35488			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35489				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35490				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35491		return result, validation.NewError("web.AppsClient", "UpdateSourceControlSlot", err.Error())
35492	}
35493
35494	req, err := client.UpdateSourceControlSlotPreparer(ctx, resourceGroupName, name, siteSourceControl, slot)
35495	if err != nil {
35496		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", nil, "Failure preparing request")
35497		return
35498	}
35499
35500	resp, err := client.UpdateSourceControlSlotSender(req)
35501	if err != nil {
35502		result.Response = autorest.Response{Response: resp}
35503		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", resp, "Failure sending request")
35504		return
35505	}
35506
35507	result, err = client.UpdateSourceControlSlotResponder(resp)
35508	if err != nil {
35509		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSourceControlSlot", resp, "Failure responding to request")
35510		return
35511	}
35512
35513	return
35514}
35515
35516// UpdateSourceControlSlotPreparer prepares the UpdateSourceControlSlot request.
35517func (client AppsClient) UpdateSourceControlSlotPreparer(ctx context.Context, resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string) (*http.Request, error) {
35518	pathParameters := map[string]interface{}{
35519		"name":              autorest.Encode("path", name),
35520		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35521		"slot":              autorest.Encode("path", slot),
35522		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35523	}
35524
35525	const APIVersion = "2020-09-01"
35526	queryParameters := map[string]interface{}{
35527		"api-version": APIVersion,
35528	}
35529
35530	preparer := autorest.CreatePreparer(
35531		autorest.AsContentType("application/json; charset=utf-8"),
35532		autorest.AsPatch(),
35533		autorest.WithBaseURL(client.BaseURI),
35534		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web", pathParameters),
35535		autorest.WithJSON(siteSourceControl),
35536		autorest.WithQueryParameters(queryParameters))
35537	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35538}
35539
35540// UpdateSourceControlSlotSender sends the UpdateSourceControlSlot request. The method will close the
35541// http.Response Body if it receives an error.
35542func (client AppsClient) UpdateSourceControlSlotSender(req *http.Request) (*http.Response, error) {
35543	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35544}
35545
35546// UpdateSourceControlSlotResponder handles the response to the UpdateSourceControlSlot request. The method always
35547// closes the http.Response Body.
35548func (client AppsClient) UpdateSourceControlSlotResponder(resp *http.Response) (result SiteSourceControl, err error) {
35549	err = autorest.Respond(
35550		resp,
35551		azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
35552		autorest.ByUnmarshallingJSON(&result),
35553		autorest.ByClosing())
35554	result.Response = autorest.Response{Response: resp}
35555	return
35556}
35557
35558// UpdateSwiftVirtualNetworkConnection description for Integrates this Web App with a Virtual Network. This requires
35559// that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has already
35560// been delegated, and is not
35561// in use by another App Service Plan other than the one this App is in.
35562// Parameters:
35563// resourceGroupName - name of the resource group to which the resource belongs.
35564// name - name of the app.
35565// connectionEnvelope - properties of the Virtual Network connection. See example.
35566func (client AppsClient) UpdateSwiftVirtualNetworkConnection(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (result SwiftVirtualNetwork, err error) {
35567	if tracing.IsEnabled() {
35568		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSwiftVirtualNetworkConnection")
35569		defer func() {
35570			sc := -1
35571			if result.Response.Response != nil {
35572				sc = result.Response.Response.StatusCode
35573			}
35574			tracing.EndSpan(ctx, sc, err)
35575		}()
35576	}
35577	if err := validation.Validate([]validation.Validation{
35578		{TargetValue: resourceGroupName,
35579			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35580				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35581				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35582		return result, validation.NewError("web.AppsClient", "UpdateSwiftVirtualNetworkConnection", err.Error())
35583	}
35584
35585	req, err := client.UpdateSwiftVirtualNetworkConnectionPreparer(ctx, resourceGroupName, name, connectionEnvelope)
35586	if err != nil {
35587		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnection", nil, "Failure preparing request")
35588		return
35589	}
35590
35591	resp, err := client.UpdateSwiftVirtualNetworkConnectionSender(req)
35592	if err != nil {
35593		result.Response = autorest.Response{Response: resp}
35594		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnection", resp, "Failure sending request")
35595		return
35596	}
35597
35598	result, err = client.UpdateSwiftVirtualNetworkConnectionResponder(resp)
35599	if err != nil {
35600		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnection", resp, "Failure responding to request")
35601		return
35602	}
35603
35604	return
35605}
35606
35607// UpdateSwiftVirtualNetworkConnectionPreparer prepares the UpdateSwiftVirtualNetworkConnection request.
35608func (client AppsClient) UpdateSwiftVirtualNetworkConnectionPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork) (*http.Request, error) {
35609	pathParameters := map[string]interface{}{
35610		"name":              autorest.Encode("path", name),
35611		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35612		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35613	}
35614
35615	const APIVersion = "2020-09-01"
35616	queryParameters := map[string]interface{}{
35617		"api-version": APIVersion,
35618	}
35619
35620	preparer := autorest.CreatePreparer(
35621		autorest.AsContentType("application/json; charset=utf-8"),
35622		autorest.AsPatch(),
35623		autorest.WithBaseURL(client.BaseURI),
35624		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork", pathParameters),
35625		autorest.WithJSON(connectionEnvelope),
35626		autorest.WithQueryParameters(queryParameters))
35627	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35628}
35629
35630// UpdateSwiftVirtualNetworkConnectionSender sends the UpdateSwiftVirtualNetworkConnection request. The method will close the
35631// http.Response Body if it receives an error.
35632func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSender(req *http.Request) (*http.Response, error) {
35633	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35634}
35635
35636// UpdateSwiftVirtualNetworkConnectionResponder handles the response to the UpdateSwiftVirtualNetworkConnection request. The method always
35637// closes the http.Response Body.
35638func (client AppsClient) UpdateSwiftVirtualNetworkConnectionResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
35639	err = autorest.Respond(
35640		resp,
35641		azure.WithErrorUnlessStatusCode(http.StatusOK),
35642		autorest.ByUnmarshallingJSON(&result),
35643		autorest.ByClosing())
35644	result.Response = autorest.Response{Response: resp}
35645	return
35646}
35647
35648// UpdateSwiftVirtualNetworkConnectionSlot description for Integrates this Web App with a Virtual Network. This
35649// requires that 1) "swiftSupported" is true when doing a GET against this resource, and 2) that the target Subnet has
35650// already been delegated, and is not
35651// in use by another App Service Plan other than the one this App is in.
35652// Parameters:
35653// resourceGroupName - name of the resource group to which the resource belongs.
35654// name - name of the app.
35655// connectionEnvelope - properties of the Virtual Network connection. See example.
35656// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
35657// the production slot.
35658func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlot(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (result SwiftVirtualNetwork, err error) {
35659	if tracing.IsEnabled() {
35660		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateSwiftVirtualNetworkConnectionSlot")
35661		defer func() {
35662			sc := -1
35663			if result.Response.Response != nil {
35664				sc = result.Response.Response.StatusCode
35665			}
35666			tracing.EndSpan(ctx, sc, err)
35667		}()
35668	}
35669	if err := validation.Validate([]validation.Validation{
35670		{TargetValue: resourceGroupName,
35671			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35672				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35673				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35674		return result, validation.NewError("web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", err.Error())
35675	}
35676
35677	req, err := client.UpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx, resourceGroupName, name, connectionEnvelope, slot)
35678	if err != nil {
35679		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", nil, "Failure preparing request")
35680		return
35681	}
35682
35683	resp, err := client.UpdateSwiftVirtualNetworkConnectionSlotSender(req)
35684	if err != nil {
35685		result.Response = autorest.Response{Response: resp}
35686		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure sending request")
35687		return
35688	}
35689
35690	result, err = client.UpdateSwiftVirtualNetworkConnectionSlotResponder(resp)
35691	if err != nil {
35692		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateSwiftVirtualNetworkConnectionSlot", resp, "Failure responding to request")
35693		return
35694	}
35695
35696	return
35697}
35698
35699// UpdateSwiftVirtualNetworkConnectionSlotPreparer prepares the UpdateSwiftVirtualNetworkConnectionSlot request.
35700func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, connectionEnvelope SwiftVirtualNetwork, slot string) (*http.Request, error) {
35701	pathParameters := map[string]interface{}{
35702		"name":              autorest.Encode("path", name),
35703		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35704		"slot":              autorest.Encode("path", slot),
35705		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35706	}
35707
35708	const APIVersion = "2020-09-01"
35709	queryParameters := map[string]interface{}{
35710		"api-version": APIVersion,
35711	}
35712
35713	preparer := autorest.CreatePreparer(
35714		autorest.AsContentType("application/json; charset=utf-8"),
35715		autorest.AsPatch(),
35716		autorest.WithBaseURL(client.BaseURI),
35717		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork", pathParameters),
35718		autorest.WithJSON(connectionEnvelope),
35719		autorest.WithQueryParameters(queryParameters))
35720	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35721}
35722
35723// UpdateSwiftVirtualNetworkConnectionSlotSender sends the UpdateSwiftVirtualNetworkConnectionSlot request. The method will close the
35724// http.Response Body if it receives an error.
35725func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlotSender(req *http.Request) (*http.Response, error) {
35726	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35727}
35728
35729// UpdateSwiftVirtualNetworkConnectionSlotResponder handles the response to the UpdateSwiftVirtualNetworkConnectionSlot request. The method always
35730// closes the http.Response Body.
35731func (client AppsClient) UpdateSwiftVirtualNetworkConnectionSlotResponder(resp *http.Response) (result SwiftVirtualNetwork, err error) {
35732	err = autorest.Respond(
35733		resp,
35734		azure.WithErrorUnlessStatusCode(http.StatusOK),
35735		autorest.ByUnmarshallingJSON(&result),
35736		autorest.ByClosing())
35737	result.Response = autorest.Response{Response: resp}
35738	return
35739}
35740
35741// UpdateVnetConnection description for Adds a Virtual Network connection to an app or slot (PUT) or updates the
35742// connection properties (PATCH).
35743// Parameters:
35744// resourceGroupName - name of the resource group to which the resource belongs.
35745// name - name of the app.
35746// vnetName - name of an existing Virtual Network.
35747// connectionEnvelope - properties of the Virtual Network connection. See example.
35748func (client AppsClient) UpdateVnetConnection(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) {
35749	if tracing.IsEnabled() {
35750		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnection")
35751		defer func() {
35752			sc := -1
35753			if result.Response.Response != nil {
35754				sc = result.Response.Response.StatusCode
35755			}
35756			tracing.EndSpan(ctx, sc, err)
35757		}()
35758	}
35759	if err := validation.Validate([]validation.Validation{
35760		{TargetValue: resourceGroupName,
35761			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35762				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35763				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35764		return result, validation.NewError("web.AppsClient", "UpdateVnetConnection", err.Error())
35765	}
35766
35767	req, err := client.UpdateVnetConnectionPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope)
35768	if err != nil {
35769		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", nil, "Failure preparing request")
35770		return
35771	}
35772
35773	resp, err := client.UpdateVnetConnectionSender(req)
35774	if err != nil {
35775		result.Response = autorest.Response{Response: resp}
35776		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", resp, "Failure sending request")
35777		return
35778	}
35779
35780	result, err = client.UpdateVnetConnectionResponder(resp)
35781	if err != nil {
35782		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnection", resp, "Failure responding to request")
35783		return
35784	}
35785
35786	return
35787}
35788
35789// UpdateVnetConnectionPreparer prepares the UpdateVnetConnection request.
35790func (client AppsClient) UpdateVnetConnectionPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (*http.Request, error) {
35791	pathParameters := map[string]interface{}{
35792		"name":              autorest.Encode("path", name),
35793		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35794		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35795		"vnetName":          autorest.Encode("path", vnetName),
35796	}
35797
35798	const APIVersion = "2020-09-01"
35799	queryParameters := map[string]interface{}{
35800		"api-version": APIVersion,
35801	}
35802
35803	preparer := autorest.CreatePreparer(
35804		autorest.AsContentType("application/json; charset=utf-8"),
35805		autorest.AsPatch(),
35806		autorest.WithBaseURL(client.BaseURI),
35807		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", pathParameters),
35808		autorest.WithJSON(connectionEnvelope),
35809		autorest.WithQueryParameters(queryParameters))
35810	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35811}
35812
35813// UpdateVnetConnectionSender sends the UpdateVnetConnection request. The method will close the
35814// http.Response Body if it receives an error.
35815func (client AppsClient) UpdateVnetConnectionSender(req *http.Request) (*http.Response, error) {
35816	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35817}
35818
35819// UpdateVnetConnectionResponder handles the response to the UpdateVnetConnection request. The method always
35820// closes the http.Response Body.
35821func (client AppsClient) UpdateVnetConnectionResponder(resp *http.Response) (result VnetInfo, err error) {
35822	err = autorest.Respond(
35823		resp,
35824		azure.WithErrorUnlessStatusCode(http.StatusOK),
35825		autorest.ByUnmarshallingJSON(&result),
35826		autorest.ByClosing())
35827	result.Response = autorest.Response{Response: resp}
35828	return
35829}
35830
35831// UpdateVnetConnectionGateway description for Adds a gateway to a connected Virtual Network (PUT) or updates it
35832// (PATCH).
35833// Parameters:
35834// resourceGroupName - name of the resource group to which the resource belongs.
35835// name - name of the app.
35836// vnetName - name of the Virtual Network.
35837// gatewayName - name of the gateway. Currently, the only supported string is "primary".
35838// connectionEnvelope - the properties to update this gateway with.
35839func (client AppsClient) UpdateVnetConnectionGateway(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) {
35840	if tracing.IsEnabled() {
35841		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionGateway")
35842		defer func() {
35843			sc := -1
35844			if result.Response.Response != nil {
35845				sc = result.Response.Response.StatusCode
35846			}
35847			tracing.EndSpan(ctx, sc, err)
35848		}()
35849	}
35850	if err := validation.Validate([]validation.Validation{
35851		{TargetValue: resourceGroupName,
35852			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35853				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35854				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35855		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionGateway", err.Error())
35856	}
35857
35858	req, err := client.UpdateVnetConnectionGatewayPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope)
35859	if err != nil {
35860		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", nil, "Failure preparing request")
35861		return
35862	}
35863
35864	resp, err := client.UpdateVnetConnectionGatewaySender(req)
35865	if err != nil {
35866		result.Response = autorest.Response{Response: resp}
35867		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", resp, "Failure sending request")
35868		return
35869	}
35870
35871	result, err = client.UpdateVnetConnectionGatewayResponder(resp)
35872	if err != nil {
35873		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGateway", resp, "Failure responding to request")
35874		return
35875	}
35876
35877	return
35878}
35879
35880// UpdateVnetConnectionGatewayPreparer prepares the UpdateVnetConnectionGateway request.
35881func (client AppsClient) UpdateVnetConnectionGatewayPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (*http.Request, error) {
35882	pathParameters := map[string]interface{}{
35883		"gatewayName":       autorest.Encode("path", gatewayName),
35884		"name":              autorest.Encode("path", name),
35885		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35886		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35887		"vnetName":          autorest.Encode("path", vnetName),
35888	}
35889
35890	const APIVersion = "2020-09-01"
35891	queryParameters := map[string]interface{}{
35892		"api-version": APIVersion,
35893	}
35894
35895	preparer := autorest.CreatePreparer(
35896		autorest.AsContentType("application/json; charset=utf-8"),
35897		autorest.AsPatch(),
35898		autorest.WithBaseURL(client.BaseURI),
35899		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
35900		autorest.WithJSON(connectionEnvelope),
35901		autorest.WithQueryParameters(queryParameters))
35902	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35903}
35904
35905// UpdateVnetConnectionGatewaySender sends the UpdateVnetConnectionGateway request. The method will close the
35906// http.Response Body if it receives an error.
35907func (client AppsClient) UpdateVnetConnectionGatewaySender(req *http.Request) (*http.Response, error) {
35908	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
35909}
35910
35911// UpdateVnetConnectionGatewayResponder handles the response to the UpdateVnetConnectionGateway request. The method always
35912// closes the http.Response Body.
35913func (client AppsClient) UpdateVnetConnectionGatewayResponder(resp *http.Response) (result VnetGateway, err error) {
35914	err = autorest.Respond(
35915		resp,
35916		azure.WithErrorUnlessStatusCode(http.StatusOK),
35917		autorest.ByUnmarshallingJSON(&result),
35918		autorest.ByClosing())
35919	result.Response = autorest.Response{Response: resp}
35920	return
35921}
35922
35923// UpdateVnetConnectionGatewaySlot description for Adds a gateway to a connected Virtual Network (PUT) or updates it
35924// (PATCH).
35925// Parameters:
35926// resourceGroupName - name of the resource group to which the resource belongs.
35927// name - name of the app.
35928// vnetName - name of the Virtual Network.
35929// gatewayName - name of the gateway. Currently, the only supported string is "primary".
35930// connectionEnvelope - the properties to update this gateway with.
35931// slot - name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the
35932// production slot's Virtual Network.
35933func (client AppsClient) UpdateVnetConnectionGatewaySlot(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) {
35934	if tracing.IsEnabled() {
35935		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionGatewaySlot")
35936		defer func() {
35937			sc := -1
35938			if result.Response.Response != nil {
35939				sc = result.Response.Response.StatusCode
35940			}
35941			tracing.EndSpan(ctx, sc, err)
35942		}()
35943	}
35944	if err := validation.Validate([]validation.Validation{
35945		{TargetValue: resourceGroupName,
35946			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
35947				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
35948				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
35949		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionGatewaySlot", err.Error())
35950	}
35951
35952	req, err := client.UpdateVnetConnectionGatewaySlotPreparer(ctx, resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot)
35953	if err != nil {
35954		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", nil, "Failure preparing request")
35955		return
35956	}
35957
35958	resp, err := client.UpdateVnetConnectionGatewaySlotSender(req)
35959	if err != nil {
35960		result.Response = autorest.Response{Response: resp}
35961		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", resp, "Failure sending request")
35962		return
35963	}
35964
35965	result, err = client.UpdateVnetConnectionGatewaySlotResponder(resp)
35966	if err != nil {
35967		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionGatewaySlot", resp, "Failure responding to request")
35968		return
35969	}
35970
35971	return
35972}
35973
35974// UpdateVnetConnectionGatewaySlotPreparer prepares the UpdateVnetConnectionGatewaySlot request.
35975func (client AppsClient) UpdateVnetConnectionGatewaySlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (*http.Request, error) {
35976	pathParameters := map[string]interface{}{
35977		"gatewayName":       autorest.Encode("path", gatewayName),
35978		"name":              autorest.Encode("path", name),
35979		"resourceGroupName": autorest.Encode("path", resourceGroupName),
35980		"slot":              autorest.Encode("path", slot),
35981		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
35982		"vnetName":          autorest.Encode("path", vnetName),
35983	}
35984
35985	const APIVersion = "2020-09-01"
35986	queryParameters := map[string]interface{}{
35987		"api-version": APIVersion,
35988	}
35989
35990	preparer := autorest.CreatePreparer(
35991		autorest.AsContentType("application/json; charset=utf-8"),
35992		autorest.AsPatch(),
35993		autorest.WithBaseURL(client.BaseURI),
35994		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}", pathParameters),
35995		autorest.WithJSON(connectionEnvelope),
35996		autorest.WithQueryParameters(queryParameters))
35997	return preparer.Prepare((&http.Request{}).WithContext(ctx))
35998}
35999
36000// UpdateVnetConnectionGatewaySlotSender sends the UpdateVnetConnectionGatewaySlot request. The method will close the
36001// http.Response Body if it receives an error.
36002func (client AppsClient) UpdateVnetConnectionGatewaySlotSender(req *http.Request) (*http.Response, error) {
36003	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36004}
36005
36006// UpdateVnetConnectionGatewaySlotResponder handles the response to the UpdateVnetConnectionGatewaySlot request. The method always
36007// closes the http.Response Body.
36008func (client AppsClient) UpdateVnetConnectionGatewaySlotResponder(resp *http.Response) (result VnetGateway, err error) {
36009	err = autorest.Respond(
36010		resp,
36011		azure.WithErrorUnlessStatusCode(http.StatusOK),
36012		autorest.ByUnmarshallingJSON(&result),
36013		autorest.ByClosing())
36014	result.Response = autorest.Response{Response: resp}
36015	return
36016}
36017
36018// UpdateVnetConnectionSlot description for Adds a Virtual Network connection to an app or slot (PUT) or updates the
36019// connection properties (PATCH).
36020// Parameters:
36021// resourceGroupName - name of the resource group to which the resource belongs.
36022// name - name of the app.
36023// vnetName - name of an existing Virtual Network.
36024// connectionEnvelope - properties of the Virtual Network connection. See example.
36025// slot - name of the deployment slot. If a slot is not specified, the API will add or update connections for
36026// the production slot.
36027func (client AppsClient) UpdateVnetConnectionSlot(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) {
36028	if tracing.IsEnabled() {
36029		ctx = tracing.StartSpan(ctx, fqdn+"/AppsClient.UpdateVnetConnectionSlot")
36030		defer func() {
36031			sc := -1
36032			if result.Response.Response != nil {
36033				sc = result.Response.Response.StatusCode
36034			}
36035			tracing.EndSpan(ctx, sc, err)
36036		}()
36037	}
36038	if err := validation.Validate([]validation.Validation{
36039		{TargetValue: resourceGroupName,
36040			Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
36041				{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil},
36042				{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil {
36043		return result, validation.NewError("web.AppsClient", "UpdateVnetConnectionSlot", err.Error())
36044	}
36045
36046	req, err := client.UpdateVnetConnectionSlotPreparer(ctx, resourceGroupName, name, vnetName, connectionEnvelope, slot)
36047	if err != nil {
36048		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", nil, "Failure preparing request")
36049		return
36050	}
36051
36052	resp, err := client.UpdateVnetConnectionSlotSender(req)
36053	if err != nil {
36054		result.Response = autorest.Response{Response: resp}
36055		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", resp, "Failure sending request")
36056		return
36057	}
36058
36059	result, err = client.UpdateVnetConnectionSlotResponder(resp)
36060	if err != nil {
36061		err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateVnetConnectionSlot", resp, "Failure responding to request")
36062		return
36063	}
36064
36065	return
36066}
36067
36068// UpdateVnetConnectionSlotPreparer prepares the UpdateVnetConnectionSlot request.
36069func (client AppsClient) UpdateVnetConnectionSlotPreparer(ctx context.Context, resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (*http.Request, error) {
36070	pathParameters := map[string]interface{}{
36071		"name":              autorest.Encode("path", name),
36072		"resourceGroupName": autorest.Encode("path", resourceGroupName),
36073		"slot":              autorest.Encode("path", slot),
36074		"subscriptionId":    autorest.Encode("path", client.SubscriptionID),
36075		"vnetName":          autorest.Encode("path", vnetName),
36076	}
36077
36078	const APIVersion = "2020-09-01"
36079	queryParameters := map[string]interface{}{
36080		"api-version": APIVersion,
36081	}
36082
36083	preparer := autorest.CreatePreparer(
36084		autorest.AsContentType("application/json; charset=utf-8"),
36085		autorest.AsPatch(),
36086		autorest.WithBaseURL(client.BaseURI),
36087		autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}", pathParameters),
36088		autorest.WithJSON(connectionEnvelope),
36089		autorest.WithQueryParameters(queryParameters))
36090	return preparer.Prepare((&http.Request{}).WithContext(ctx))
36091}
36092
36093// UpdateVnetConnectionSlotSender sends the UpdateVnetConnectionSlot request. The method will close the
36094// http.Response Body if it receives an error.
36095func (client AppsClient) UpdateVnetConnectionSlotSender(req *http.Request) (*http.Response, error) {
36096	return client.Send(req, azure.DoRetryWithRegistration(client.Client))
36097}
36098
36099// UpdateVnetConnectionSlotResponder handles the response to the UpdateVnetConnectionSlot request. The method always
36100// closes the http.Response Body.
36101func (client AppsClient) UpdateVnetConnectionSlotResponder(resp *http.Response) (result VnetInfo, err error) {
36102	err = autorest.Respond(
36103		resp,
36104		azure.WithErrorUnlessStatusCode(http.StatusOK),
36105		autorest.ByUnmarshallingJSON(&result),
36106		autorest.ByClosing())
36107	result.Response = autorest.Response{Response: resp}
36108	return
36109}
36110